# MCP Servers

Source: https://athas.dev/docs/mcp-servers

Give agents in Athas extra tools with Model Context Protocol servers.

MCP servers give the agents you run in Athas extra tools, such as access to a database, a browser,
or your issue tracker. Athas passes every enabled server to agents when a session starts.

## Adding a Server

1. Open **Settings > AI > MCP Servers**.
2. Click **Add Server**.
3. Pick a transport:
   - **Stdio** runs a command on your machine, for example `npx -y @modelcontextprotocol/server-filesystem ~/projects`.
   - **HTTP** or **SSE** connects to a remote server URL.
4. Add any environment variables or headers the server needs. Athas keeps these in secure
   storage, not in the settings file.

Use the switch next to a server to stop passing it to new agent sessions without removing it.

## Add to Athas Links

Server authors can offer a one-click install link. Opening it shows the MCP server dialog with the
server filled in; nothing is saved until you review it and click save.

```text
athas://mcp/install?name=<name>&config=<base64 JSON>
```

The config uses the same shape as an `mcp.json` entry and Cursor install links:

```json
{ "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "~/projects"] }
```

```json
{ "url": "https://mcp.example.com/mcp", "headers": { "Authorization": "Bearer <token>" } }
```

Add `"type": "sse"` for servers that use the SSE transport.

GitHub and most Markdown renderers drop `athas://` links, so README buttons should point at the
https version, which opens Athas for the reader:

```md
[![Add to Athas](https://athas.dev/badges/add-to-athas.svg)](https://athas.dev/mcp/install?name=Filesystem&config=<url-encoded base64 JSON>)
```

To build the `config` value, base64-encode the JSON and URL-encode the result:

```bash
printf '%s' '{"command":"npx","args":["-y","@modelcontextprotocol/server-filesystem"]}' | base64 | tr -d '\n' | jq -sRr @uri
```
