What is an MCP server? Setup for coding agents

What is an MCP server and how do you connect one to coding agents? stdio and HTTP servers, token cost, secrets and the right scope, explained step by step.

Solviera Teknoloji 6 min read Türkçe oku

What is an MCP server? In short, a small program that gives an AI agent new abilities. The Model Context Protocol (MCP) is an open protocol: a server uses it to offer an agent tools, ready-made prompts and readable resources. The agent calls those tools to open a browser, read GitHub issues, search Sentry errors or query a database.

This post explains how MCP works, which servers are worth adding, and the mistakes people make when connecting them to coding agents.

What is an MCP server and how does it work?

An MCP server can offer three kinds of things:

  • Tools: functions the agent can call, such as browser_navigate or search_issues.
  • Prompts: templates the server prepares for the agent.
  • Resources: data the agent can read, such as a file or a record.

When an agent starts, it connects to its servers and fetches their tool lists. Those lists go into the model’s context, and the model calls a tool when it needs it.

Connection types

TypeWhere it runsExampleAuthorization
stdioOn your computer, as a commandnpx -y @playwright/mcp@latestEnvironment variables if needed
HTTPAt a remote addresshttps://mcp.sentry.dev/mcpToken or OAuth
SSEAt a remote address, as an event streamCommon on older serversToken or OAuth

MCP servers worth adding

The servers most used with coding agents fall into a few groups. Some of the 20 ready-made servers in AgentVera’s catalog:

  • Browser: Playwright (open pages, click, fill forms, take screenshots), Chrome DevTools (console, network requests, performance traces).
  • Docs: Context7 (current, version-specific library docs), Cloudflare Docs.
  • Development: GitHub (issues, pull requests, code search), Git (local log, diff, commit), Sentry (errors and stack traces).
  • Mobile: Mobile MCP, MobileBuildMCP, iOS Simulator, Firebase.
  • Data and memory: Filesystem, Memory, Fetch, Sequential Thinking, Supabase.
  • Product and team: Linear, Notion, Stripe.
  • Design: Figma (the Dev Mode MCP server in the desktop app).

Adding MCP servers to each CLI

Every agent has its own way. In Claude Code you can add one from the command line:

claude mcp add playwright -- npx -y @playwright/mcp@latest

In Codex, servers are defined in ~/.codex/config.toml:

[mcp_servers.playwright]
command = "npx"
args = ["-y", "@playwright/mcp@latest"]

The catch: you define the same server again in every tool, and secrets end up in plain-text config files. With several agents the list drifts apart.

Managing MCP servers in one place

AgentVera’s MCP manager keeps servers in one list and attaches them when an agent starts:

  1. On the MCP page, press + to open the catalog and pick a server, or enter your own command or address.
  2. Decide whether every agent gets it or only the ones you pick. Limit it to one project if you like.
  3. Press Test connection to list the server’s tools, prompts and resources.
  4. Restart the agent; the change applies to the new session.

Secret environment variables and header tokens are kept in your operating system’s keychain. Servers that need OAuth are authorized on first use. Servers from Claude Code’s and Codex’s own settings are listed with their health; you can import them into AgentVera or write AgentVera’s servers back to the CLI configs.

These servers don’t only reach Claude Code and Codex. Other tools that take MCP get them too: opencode, Copilot, Qwen Code, Goose and Amp.

Count the token cost

The hidden price of MCP is context. Each server’s tool definitions go into the agent’s context and are re-read on every turn. A server with ten tools takes up room every turn, even if the agent never calls it.

AgentVera’s connection test shows the approximate tokens each tool adds to the agent’s context. That lets you:

  • Give expensive but rarely used servers only to the agent that needs them.
  • Pick the lighter of two servers that do the same job.
  • Keep a lean agent free of tools it won’t use.

For other ways to shrink context, see cutting Claude Code token usage.

A shared board for agents

AgentVera adds an MCP server called agentvera-board to every project automatically. It’s a notice board shared by the project’s agents and you. Agents use board_read, board_post and board_update to leave notes, decisions, todos, findings and file/module entries, and to read what the others wrote. You post and tick off todos from the Board tab in the right panel.

For parallel agents, this is the simple answer to “how will Tester know the decision Architect made?”

Example: testing in a browser with Playwright

The best example of what MCP buys you is the browser. An agent with the Playwright MCP server can:

  • Open your app on its local address.
  • Take a snapshot of the page’s accessibility tree.
  • Click buttons and fill in forms.
  • Take a screenshot and report what it sees.

So the agent can check “does the save button on the settings page work?” by itself. AgentVera manages a headless Chrome with its own profile for this. Agents in “AgentVera browser” mode use it through Playwright MCP, and you watch the tabs live on the Browser page and step in when you want. See the agent browser page for details.

Which server for which agent?

Handing out servers by role instead of giving every server to every agent improves both context and security:

Agent roleSuitable serversWhy
Frontend developerPlaywright, Chrome DevTools, FigmaSees the page, reads the design
Backend developerContext7, Supabase, GitCurrent docs, database, repo history
DebuggerSentry, GitHubStack traces and related issues
Product-mindedLinear, NotionReads and updates tasks and docs

Limiting a server to one project helps too. A server connected to one client’s Supabase project doesn’t need to be visible to agents in other projects.

Security notes

MCP servers give agents access to real systems. So:

  • Be careful with servers that can write. An agent that can apply database migrations can change data with one wrong step.
  • Don’t keep tokens in plain-text files. Use the keychain or environment variables.
  • Don’t run servers you don’t know. stdio servers run as code on your computer.
  • Don’t skip the connection test. It shows what the server actually offers and how much context it costs.

Adding your own MCP server

You can add servers that aren’t in the catalog too. You need two things:

  • For stdio: the command and arguments to run, plus any environment variables.
  • For HTTP or SSE: the server address and any authorization headers.

Test the connection after adding it. If the test fails, check the server output (stderr); a missing environment variable or a runtime that isn’t installed (such as uvx) is usually the cause.

Checklist

  • Does this server actually help this agent?
  • Did you test its token cost?
  • Are secrets in the keychain rather than a plain-text file?
  • Should the server be limited to one project?
  • Did you restart the agent after adding it?

Wrapping up

MCP servers take coding agents beyond the terminal: browsers, issue trackers, error monitoring and design files come within reach. The price is context cost and secret management. Managing servers in one place, narrowing their scope and measuring their cost is how you keep that balance.

You can try AgentVera’s MCP manager on the free plan, and see which tools take MCP on the Claude Code page and the other agent pages.

Questions

What is an MCP server?

A small program that speaks the Model Context Protocol and offers an AI agent tools, prompts and resources. By calling those tools the agent can open a browser, read issues or query a database.

What’s the difference between stdio and HTTP servers?

A stdio server runs as a command on your computer (for example through npx). An HTTP server runs at a remote address and usually needs OAuth or a token.

Do MCP servers cost tokens?

Yes. Each server’s tool definitions go into the agent’s context and are re-read on every turn. Not connecting servers you don’t use lowers the cost.

Which agents support MCP?

In AgentVera, besides Claude Code and Codex, opencode, Copilot, Qwen Code, Goose and Amp also receive AgentVera’s MCP servers at launch.

Bring your agents to one desk.

Download AgentVera for free; your installed CLIs are ready to go.

More posts