Wire an AI client to the 1Claw MCP server
Configure Claude Desktop, Cursor, or VS Code to reach the 1Claw MCP server and call list_secrets.
The 1Claw MCP server gives an AI client tools to list, get, and manage vault secrets. You can use the hosted server at mcp.1claw.co or run a local stdio process.
Prerequisites: a 1Claw account, a vault, an agent with an ocv_ API key, and a policy granting that agent read access to the secret paths it needs. Create an agent in the Agents & Access Control track, or via POST /v1/agents. Copy agent_id and api_key from the creation response.
- 1
Option A: Local stdio (recommended for development). Add the 1claw MCP server to your client config. Only ONECLAW_AGENT_API_KEY is required. Agent ID and vault are auto-discovered. Paste your real ocv_ key from agent creation in place of the placeholder.
json{ "mcpServers": { "1claw": { "command": "npx", "args": ["-y", "@1claw/mcp"], "env": { "ONECLAW_AGENT_API_KEY": "ocv_paste_your_agent_api_key_here" } } } } - 2
Option B: Hosted server. First get a JWT by calling the agent-token endpoint. Replace the placeholders with your real agent_id and ocv_ key from agent creation.
bashexport AGENT_ID="paste-your-agent-uuid-here" export AGENT_KEY="ocv_paste_your_agent_key_here" TOKEN=$(curl -s -X POST https://api.1claw.co/v1/auth/agent-token \ -H "Content-Type: application/json" \ -d "{\"agent_id\":\"$AGENT_ID\",\"api_key\":\"$AGENT_KEY\"}" | jq -r '.access_token') export VAULT_ID="paste-your-vault-uuid-here" - 3
Use that token in a hosted MCP config. Claude Desktop, Cursor, and Claude Code all use this same shape. Replace $TOKEN and $VAULT_ID with the values from the previous step.
json{ "mcpServers": { "1claw": { "url": "https://mcp.1claw.co/mcp", "headers": { "Authorization": "Bearer $TOKEN", "X-Vault-ID": "$VAULT_ID" } } } } - 4
Restart the client, then ask it to list your secrets.
textList the secrets in my 1claw vault.
Config file locations: Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS). Cursor: Settings → MCP Servers. VS Code: .vscode/mcp.json.
The hosted JWT expires in about an hour. The local stdio server exchanges the ocv_ key for a JWT and refreshes it automatically, so it is simpler for long sessions.
Your AI client now calls list_secrets against your vault and returns the secret paths and metadata.
What this gives you, and what it does not. MCP hands an assistant a set of tools; it does not hand it judgment, and it does not change who is allowed to do what.
- The MCP server enforces nothing. Every call is authorised by the vault API against the agent's policies, so connecting an assistant grants exactly the access the agent already had.
- Tool descriptions enter the model's context. Anything you install contributes text the model reads as guidance, which makes an installed server's metadata part of your attack surface.
- Output inspection is a backstop, not a boundary. Known secret values are redacted before reaching the model, and a credential in an unfamiliar format is not.
- The stdio server holds your agent key. It comes from the client config on your machine, so it is only as protected as that file.
Before installing a third-party MCP server, read its tool descriptions rather than only its code. That text is executed by the model in a way source code is not.
Decide
A teammate wants to give the whole engineering team MCP access to the production vault, using one shared agent key distributed through the password manager.
What is the problem with this plan?
Check your understanding
3 questionsWhich single environment variable is required for the local stdio MCP server?
How do you get the Bearer token for the hosted MCP server?
Which tool confirms the connection works?