Skip to main content

MCP Integration

The 1claw MCP server connects AI clients (Claude, Cursor, GPT, and others) to your vault through the Model Context Protocol. Secrets are fetched at tool-call time, not pasted into system prompts or config files.

This is the fastest path for IDE agents: register an agent in the dashboard, grant read access to the paths it needs, and point your MCP client at mcp.1claw.co with the agent API key. The server exchanges the key for a short-lived JWT, refreshes it automatically, and discovers the vault when the agent is bound to one.

For local-only security inspection (no vault account), run the MCP server in ONECLAW_LOCAL_ONLY mode. For secrets that never leave your laptop, use local daemon mode with ONECLAW_LOCAL_VAULT=true.

Try it out

Try out the examples in this repo: FastMCP Tool Server (custom MCP server with domain tools) and LangChain Agent (LangChain + 1Claw MCP tools).

Quick start (hosted)​

The fastest way to connect an AI agent to your vault:

  1. Register an agent in the 1claw dashboard — save the API key (ocv_...).
  2. Create a policy granting the agent read access to the paths it needs.
  3. Configure your MCP client with the hosted server using the agent API key directly:
{
"mcpServers": {
"1claw": {
"url": "https://mcp.1claw.co/mcp",
"headers": {
"Authorization": "Bearer ocv_your_agent_api_key"
}
}
}
}

That's it. The server automatically exchanges the API key for a short-lived JWT, refreshes it before expiry, and auto-discovers the vault when the agent is bound to exactly one. No manual token rotation needed.

For OIDC, MCP server cards, auth.md, x402, and other machine-readable endpoints, see Agent discovery and 1claw.co/for-ai.

Vault override

If the agent has access to multiple vaults, add "X-Vault-ID": "your-vault-uuid" to the headers to pick one explicitly.

Legacy: using a pre-minted JWT

If you prefer to manage tokens yourself, exchange the API key for a JWT and pass it directly. Note that JWTs expire (~15 minutes by default) and you'll need to refresh them manually.

curl -s -X POST https://api.1claw.co/v1/auth/agent-token \
-H "Content-Type: application/json" \
-d '{"agent_id":"<uuid>","api_key":"ocv_..."}' | jq -r '.access_token'
{
"mcpServers": {
"1claw": {
"url": "https://mcp.1claw.co/mcp",
"headers": {
"Authorization": "Bearer <jwt-from-agent-token-endpoint>",
"X-Vault-ID": "your-vault-uuid"
}
}
}
}

Quick start (local)​

For local setups, run the MCP server via stdio. Only ONECLAW_AGENT_API_KEY is needed — the server auto-discovers the agent ID and vault, and handles JWT refresh:

{
"mcpServers": {
"1claw": {
"command": "npx",
"args": ["-y", "@1claw/mcp"],
"env": {
"ONECLAW_AGENT_API_KEY": "ocv_your_agent_api_key"
}
}
}
}

Or auto-configure with the CLI: 1claw setup --client cursor (or --client claude).

Quick start (local daemon — offline, zero-knowledge)​

For fully offline use where the model should never see secret values:

{
"mcpServers": {
"1claw": {
"command": "npx",
"args": ["-y", "@1claw/mcp"],
"env": {
"ONECLAW_LOCAL_VAULT": "true"
}
}
}
}

Or auto-configure: 1claw setup --local --client cursor. The model gets list_secrets (names only) and proxy_request (inject a secret into an HTTP call without exposing the value). See Local Vault & Daemon for setup.

Toolsets — what a session actually sees​

The server ships 162 tools, but a session is only offered the toolsets its agent is entitled to. A vault-only agent sees 28 tools; an agent with intents and execution enabled sees 55. The MCP configuration is unchanged — the shaping comes from the agent's own flags in the dashboard.

ToolsetOffered whenWhat's in it
inspectalwaysinspect_content
vaultany agentsecrets, versions, rotation, env bundles, vaults, sharing, connected accounts
approvalsany agentrequest_approval, get_approval_status, get_approval, list_approvals, list_pending_approvals
intentsagent has Intents API enabledsigning, simulation, submission, signing keys, portfolio, Safe accounts
executeagent has Execution Intents enabledbindings, execute_http, execute_intent, executions, connectors
cardsagent has Cards enabledcards and gift cards
memoryagent has Memory enabledmemory tools + get_peer_context
channelsagent has Shroud enabledTelegram / WhatsApp / Discord channels
directoryagent is discoverableagent directory + job board
treasury, delegation, chat, automations, runtimes, notificationopt-in onlyno per-agent flag exists for these — request them explicitly
adminnever on an agent sessionhuman-only endpoints (policies, sub-orgs, approval votes, Safe migration)
platformneverplt_ endpoints; the MCP server does not accept platform keys

Requesting toolsets. Over stdio set ONECLAW_MCP_TOOLSETS; hosted, send the X-1Claw-Toolsets header. Both take a comma list (vault,intents,automations) or all. A request can narrow the defaults or opt into the opt-in sets; it never adds a toolset the agent is not entitled to, and all still excludes admin and platform.

execution_require_tee. When this flag is on, the vault refuses to return secret values to the agent outside a TEE, so get_secret, get_env_bundle and resolve_env are hidden. Writes and metadata (put_secret, rotate_and_store, rotate_generate, describe_secret, list_secrets, list_versions) remain.

Keeping up with flag changes. Hosted sessions re-check entitlements every 15 minutes and immediately after a 403 from the vault, then send notifications/tools/list_changed so the client re-lists. Over stdio the toolset is fixed at startup — restart the MCP server after changing an agent's flags.

Degraded lookups. Each session logs toolsets=… lookup=full|jwt_only|failed. jwt_only means only the flags carried in the signed token were honoured (intents, execute, shroud); failed means the agent defaults were used. A degraded lookup only ever narrows what is offered.

Available tools​

The groups below list every tool; which ones a given agent sees is decided by the toolsets above.

Secrets​

ToolWhat it does
list_secretsList all secrets (metadata only, never values)
get_secretFetch decrypted value by path
put_secretCreate or update a secret (creates a new version)
delete_secretSoft-delete a secret
describe_secretGet metadata without the value
rotate_and_storeStore a new value for an existing secret (new version)
rotate_generateServer-side rotation — generates a random value that never leaves the server
list_versionsList all versions of a secret with creation dates and disabled status
get_env_bundleFetch and parse a KEY=VALUE env bundle into JSON
resolve_envResolve per-key env vars for a vault and environment (precedence applied). Omit environment when the agent has env_auto_resolve: true

Environment variables (v0.51)​

Per-key encrypted env vars on vaults replace path-based config/prod/* bundles for deployment configs. See Environment Variables. Agents with env_auto_resolve: true can call resolve_env without specifying an environment — the server uses the agent's JWT environment claim.

Vaults & access​

ToolWhat it does
create_vaultCreate a new vault for organising secrets
list_vaultsList all vaults accessible to you
grant_accessGrant a user or agent access to a vault you own
share_secretShare a specific secret with a user, agent, or your creator

Transactions (Intents API)​

ToolWhat it does
submit_transactionSign and optionally broadcast an EVM transaction
sign_transactionSign without broadcasting — returns raw signed tx hex
simulate_transactionSimulate a transaction via Tenderly (no signing)
simulate_bundleSimulate a sequence of transactions in order
list_transactionsList recent transactions for the current agent
get_transactionGet details of a specific transaction by ID

Signing keys​

ToolWhat it does
provision_signing_keyGenerate a multi-chain signing key (Ethereum, Bitcoin, Solana, XRP, Cardano, Tron)
list_signing_keysList all active signing keys for an agent
sign_messageEIP-191 personal_sign with an agent's signing key
sign_typed_dataEIP-712 typed data signing with domain-aware hashing

Platform​

ToolWhat it does
platform_list_appsList platform apps in the org
platform_create_appRegister a new platform app
platform_bootstrap_userProvision resources from a bootstrap template
platform_reissue_claimMint a fresh claim URL for a bootstrapped connection
platform_rotate_keyRotate a platform app's plt_ API key

Treasury​

ToolWhat it does
treasury_proposeCreate a Safe multisig proposal
treasury_sign_proposalApprove or reject with an EIP-712 signature
treasury_list_proposalsList proposals filtered by status

Approvals​

ToolWhat it does
request_approvalAsk a human to approve a policy change or sensitive action
list_approvalsList approval requests by status
get_approvalPoll a specific approval request

Bankr​

ToolWhat it does
lease_bankr_keyLease a scoped Bankr wallet API key (metadata only — key never in tool output)
spend_from_passkey_safeSpend from a human's passkey-owned Safe under an on-chain Allowance Module grant (cap enforced by the module; guardrails + sanctions first)

Safe accounts & guardrail governance (v0.56+)​

ToolWhat it does
list_agent_accountsList agent EOA/Safe accounts per chain
migrate_agent_to_safeBuild EOA→Safe migration plan (human-only)
deprecate_agent_eoaDeprecate agent EOA signing path (human-only)
get_safe_module_registryPinned Safe/Zodiac module addresses (public)
sync_org_safe_allowancesOrg allowance reconciliation report (owner/admin)
get_guardrail_shadow_reportConvention 6 shadow would-deny aggregate
list_guardrail_revisionsGuardrail change audit trail
replay_agent_guardrailsDry-run draft guardrails against recent txs

Security​

ToolWhat it does
inspect_contentScan text for injection, obfuscation, social engineering, and PII

Local daemon mode​

ToolWhat it does
proxy_requestMake an HTTP request with a secret injected — value never enters the context window
list_secretsList secret names in the local vault (names only, no values)

Typical agent workflow​

  1. Discover — list_secrets to see what's available.
  2. Check — describe_secret to verify it exists and hasn't expired.
  3. Fetch — get_secret to get the decrypted value.
  4. Use — Pass the value into the API call.
  5. Forget — Do not store the value in summaries, logs, or memory.

Security​

  • Secrets are fetched just-in-time and never cached by the MCP server.
  • Secret values are never logged — only the path is recorded.
  • Each hosted connection authenticates independently (per-session isolation).
  • All access is recorded in the vault audit log.

Further reading​