# MCP servers

> Connect the KazoCode agent to tools and data with Model Context Protocol (MCP) servers, configured for you or for a project in .mcp.json.

The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) is an open standard for giving AI agents tools and data. An MCP server can let the agent query a database, read issues from your tracker, or control a design tool. KazoCode supports local servers that run as a command and remote servers reached over HTTP.

## Add a server

Browse, add and turn servers on or off in the **MCP** tab of the Extensions view (`Ctrl+Shift+X`). Servers you add there are yours, in every project. For a project, list servers in a `.mcp.json` file at its root, which you can commit so everyone on the project gets the same servers.

```json title=".mcp.json"
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/dev"]
    },
    "linear": {
      "url": "https://mcp.linear.app/mcp"
    }
  }
}
```

| Field | For |
| --- | --- |
| `command`, `args` | A local server started as a program |
| `env` | Environment variables for a local server |
| `cwd` | The folder a local server starts in |
| `url` | A remote server |
| `headers` | Headers sent to a remote server, such as an API key |
| `disabled` | Keep a server configured but off |

The same file works in Claude Code, so an existing `.mcp.json` needs no changes.

> [!IMPORTANT]
> Servers in a project's `.mcp.json` run programs on your computer. The first time you open a project that has one, KazoCode asks before starting them, and asks again if the set of servers changes.

## Sign in to a server

Remote servers that need an account show a sign-in prompt the first time the agent uses them. Once you've signed in, the agent can use the server's tools like any other.

## What the agent gets

Each server's tools appear next to KazoCode's own and follow the same [permissions](https://kazocode.app/docs/agent/permissions.md). Servers can also offer resources (data the agent can read) and prompts. Ask the agent which servers are connected, or open the **MCP** tab in the Extensions view to see each server's state, scope and tools.

## Scopes

| Scope | Where it's configured |
| --- | --- |
| User | The **MCP** tab in the Extensions view, for every project |
| Project | `.mcp.json` or `.kazocode/mcp.json` in the project |
| Organization | A managed file set by your administrator |
| Plugin | Added by an enabled [plugin](https://kazocode.app/docs/sdk/plugins.md) |
