DZap MCP is exposed through both local and remote surfaces so agents can connect from desktop, IDE, browser, or server-side runtimes.
Transport surfaces
- Stdio server (
npm run mcp:dev / npm run mcp)
- Streamable HTTP transport (
POST|GET|DELETE /mcp)
- WebMCP discovery endpoints:
/.well-known/mcp
/.well-known/mcp/server-card.json
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
JSON-RPC error handling
Invalid method/tool/arguments return structured JSON-RPC errors:
{
"jsonrpc": "2.0",
"id": "req-2",
"error": {
"code": -32602,
"message": "Invalid params",
"data": {
"tool": "PerformZapTool",
"field": "amount",
"expected": "string"
}
}
}
Common error codes:
-32600 invalid request
-32601 method not found
-32602 invalid params
-32603 internal error
Tools include behavioral hints so planners can route safely:
{
"name": "BalanceTool",
"description": "Fetch wallet balances",
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}
Execution tools should set destructiveHint: true 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
{
"mcpServers": {
"DZapAI": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://nlp-ai-439689868940.europe-north1.run.app/mcp"]
}
}
}
Local run commands
npm run build
npm run mcp
Library exports
createDzapMcpServer(...)
startDzapMcpServer(...)
Last modified on May 30, 2026