# Best MCP Servers for Coding Agents in 2026, Measured by Token Cost

> The best MCP servers for Claude Code, Cursor and Codex, sorted by job. I measured tool counts and schema tokens for 14 servers, with install lines for each.

On October 2 I asked GitHub's official MCP server for its tool list and got back 126 KB of JSON: 57,396 tokens. Only 11,114 of them describe the 46 tools in a form a model ever sees. Another 45,022 are base64 PNG icons, a light and a dark one for every tool. They're for the client's UI; a model's tool definition has no field for them.

That's the trouble with lists of the best MCP servers for developers: none of the top five search results counts the cost at all, and the obvious way to count it overstates some servers several times over. So I launched 14 servers a coding agent can actually use, measured each one with the same script on the same day, and sorted them by the job they do.

**The short answer:** for Claude Code, Cursor or Codex, start with **Context7** for library docs (2 tools, 985 tokens), **GitHub's official server** limited to the toolsets you use (its default 46 tools cost 11,114 tokens), and **Playwright MCP** or **Chrome DevTools MCP** when the agent needs a browser. Add **MCP Toolbox for Databases**, **Serena** or **Sentry** only for a job you do every week. Skip Filesystem, Git, Fetch and Sequential Thinking in those three clients: they duplicate tools the agent already has. All 14 servers together add 204 tools and 42,156 tokens of schemas, though Claude Code, Codex and Cursor now defer most of that.

## The best MCP servers at a glance, measured

**For most coding agents, three jobs justify a server: library docs, GitHub and a browser. Everything else depends on your stack.**

I ran this on 2026-10-02 on macOS. Each server started locally from a pinned version (`npx -y`, `uvx` or the release binary), and a small script sent MCP `initialize` and `tools/list` over stdio. I counted each tool's name, description and input schema with the `o200k_base` tokenizer. Those three fields are what a client turns into a tool definition; the [Anthropic tool-use docs](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools) list `name`, `description` and `input_schema`, plus optional fields such as examples and cache settings, and none of them carries icons. Claude's tokenizer gives different absolute numbers, so treat these as close estimates. GitHub ran with a placeholder token, which is enough for `tools/list`. Servers that need an account to connect are marked "not measured".

| Job                | Server                    | Version (released) | Tools            | Schema tokens    | Needs                                               | Verdict                        |
| ------------------ | ------------------------- | ------------------ | ---------------- | ---------------- | --------------------------------------------------- | ------------------------------ |
| Library docs       | Context7                  | 4.1.1 (Sep 14)     | 2                | 985              | Free API key recommended                            | Install first                  |
| GitHub issues, PRs | GitHub MCP server         | 1.13.0 (Oct 1)     | 46               | 11,114           | GitHub token or OAuth                               | Install, with toolsets         |
| Browser            | Playwright MCP            | 0.0.83 (Sep 28)    | 25               | 3,764            | A local browser                                     | Install if no built-in browser |
| Browser debugging  | Chrome DevTools MCP       | 1.10.1 (Sep 23)    | 30 (3 slim)      | 5,509 (176 slim) | Chrome                                              | Install for performance work   |
| Database           | MCP Toolbox for Databases | 1.13.1 (Sep 25)    | 29 (8 data-only) | 4,002 (1,220)    | Database login                                      | Install for database work      |
| Code navigation    | Serena                    | 1.7.0 (Aug 9)      | 21               | 5,013            | uv, language servers                                | Large codebases, refactors     |
| Code search        | octocode (ours)           | 0.26.4 (Sep 30)    | 4                | 2,292            | An index                                            | Semantic search                |
| Memory             | octobrain (ours)          | 0.14.4 (Sep 30)    | 4                | 2,526            | Local embedding model                               | Memory across sessions         |
| Memory             | Memory (reference)        | 2026.8.31          | 9                | 901              | Nothing                                             | Simple fact store              |
| Files              | octofs (ours)             | 0.16.1 (Sep 30)    | 6                | 2,163            | Nothing                                             | Remote files over SSH only     |
| Files              | Filesystem (reference)    | 2026.8.31          | 14               | 1,665            | Nothing                                             | Skip in coding agents          |
| Git                | Git (reference)           | 2026.8.18          | 12               | 1,119            | Nothing                                             | Skip                           |
| Web pages          | Fetch (reference)         | 2026.8.18          | 1                | 238              | Nothing                                             | Skip                           |
| Reasoning          | Sequential Thinking       | 2026.8.31          | 1                | 865              | Nothing                                             | Skip on reasoning models       |
| Errors             | Sentry                    | hosted             | —                | not measured     | Sentry OAuth                                        | Install if you use Sentry      |
| Issues             | Linear                    | hosted             | —                | not measured     | A Linear account (OAuth or API key)                 | Install if you use Linear      |
| Design             | Figma                     | hosted             | —                | not measured     | A Figma account; Dev or Full seat for higher limits | Install for design handoff     |
| Specs, docs        | Notion                    | hosted             | —                | not measured     | Notion OAuth                                        | Install if specs live there    |

Release dates are 2026; the reference servers carry their release date in the version. Tool and token counts are the defaults unless noted.

Counting the right fields matters more than I expected. For Playwright MCP, the full `tools/list` payload is 4,413 tokens, the number in our [Playwright CLI vs MCP comparison](/blog/playwright-mcp-vs-cli), and the model-facing part is 3,764; Context7's 1,058 in our [Context7 MCP guide](/blog/context7-mcp) is 985 counted this way. The gap is annotations. For servers that also ship output schemas or icons the gap gets large: the reference Memory server's payload is 2.6 times its model-facing size, GitHub's is 5.2 times, and Postgres MCP Pro's is 7.4 times. If a list quotes raw payload sizes, its ranking is partly a ranking of icons.

## Does tool count still matter? Your client changed the math in 2026

**Claude Code, Codex and Cursor no longer send every MCP schema on every request.** They send tool names up front and load a full definition only when the model goes looking for it. In those clients, the schema column above is what a tool costs once it's used, not what it costs every turn.

| Client      | What goes up front                                                        | Since                                                                         | Per-tool filter                                                                                                       |
| ----------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Claude Code | Tool names and server instructions; definitions load through `ToolSearch` | Default in current docs                                                       | A `permissions.deny` rule on a tool name or glob removes it from context; `alwaysLoad` exempts a server from deferral |
| Codex       | A `tool_search` tool; MCP tools stay deferred                             | [PR #29486](https://github.com/openai/codex/pull/29486), merged June 22, 2026 | `enabled_tools`, `disabled_tools`                                                                                     |
| Cursor      | Tool names; descriptions synced to files the agent reads on demand        | January 6, 2026                                                               | Toggle tools in the chat's tool list                                                                                  |

The [Claude Code MCP docs](https://code.claude.com/docs/en/mcp) put it plainly: "Only tool names and server instructions load at session start." Cursor's [dynamic context discovery post](https://cursor.com/blog/dynamic-context-discovery) reports that this cut total agent tokens by 46.9% in runs that called an MCP tool. Codex's [pull request](https://github.com/openai/codex/pull/29486) made deferral the default for every model and provider that supports tool search; before, it applied only behind a feature flag or once a session had at least 100 tools.

- **Claude Code behind a proxy loads everything up front.** The docs say Claude Code turns tool search off when `ANTHROPIC_BASE_URL` points to a non-first-party host. If you route Claude Code through a gateway, set `ENABLE_TOOL_SEARCH=true` (if the proxy forwards `tool_reference` blocks) or budget by the schema column.
- **Codex exposes tools directly when the model can't search.** The PR keeps the old behavior for "older or unsupported model/provider combinations".
- **Search can miss.** Codex has an [open issue (#21503)](https://github.com/openai/codex/issues/21503), filed in May 2026, where `tool_search` fails to return a deferred tool even when the query names it exactly, and the agent concludes the tool isn't installed.

So the decision rule splits in two. In a deferring client, the up-front cost of a server is its names and instructions: about 883 tokens for GitHub's default set, 147 for Context7, and roughly 2,800 for all 14 servers together (my estimate from the `mcp__server__tool` names Claude Code uses plus each server's instructions). There, what you're managing is how many similar tools the model has to search through. In any client that loads schemas up front, budget by the schema column.

## How to install an MCP server in Claude Code, Cursor and Codex

**Every server in this list is either a command (stdio) or a URL (remote), and each client has one form for each.** Cursor takes the same command, args or URL in `mcp.json`.

```bash
# Claude Code: local scope by default; --scope project writes .mcp.json, --scope user covers all projects
claude mcp add <name> -e KEY=value -- <command> [args...]
claude mcp add --transport http <name> <url> -H "Authorization: Bearer <token>"

# Codex: writes ~/.codex/config.toml, shared by the CLI and the IDE extension
codex mcp add <name> --env KEY=value -- <command> [args...]
codex mcp add <name> --url <url> --bearer-token-env-var <ENV_VAR>
codex mcp login <name>   # for servers that use OAuth
```

Cursor reads `~/.cursor/mcp.json` (global) and `.cursor/mcp.json` (project), and the project file wins on a name clash:

```json
{
	"mcpServers": {
		"local-server": { "command": "npx", "args": ["-y", "<package>"], "env": { "KEY": "value" } },
		"remote-server": { "url": "<url>", "headers": { "Authorization": "Bearer <token>" } }
	}
}
```

Sources: the [Claude Code MCP docs](https://code.claude.com/docs/en/mcp) and `claude mcp add --help` (v2.1.287), the [Codex MCP docs](https://developers.openai.com/codex/mcp) and `codex mcp add --help` (0.160.0), and [Cursor's MCP help page](https://cursor.com/help/customization/mcp).

To verify, run `/mcp` in Claude Code, which shows the tool count next to each connected server, or `/mcp` in the Codex TUI. In Cursor, open the Output panel and pick "MCP Logs". Two failures are documented by the projects themselves:

- **Codex times out on the first `npx` run.** Codex gives a server 10 seconds to start (`startup_timeout_sec`), and a cold `npx` download can take longer. The [Context7 setup docs](https://context7.com/docs/resources/all-clients) suggest raising the timeout when you see startup errors; set `startup_timeout_sec = 40` under the server's `[mcp_servers.<name>]` table.
- **`npx` fails on Windows.** The [MCP reference servers README](https://github.com/modelcontextprotocol/servers) says to wrap it: `"command": "cmd", "args": ["/c", "npx", "-y", "<package>"]`.

## Which MCP servers duplicate what your agent already has?

**Filesystem, Git, Fetch and Sequential Thinking repeat what Claude Code, Codex and Cursor already do.** They're the reference servers from the official [MCP servers repository](https://github.com/modelcontextprotocol/servers), which describes them as "reference implementations to demonstrate MCP features and SDK usage" and not production-ready.

The [Claude Code tools reference](https://code.claude.com/docs/en/tools-reference) lists Read, Edit, Write, Bash, WebFetch and WebSearch as built-ins. The [Codex CLI docs](https://learn.chatgpt.com/docs/codex/cli) say Codex will "inspect files, make edits, and run the tools already installed on your machine," and `codex --search` turns on live web search. Cursor's agent has [Instant Grep](https://cursor.com/docs/agent/tools/search) and a native browser.

- **Filesystem:** 14 tools, 1,665 tokens for file operations the agent's own tools already handle inside the project.
- **Git:** 12 tools, 1,119 tokens to wrap `git`, a CLI every model has seen countless times and can run through its shell.
- **Fetch:** 1 tool, 238 tokens. Its README carries a caution that it "can access local/internal IP addresses," so it can reach your intranet.
- **Sequential Thinking MCP:** 865 tokens for one tool that asks the model to write out its reasoning as tool calls. Coding models now expose reasoning directly; Codex's config has a `model_reasoning_effort` key for it.

Keep them for clients that lack these tools, such as a chat app that can't touch your disk.

Web search follows the same logic, which is why it has no entry here: Claude Code has WebSearch and Codex has `codex --search`. If you want a dedicated search server anyway, the [Firecrawl MCP README](https://github.com/firecrawl/firecrawl-mcp-server) says its hosted endpoint runs scrape, search and parse without an API key (rate-limited), while [Brave's server](https://github.com/brave/brave-search-mcp-server) requires a `BRAVE_API_KEY`.

The same test applies to our own **octofs** (6 tools, 2,163 tokens). In Claude Code, Codex or Cursor it overlaps with the built-in file and shell tools. It earns a slot when the files are on another machine: every file tool accepts `ssh://` URLs. Install with `claude mcp add octofs -- npx -y @muvon/octofs mcp`.

It also applies to browsers in Cursor. Cursor's [browser docs](https://cursor.com/docs/agent/tools/browser) say "You can use Browser without installing or configuring any external tools," so Playwright MCP is optional there.

## Best MCP server for library docs: Context7

**Context7 fetches current, version-specific library documentation into the prompt, and it's the cheapest useful server here: 2 tools, 985 tokens, plus 126 tokens of server instructions.** An agent that would otherwise guess at an API it saw in training gets the real one.

```bash
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
codex mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```

The hosted endpoint is `https://mcp.context7.com/mcp` with an `Authorization: Bearer` header. The [Context7 README](https://github.com/upstash/context7) recommends a free API key for higher rate limits; `tools/list` worked without one.

**Watch out:** the README says the library docs are community-contributed and that the API backend, parser and crawler are private, so you can't self-host the whole thing. It also offers a setup command, `npx ctx7 setup`, that authenticates via OAuth, generates an API key and installs a skill, letting you choose between a CLI-plus-skills mode with no MCP server and the MCP mode. **Best for:** any agent that writes against libraries newer than its training data. The full setup, including when the CLI mode wins, is in our [Context7 MCP guide](/blog/context7-mcp).

## Best MCP server for GitHub issues and pull requests: GitHub's official server

**GitHub's own server is the right GitHub server, and it's the most expensive one in this list: 46 tools and 11,114 tokens in its default configuration.** Filter it before you install it.

Its toolset flags have a measurable effect:

| GitHub MCP configuration (1.13.0)                   | Tools | Schema tokens |
| --------------------------------------------------- | ----- | ------------- |
| Default toolsets                                    | 46    | 11,114        |
| `--toolsets repos,issues,pull_requests --read-only` | 22    | 5,878         |
| `--tools` with six named tools                      | 6     | 2,411         |
| `--toolsets all`                                    | 91    | 23,043        |

On the hosted server, the same filters are headers. These lines combine GitHub's [Claude install guide](https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-claude.md) with the `X-MCP-Toolsets` and `X-MCP-Readonly` headers from its [remote server docs](https://github.com/github/github-mcp-server/blob/main/docs/remote-server.md):

```bash
claude mcp add --transport http github https://api.githubcopilot.com/mcp \
  -H "Authorization: Bearer YOUR_GITHUB_PAT" \
  -H "X-MCP-Toolsets: repos,issues,pull_requests" -H "X-MCP-Readonly: true"
```

For Codex, GitHub's [Codex guide](https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-codex.md) uses `codex mcp add github --url https://api.githubcopilot.com/mcp/ --bearer-token-env-var GITHUB_PAT_TOKEN`. Add the filter in `~/.codex/config.toml` under `[mcp_servers.github]` as `http_headers = { "X-MCP-Toolsets" = "repos,issues,pull_requests", "X-MCP-Readonly" = "true" }`; `http_headers` is a documented Codex key.

**Watch out:** check `--help` on the version you run. The [README](https://github.com/github/github-mcp-server) lists the default toolsets as context, repos, issues, pull_requests and users; the 1.13.0 binary's help adds `copilot`. Old guides still point at `@modelcontextprotocol/server-github`, which npm marks deprecated. Cursor's guide notes the hosted server needs a personal access token there, not OAuth. And the README says its lockdown mode, which hides public-repo content from authors without push access, "is **not** an authorization boundary". An issue body is still untrusted text going into your agent. **Best for:** agents that triage issues, review PRs or open them. If your agent has a shell and `gh` is installed, [MCP vs CLI vs Skills](/blog/mcp-vs-cli-vs-skills) covers when the CLI is cheaper.

**Linear (not measured)** runs as a hosted server with OAuth. The [Linear MCP docs](https://linear.app/docs/mcp) give `claude mcp add --transport http linear-server https://mcp.linear.app/mcp` and `codex mcp add linear --url https://mcp.linear.app/mcp`, plus a `https://mcp.linear.app/mcp/readonly` endpoint that "only ever exposes read tools."

## Best MCP servers for the browser: Playwright MCP and Chrome DevTools MCP

**Use Playwright MCP to drive pages and Chrome DevTools MCP to debug them.** Playwright MCP has 25 tools and 3,764 tokens; filtered to six read-and-click tools in the client, it drops to 1,126. Chrome DevTools MCP has 30 tools and 5,509 tokens, or 3 tools and 176 tokens with `--slim`.

```bash
claude mcp add playwright npx @playwright/mcp@latest
codex mcp add playwright -- npx @playwright/mcp@latest

claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest
codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
```

The Claude lines are verbatim from the [Playwright MCP README](https://github.com/microsoft/playwright-mcp) and Chrome DevTools' [client configuration guide](https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/client-configurations.md).

**Watch out:** the Playwright README says the server "is **not** a security boundary," and it points coding agents to Playwright CLI plus skills, which avoid loading large tool schemas into the context. The [Chrome DevTools MCP README](https://github.com/ChromeDevTools/chrome-devtools-mcp) says Google collects usage statistics by default (`--no-usage-statistics` turns it off) and that performance tools may send trace URLs to the CrUX API. **Best for:** Playwright when the agent tests flows in an app; Chrome DevTools when the question is why a page is slow or broken. The measured snapshot sizes and the CLI alternative are in [Playwright CLI vs MCP](/blog/playwright-mcp-vs-cli).

## Best MCP server for databases: MCP Toolbox for Databases

**Google's MCP Toolbox for Databases is the database server I'd install today: actively released, 16,549 GitHub stars, and one binary for Postgres, MySQL, SQL Server, SQLite and more.** Its Postgres configuration has 29 tools and 4,002 tokens. The `postgres/data` toolset keeps the 8 SQL and schema tools at 1,220.

```bash
claude mcp add postgres -e POSTGRES_HOST=localhost -e POSTGRES_DATABASE=app \
  -e POSTGRES_USER=agent_ro -e POSTGRES_PASSWORD=change-me \
  -- npx -y @toolbox-sdk/server --prebuilt=postgres/data --stdio
codex mcp add postgres --env POSTGRES_HOST=localhost --env POSTGRES_DATABASE=app \
  --env POSTGRES_USER=agent_ro --env POSTGRES_PASSWORD=change-me \
  -- npx -y @toolbox-sdk/server --prebuilt=postgres/data --stdio
```

The command and variables come from the [MCP Toolbox README](https://github.com/googleapis/mcp-toolbox) and its [Postgres prebuilt reference](https://github.com/googleapis/mcp-toolbox/blob/main/docs/en/integrations/postgres/prebuilt-configs/postgresql.md). I ran it against a scratch Postgres 14 on localhost.

**Watch out:** the [prebuilt configs page](https://mcp-toolbox.dev/documentation/configuration/prebuilt-configs/) warns these configs are "not secure enough for 'run time' use cases" and that tool annotations and client confirmations "are not a database security boundary." `execute_sql` runs whatever SQL the model writes, so give it a SELECT-only role. Our [Postgres MCP guide](/blog/postgres-mcp-guide) walks through that role and how to prove it holds.

**Skip, for now: Postgres MCP Pro.** It has index-tuning tools Toolbox doesn't (`analyze_workload_indexes`, `analyze_query_indexes`; 9 tools, 1,178 tokens), but its last PyPI release is 0.3.0 from May 16, 2025. The `uvx postgres-mcp` setup from its README crashed on start for me:

```text
ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer
```

The repo pinned `mcp<2.0` on August 16, 2026, but no release has shipped since. `uvx --with 'mcp<2' postgres-mcp` works. The original reference Postgres server is archived, and npm marks `@modelcontextprotocol/server-postgres` deprecated.

## Best MCP servers for code search: Serena and octocode

**Serena gives the agent symbol-level navigation and refactoring through language servers; octocode gives it semantic search over an index.** They overlap less than their names suggest.

**Serena MCP** (29,942 stars) finds symbols, references and implementations, and does renames, safe deletes and symbol-body replacements in 40+ languages. With `--context claude-code` it lists 21 tools and 5,013 tokens; `find_symbol` alone is 829. Install it with uv, then register it, per the [Serena README](https://github.com/oraios/serena) and [client docs](https://oraios.github.io/serena/02-usage/030_clients.html):

```bash
uv tool install -p 3.13 serena-agent && serena init
claude mcp add --scope user serena -- serena start-mcp-server --context claude-code --project-from-cwd
serena setup codex   # or add [mcp_servers.serena] with --context=codex to ~/.codex/config.toml
```

For Cursor, the docs recommend `--context ide`. **Watch out:** Serena's own Claude Code page says recent Claude Code and Opus updates "drastically reduced adherence" to Serena's tools, because Claude Code's built-in tool descriptions take "almost 16k tokens" and bias the model toward its own tools. They ship a system prompt and hooks to counter it. Claude Code also has a built-in LSP tool for jump-to-definition and find-references; the [tools reference](https://code.claude.com/docs/en/tools-reference) says it stays inactive until you install a code intelligence plugin. Try that first, and add Serena for its refactoring tools. Serena is GPL-3.0-or-later. **Best for:** large, typed codebases and cross-file refactors.

**octocode** is ours: 4 tools and 2,292 tokens covering semantic search, a code graph, ast-grep structural search and file signatures. `structural_search` is the heavy one at 1,261 tokens, because it documents pattern syntax. Semantic search needs `octocode index` in the project first; the graph tool builds lazily without an index. On our published local benchmark (fastembed, no reranker, 127 queries), Hit@5 is 0.732; the 0.992 Hit@10 figure on our site uses the full cloud stack with a Voyage reranker.

```bash
brew install muvon/tap/octocode
claude mcp add octocode -- octocode mcp --path /path/to/your/project
codex mcp add octocode -- octocode mcp --path /path/to/your/project
```

**Watch out:** it's a small project (478 stars), and the path is per project. **Best for:** "where do we handle X" questions in code you don't know the names of.

## Errors, design and specs: Sentry, Figma and Notion (not measured)

**If your team already uses Sentry, Figma or Notion, each one's hosted server is a one-line install.** I couldn't measure them: they need an account to connect, and I didn't use real accounts.

- **Sentry** pulls errors, traces and issues into the session. The [Sentry MCP docs](https://docs.sentry.io/product/sentry-mcp/) say "All connections use OAuth" and recommend scoping the URL to one project, which hides the discovery tools: `claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug}`. In Codex, run `codex mcp add sentry --url https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug}`, then `codex mcp login sentry`.
- **Figma** turns selected frames into code context and can write back to the canvas: `claude mcp add --transport http figma https://mcp.figma.com/mcp` or `codex mcp add figma --url https://mcp.figma.com/mcp`. The catch is limits. Figma's [rate-limit page](https://developers.figma.com/docs/figma-mcp-server/rate-limits-access/) caps View and Collab seats at 6 tool calls a month on most plans (20 on Starter), and Dev or Full seats at 200 a day on Professional. Only clients in Figma's catalog can connect.
- **Notion** reads and writes pages and databases: `claude mcp add --transport http notion https://mcp.notion.com/mcp`. For Codex, Notion's [setup page](https://developers.notion.com/guides/mcp/get-started-with-mcp) adds `url = "https://mcp.notion.com/mcp"` under `[mcp_servers.notion]` and then runs `codex mcp login notion`. Notion says its open-source local server "is no longer actively maintained," and `notion-search` is limited to 20 calls per 10 seconds.

## Best memory MCP server: octobrain or the reference Memory server

**For a simple fact store, the reference Memory server is cheap at 9 tools and 901 tokens. For search by meaning across sessions, octobrain (ours) costs 4 tools and 2,526 tokens.**

The reference server keeps a knowledge graph of entities and relations in a JSONL file. Its [README](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) puts that file in "the server directory" by default, which under `npx` is a package cache. Set the path yourself:

```bash
claude mcp add memory -e MEMORY_FILE_PATH=$HOME/.agent-memory.jsonl -- npx -y @modelcontextprotocol/server-memory
```

octobrain stores typed memories with hybrid BM25 and vector search, using a local fastembed model by default, so no API key is needed (`brew install muvon/tap/octobrain`, then `claude mcp add octobrain -- octobrain mcp`). `memorize` is its heaviest tool at 1,042 tokens. **Watch out:** the default embedding model takes about 125 MB of memory, and like octofs it's a small project. **Best for:** agents that should remember decisions from last week without you pasting them back in.

## What all 14 servers cost together, and how to keep the set small

**Installed at their defaults, all 14 servers expose 204 tools and 42,156 tokens of schemas.** In a client that loads them up front, that's about a fifth of a 200,000-token window before you type anything. Over a 40-request session, it's 1,686,240 tokens of definitions. Prompt caching makes the repeats cheaper but doesn't free the space. In a deferring client, the same 14 servers cost about 2,839 tokens per request in names and instructions, plus the definitions the model actually loads.

Filters are where the real savings are.

| Server         | Configuration                           | Tools  | Schema tokens |
| -------------- | --------------------------------------- | ------ | ------------- |
| Context7       | default                                 | 2      | 985           |
| GitHub         | `repos,issues,pull_requests`, read-only | 22     | 5,878         |
| Playwright MCP | six tools, filtered in the client       | 6      | 1,126         |
| MCP Toolbox    | `--prebuilt=postgres/data`              | 8      | 1,220         |
| **Total**      |                                         | **38** | **9,209**     |

The same four servers at their defaults come to 19,865 tokens, so filtering cuts 54%. [AUTHOR: is this close to the set you run day to day? If not, which servers do you keep on, and why?]

The client-side filter in Codex looks like this, from the `enabled_tools` key in the [Codex MCP docs](https://developers.openai.com/codex/mcp):

```toml
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
enabled_tools = ["browser_navigate", "browser_snapshot", "browser_find", "browser_click", "browser_type", "browser_take_screenshot"]
```

- **Install by job, not by list.** If you can't name the task you'd run this week that needs the server, skip it.
- **Filter at the server first.** GitHub `--toolsets` or `X-MCP-Toolsets`, Toolbox `--prebuilt=<db>/data`, Chrome DevTools `--slim`. Server filters work in every client.
- **Prefer a CLI the model already knows.** `git`, `gh` and `psql` through the shell cost nothing until used. [MCP vs CLI vs Skills](/blog/mcp-vs-cli-vs-skills) has the decision table.

## How Octomind loads MCP servers

**Octomind starts a capability's MCP servers only when a request needs them, and filters tools at the server entry.** Octomind is ours, and so are octocode, octofs and octobrain above. It's an MCP client for stdio and Streamable HTTP servers, with OAuth support. A filtered server entry looks like this; the server only becomes visible once `auto_bind` names a role or your role references it:

```toml
[[mcp.servers]]
name = "github"
type = "http"
url = "https://api.githubcopilot.com/mcp/"
headers = { Authorization = "Bearer {{ENV:GITHUB_PAT}}" }
timeout_seconds = 30
tools = ["get_file_contents", "issue_read", "list_issues", "pull_request_read"]
auto_bind = ["developer:general"]
```

The `tools` list also takes wildcards such as `["get_*"]`. Servers bundled as capabilities activate per message: a local embedding model matches your request against each capability's trigger phrases, with no LLM in that step. At most four capabilities stay active, and the least recently used one is evicted. A tool result is capped at 20,000 tokens by default (`mcp_response_tokens_threshold`). The trade-off: when two capabilities score too close, Octomind abstains, and the agent has to enable one explicitly through the `capability` tool. Servers you declare statically in a role stay loaded for the whole session.

## Where these numbers and servers fall short

**The measurements are a one-day snapshot with known blind spots, and none of these servers protects you from what you connect it to.**

- **The tokenizer is OpenAI's.** `o200k_base` counts differ from Claude's. Use the numbers to compare servers, not to predict a bill.
- **It's one day's snapshot.** I measured on October 2, 2026. Playwright MCP alone shipped 0.0.83 four days earlier; re-run `tools/list` on the versions you install.
- **GitHub was measured locally with a placeholder token.** The README says classic personal access tokens hide tools their scopes don't cover, and the hosted server may differ from the 1.13.0 binary.
- **The deferred cost is an estimate.** I computed names and instructions from what the client docs say they send, not from traces of Claude Code, Codex or Cursor themselves.
- **None of these servers is a sandbox.** Playwright says so, GitHub says lockdown mode isn't an authorization boundary, Toolbox says its prebuilt configs aren't for untrusted users, and Fetch can reach internal IPs. Scope the credentials, not the prompt.
- **Octomind's routing can abstain.** Trigger matching is deterministic, but a vague request may activate nothing, and you'll need to name the capability.

**[Get Octomind](https://octomind.run)** — an open-source agent runtime that starts MCP servers when a request needs them.

## FAQ

### Which are the best MCP servers for Claude Code?

Start with Context7 for library docs, GitHub's official server filtered with `X-MCP-Toolsets`, and Playwright MCP or Chrome DevTools MCP for browser work. Add MCP Toolbox for Databases or Serena when you have that job every week. Skip Filesystem, Git and Fetch, because Claude Code already ships Read, Edit, Write, Bash and WebFetch. Claude Code tool search is on by default, so an idle server costs its tool names, not its full schemas.

### What are the best MCP servers for Cursor?

Context7 and GitHub's official server are the first two, installed through `~/.cursor/mcp.json` or a project's `.cursor/mcp.json`. Cursor already has a native browser and Instant Grep, so a browser or file server is optional. Add MCP Toolbox for Databases if the agent works with a database, and Figma if you hand off designs; a Dev or Full seat gets far higher call limits than View or Collab.

### How many MCP servers is too many?

In a client that loads every schema, count tokens: the 14 servers I measured add 42,156 tokens to every request, about a fifth of a 200,000-token window. Claude Code, Codex and Cursor defer definitions, so the same 14 cost roughly 2,800 tokens up front, and the risk shifts to the model finding the right tool among 204. Three to six servers you use every week, filtered to the tools you need, is a sensible ceiling.

### Are MCP servers free?

The local servers in this list are open source and free to run. The hosted ones (Sentry, Linear, Figma, Notion) need an account with that vendor, and their limits follow your plan: Figma caps MCP calls by seat type. Context7 recommends a free API key for higher rate limits. Either way, every schema the model reads is billed as input tokens by your model provider.
