Skip to main content
DZap MCP is exposed through both local and remote surfaces so agents can connect from desktop, IDE, browser, or server-side runtimes.

Transport surfaces

  1. Stdio server (npm run mcp:dev / npm run mcp)
  2. Streamable HTTP transport (POST|GET|DELETE /mcp)

Live endpoint

https://nlp-ai-439689868940.europe-north1.run.app/mcp

Session behavior

  • initialize creates a session
  • follow-up requests include mcp-session-id
  • DELETE /mcp closes session state

Authentication (HTTP transport)

The /mcp HTTP endpoint is open by default (and logs a warning) for local use. For any shared or public deployment, protect it with:
  • DZAP_MCP_HTTP_TOKEN, when set, every /mcp request must include Authorization: Bearer <token> (compared in constant time).
  • DZAP_MCP_ALLOWED_ORIGINS, optional comma-separated Origin allowlist that blocks drive-by browser callers.
The stdio transport is not network-exposed and needs no token.

JSON-RPC error handling

Invalid method/tool/arguments return structured JSON-RPC errors:
Common error codes:
  • -32600 invalid request
  • -32601 method not found
  • -32602 invalid params
  • -32603 internal error

Tool annotations

Each tool is registered with a readOnlyHint annotation so planners can route safely. Read-only tools are true; the interactive execution tools (PerformZapTool, ChangeChainTool) are false:
Treat readOnlyHint: false tools as execution-sensitive and require user confirmation in the client UX.

MCP resources and prompts

Resources:
  • dzap://tools/catalog
  • dzap://prompts/system
  • dzap://docs/urls
Prompts:
  • wallet-overview
  • tool-execution-plan

Remote config example

Local run commands

Library exports

  • createDzapMcpServer(...)
  • startDzapMcpServer(...)
Last modified on July 29, 2026