Skip to main content

What is the Mandate MCP server?

The @mandate.md/mcp-server package is a Model Context Protocol server built on Cloudflare Workers. It exposes two tools: search (look up Mandate schemas and examples) and execute (call the Mandate API for validation, registration, and status checks). Any MCP-compatible client can connect to it via SSE transport. The server uses @cloudflare/agents v0.0.16 and extends McpAgent<Env>.

Tools

Deploy to Cloudflare Workers

Clone the package, install dependencies, set secrets, and deploy.
The MANDATE_API_URL defaults to https://app.mandate.md in wrangler.toml. Override it if you run a self-hosted Mandate instance.

Local development

This starts the MCP server on http://localhost:8787. The SSE endpoint is at /sse and the MCP endpoint is at /mcp.

Environment variables

Client configuration

Claude Desktop

Codex CLI

Cursor / Windsurf

Add the SSE URL in your editor’s MCP settings. The server uses standard SSE transport, so any MCP-compatible editor works.

Testing with MCP Inspector

Use the MCP Inspector to test your deployed server interactively.
Enter your Worker URL (e.g., https://your-worker.workers.dev/sse) and test the search and execute tools directly.

Alternative: CLI MCP mode

If you do not need a Cloudflare Workers deployment, the Mandate CLI includes a built-in MCP server that runs locally via stdio transport.
This exposes the same tools (search, execute) over stdio. Use it for local development or when your MCP client supports stdio but not SSE.
The Workers MCP server does not store any state. Every execute call is a stateless API request to the Mandate backend. Your runtime key is stored as a Cloudflare secret and never exposed to clients.

Next Steps

CLI MCP Flag

Run Mandate MCP locally with the CLI’s —mcp flag.

Integrations Overview

Compare all Mandate integration options.

Validate Transactions

Understand the validate flow that the execute tool calls.