Skip to content

Is there an MCP server for managing secrets and env vars?

Yes: Envshed has a remote MCP server at https://app.envshed.com/api/mcp that lets an AI agent list organizations, projects, environments and key names, and ask a person for a missing secret. No MCP tool returns a secret value. This reduces accidental leaks; it does not stop an agent with shell access.

Envshed is a hosted secrets manager for dev teams. It stores environment variables encrypted with AES-256-GCM and delivers them through a web app, CLI, API and Node.js SDK. AI coding agents run commands with secrets through envshed run, which masks values in the output. No MCP tool returns a secret value.

What can an agent do through the MCP server?

It can see what exists and what is missing, and it can ask a person. Every tool applies the same permissions as the REST API, so a connection never gets more than your role allows, and each call is written to the audit log with the client's name.

ToolWhat it does
list_organizationsOrganizations this connection can reach
list_projectsProjects in an organization
list_environmentsEnvironments in a project
list_secret_keysKey names in an environment, each set, placeholder, disabled or missing
request_secretAsk a person for a secret and get the link where they enter it
get_secret_request_statusWhether a request is pending, fulfilled, declined or expired
list_secret_requestsRequests still waiting in an environment
decline_secret_requestDecline a request (needs write access)
list_agent_sessionsLive agent sessions (signed-in people only)
revoke_agent_sessionEnd an agent session (signed-in people only)

What does it not do?

  • It never hands out values. No MCP tool returns a secret value. To run a program with its secrets, the agent uses envshed run, which puts the values in the program's environment and not in the conversation.
  • Free text is not checked for secrets. Key names and reasons are free text, and the server refuses only known token formats, so never paste a secret into a tool call.
  • An approved client acts as you. It can see every key name you can see, and those names enter the model's context.
  • It does not stop an agent with a shell. Such an agent can still print its environment inside envshed run, run envshed secret get, or read a .env file with whatever access its login has. Limits that must hold belong on the server, in roles and scoped tokens.

How do I ask for a missing key without pasting it?

The agent calls request_secret and gets a link. A person opens it and enters the value in the Envshed dashboard, so the value never passes through the conversation. From a terminal, envshed request <KEY> --reason "..." does the same and waits for the answer.

How do I connect Claude, Cursor or Codex?

Sign in is OAuth with PKCE, so there is no key to copy. Approve the connection in the browser only if you started it.

Claude Code, with the CLI hooks:

envshed agent install
claude mcp add --transport http envshed https://app.envshed.com/api/mcp
claude mcp login envshed

Cursor, in ~/.cursor/mcp.json or .cursor/mcp.json:

{
  "mcpServers": {
    "envshed": { "url": "https://app.envshed.com/api/mcp" }
  }
}
cursor-agent mcp login envshed

Codex:

codex mcp add envshed --url https://app.envshed.com/api/mcp
codex mcp login envshed

Other MCP clients connect with the same URL. Setup guides: Claude Code, Cursor, Codex. Full reference: docs.envshed.com/mcp.

How long does a connection last, and how do I disconnect?

An access token lasts 1 hour. A refresh token rotates on every use and lasts 30 days from its last use. To disconnect, open Account, then Personal API tokens, and revoke the client under Connected MCP clients. It stops working on its next request.

What if no person is there to approve, as in CI?

Use OIDC on GitHub Actions: the job proves which repository it runs in and gets a read-only session of at most an hour, with no stored credential. Elsewhere, use a machine token: read-only, limited to one environment, optionally to some keys, and it stops after 90 days without use.

Where is it listed, and which plans include it?

Envshed's MCP server is listed in the MCP Registry as com.envshed/envshed, checked on December 5, 2026. The MCP server is available on every plan, including the free Developer plan.

FAQ

Does the Envshed MCP server return secret values to the AI?

No. No MCP tool returns a secret value. Key names and reasons are free text, and the server refuses only known token formats, so never paste a secret into a tool call. When a key is missing, request_secret gives you a link and you enter the value in the dashboard, not in the chat.

Which AI tools can connect to it?

Claude Code, Cursor and Codex have setup guides, tested with Claude Code 2.1.323, Cursor CLI 2026.11.13 and an OAuth connection from Codex. Other MCP clients connect to the same URL, https://app.envshed.com/api/mcp, with the same browser approval. Each client picks its own name, which Envshed cannot verify.

Can the agent run my app with its secrets through MCP?

No, the MCP server only deals in key names and request statuses. To run the app, the agent uses the CLI: envshed run --redact -- npm start puts the values in the program's environment and masks known secret values in the output. An agent with shell access can still print that environment.

Is the MCP server available on the free plan?

Yes. The MCP server is available on every plan, including the free Developer plan, which covers 2 members and 3 projects. Team is $5 per user per month and Business is $9 per user per month. Every tool applies the same permissions as the REST API, so the plan does not widen access.