Skip to content

MCP Server

The official MCP bridge is packaged as @duitmyself/api-mcp. It connects MCP-capable agents to the DuitMyself Public API over stdio.

Use the bridge when you want:

  • structured tool calls instead of hand-written HTTP requests
  • built-in rate-limit and request metadata in tool results
  • a first-party bootstrap prompt and resource set for agents
Terminal window
DUITMYSELF_API_KEY=key_... npx -y @duitmyself/api-mcp

Optional:

Terminal window
DUITMYSELF_API_BASE_URL=https://api.duitmyself.app

Add the published server with Claude Code’s stdio MCP command flow:

Terminal window
claude mcp add --transport stdio duitmyself -- npx -y @duitmyself/api-mcp

Then set DUITMYSELF_API_KEY in the server environment when prompted.

Use the standard Claude Desktop MCP config shape:

{
"mcpServers": {
"duitmyself": {
"command": "npx",
"args": ["-y", "@duitmyself/api-mcp"],
"env": {
"DUITMYSELF_API_KEY": "key_..."
}
}
}
}

Add DUITMYSELF_API_BASE_URL under env only when you need a preview lane or custom host.

From the repository root:

Terminal window
pnpm install
DUITMYSELF_API_KEY=key_... pnpm mcp:stdio

Optional:

Terminal window
DUITMYSELF_API_BASE_URL=https://api.duitmyself.app

If DUITMYSELF_API_BASE_URL is omitted, the bridge defaults to the production API host.

Registry metadata for the published server lives in .mcp/server.json in the repository.

  • duitmyself_get_agent_context
  • duitmyself_list_accounts
  • duitmyself_upsert_account
  • duitmyself_list_categories
  • duitmyself_upsert_category
  • duitmyself_list_payees
  • duitmyself_upsert_payee
  • duitmyself_list_transactions
  • duitmyself_upsert_transaction
  • duitmyself://me
  • duitmyself://agent/context
  • duitmyself-agent-playbook
  • agents get structured tool outputs instead of scraping raw HTTP
  • rate-limit metadata is preserved in tool responses
  • the recommended DuitMyself bookkeeping rules ship with the prompt and bootstrap tool
  • the bridge is built on the same official TypeScript client used elsewhere in the repo