envpact-mcp
v0.2.0
Published
MCP server for envpact — bring centralized secret management to AI coding agents (Cursor, Windsurf, Claude Code, Cline)
Maintainers
Readme
envpact-mcp
Model Context Protocol server for envpact — bring centralized secret management to AI coding agents (Cursor, Windsurf, Claude Code, Cline, Goose, ChatGPT Desktop, and any other MCP-aware client).
Stop pasting API keys into prompts. Let your agent generate
.envfiles from your private vault on demand.
Part of the envpact ecosystem.
What it does
When you ask your AI agent "set up a Next.js project that uses
OpenAI and Stripe", modern agents can scaffold the code but get
stuck at the .env step. With envpact-mcp installed:
- The agent sees your project's
.env.examplerequirements. - It calls
generate_envand the file is written from your private vault. - New keys it discovers are added back to the vault via
add_secret/add_shared_secret. - Optionally syncs to GitHub Actions via
sync_githubso CI works end-to-end.
You never paste a secret into an agent prompt.
Installation
The MCP server is published to npm as envpact-mcp. Configure your
AI client:
Claude Desktop / Claude Code
~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"envpact": {
"command": "npx",
"args": ["-y", "envpact-mcp"]
}
}
}Cursor
.cursor/mcp.json in your project, or
~/.cursor/mcp.json globally:
{
"mcpServers": {
"envpact": {
"command": "npx",
"args": ["-y", "envpact-mcp"]
}
}
}Windsurf
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"envpact": {
"command": "npx",
"args": ["-y", "envpact-mcp"]
}
}
}Cline (VS Code)
In Cline's MCP settings panel, add a stdio server with
command npx and args ["-y", "envpact-mcp"].
Prerequisites
You need an envpact vault. If you don't have one yet:
npx envpact-cli --init auto
# Creates chirag127/envpact-secrets (private) and clones it to
# ~/.envpact/secrets/ — same vault every component reads.Available Tools
| Tool | Description |
| :--- | :--- |
| generate_env | Resolve secrets, write .env for the current project. |
| list_projects | List all projects in the vault. |
| list_shared | List shared secret names (values are masked). |
| list_environments | List environments configured for a project. |
| add_secret | Add/update a project secret. |
| add_shared_secret | Add/update a shared secret. |
| rotate_secret | Rotate a shared secret; reports affected projects. |
| sync_github | Push resolved secrets to GitHub Actions. |
Schema details: see SHARED_SPEC §7.
Example Agent Conversations
You: "Set up envpact for this project. The .env.example needs OPENAI_API_KEY and DATABASE_URL."
Agent: calls
generate_env→.envwritten, missingDATABASE_URL. Asks: "Should DATABASE_URL be a shared secret or project-specific?"You: "Shared, value is
postgres://prod-host/db."Agent: calls
add_shared_secret({key: 'DATABASE_URL', value: '...'}), thenadd_secret({project: 'this-app', key: 'DATABASE_URL', value: 'shared.DATABASE_URL'}), thengenerate_envagain. Done —.envcomplete.
You: "OPENAI_API_KEY was leaked. Rotate it everywhere."
Agent: calls
rotate_secret({key: 'OPENAI_API_KEY', new_value: 'sk-new...'})→ reports 12 affected projects. Callssync_githubfor each.
Remote / SSE Variant
A Cloudflare Worker variant supporting MCP over Streamable HTTP + SSE is planned for v0.2.0. Track it at #1. For now, stdio is the only supported transport.
Security Model
- Vault values never leave your machine in tool responses — only the tool params (e.g. when you ask the agent to set a value) carry plaintext.
list_sharedreturns only names; values are never echoed.- The MCP server reads/writes
~/.envpact/secrets/directly. The vault is your existing private GitHub repo. - All vault commits are signed-off (
-s) and authored byenvpact-mcp.
License
MIT © Chirag Singhal — see LICENSE.
