# MCP Server

> The state of the Zavu MCP server, what works in it today, and what to use instead to give a coding agent the Zavu API.

> **Warning:**
> **The MCP server does not work in its default configuration today.** Its two
> tools call a hosted service that is no longer available, so both fail with an
> error, and the hosted endpoint is down too. We are rebuilding it.
>
> To give an agent the Zavu API now, use the [Coding Agent Skills](https://www.zavu.dev/docs/tools/coding-agent-skills)
> and the [CLI](https://www.zavu.dev/docs/guides/cli/overview): the skills tell the agent what to do, and
> the CLI does it.

## What it is

`@zavudev/sdk-mcp` is a Model Context Protocol server for Claude, Cursor, Codex
and other MCP clients. It exposes two tools rather than one per endpoint:

| Tool | What it does | Works today |
|------|-------------|-------------|
| `search_docs` | Searches the SDK documentation, so the agent looks up a parameter instead of guessing it. | Only with `--docs-search-mode=local` |
| `execute` | Runs TypeScript against an authenticated Zavu client, so the agent can chain calls. | Only with `--code-execution-mode=local` and Deno 2.6 or earlier installed |

## Running it locally

If you want to use it before the rebuild, run both tools on your own machine.
`search_docs` then works as is; `execute` needs Deno 2.6 or earlier on your
`PATH` (later Deno versions exit before the tool is ready).

```bash
export ZAVUDEV_API_KEY="your_key"
npx -y @zavudev/sdk-mcp@latest --code-execution-mode=local --docs-search-mode=local
```

Add it to a client with the same arguments. Claude Code:

```bash
claude mcp add zavudev --scope user -e ZAVUDEV_API_KEY="your_key" -- \
  npx -y @zavudev/sdk-mcp --code-execution-mode=local --docs-search-mode=local
```

Clients that read a JSON config (Claude Desktop, Cursor `~/.cursor/mcp.json`,
Windsurf `~/.codeium/windsurf/mcp_config.json`) take the same command:

```json
{
  "mcpServers": {
    "zavudev": {
      "command": "npx",
      "args": ["-y", "@zavudev/sdk-mcp", "--code-execution-mode=local", "--docs-search-mode=local"],
      "env": { "ZAVUDEV_API_KEY": "your_key" }
    }
  }
}
```

VS Code reads the same object under `servers` in `.vscode/mcp.json`, with
`"type": "stdio"`.

## Learn More

  - [Coding Agent Skills](https://www.zavu.dev/docs/tools/coding-agent-skills): What works today: the skills plus the CLI
  - [CLI](https://www.zavu.dev/docs/guides/cli/overview): Every API resource from the terminal
  - [API Reference](https://www.zavu.dev/docs/api-reference): Explore the full Zavu API
  - [Model Context Protocol](https://modelcontextprotocol.io/): Learn about the MCP standard
