> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentrpc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Start an MCP (Model Context Protocol) server with AgentRPC

MCP enables developers to build secure, two-way connections between their data sources and AI-powered tools through a simple architecture: developers can either expose their data through MCP servers or build AI applications (MCP clients) that connect to these servers.

## Starting an MCP Server

The TypeScript SDK includes an MCP server that can be started using:

```bash theme={null}
AGENTRPC_API_SECRET=<YOUR_API_SECRET> npx agentrpc mcp
```

This allows you to connect your data sources to AI assistants like Claude, enabling them to access relevant information and produce better responses.

## Cursor

<iframe src="https://player.vimeo.com/video/1066820406?h=44a15842e0" height="500" className="w-full aspect-video" frameBorder="0" allowFullScreen webkitallowfullscreen mozallowfullscreen title="AgentRPC - Cursor MCP Setup" />

Add the following to your `~/.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "agentrpc": {
      "command": "npx",
      "args": ["-y", "agentrpc", "mcp"],
      "env": {
        "AGENTRPC_API_SECRET": "<YOUR_API_SECRET>"
      }
    }
  }
}
```

[More details](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers)

## Claude Desktop

<iframe src="https://player.vimeo.com/video/1066820186?h=88d81fddf6" frameBorder="0" className="w-full aspect-video" height="500" allowFullScreen webkitallowfullscreen mozallowfullscreen title="AgentRPC - Claude MCP Setup" />

Add the following to your `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "agentrpc": {
      "command": "npx",
      "args": ["-y", "agentrpc", "mcp"],
      "env": {
        "AGENTRPC_API_SECRET": "<YOUR_API_SECRET>"
      }
    }
  }
}
```

[More details](https://modelcontextprotocol.io/quickstart/user)
