MCP servers: what they are and how to connect one
The short version: MCP (Model Context Protocol) is an open protocol an AI application uses to plug in external tools and data. An MCP server is a program that advertises a set of tools ("search the web", "generate an image", "read a GitHub issue"), and the client — Claude, Cursor, LM Studio, Codex, OpenCode — shows them to the model and runs the calls when the model decides a tool is needed. Connect it once and the model can do more than it could. And a model that calls tools by itself, step after step, is exactly what an AI agent is.
What MCP is, in plain words
A language model on its own can do exactly one thing: continue text. It does not browse the web, does not see your files and does not draw pictures. All of that comes from tools — and before MCP every application wired them up its own way: ChatGPT had its plugins, Cursor had its own, every IDE had another. The author of a tool wrote the integration again for each one.
MCP is an agreement on a common socket. Anthropic published the protocol in November 2024, and over 2025 practically every notable client adopted it — from Claude and Cursor to OpenAI's Codex and LM Studio. That is why the USB-C comparison fits here: a server is written once and plugs into any client that speaks MCP.
How it works, step by step
- The client connects to the server and asks what tools it has. The server answers with a list: a name, a description and a parameter schema in JSON Schema.
- The client shows that list to the model along with your message. The model reads the descriptions the same way it reads any other text.
- The model decides to call a tool — say
web-searchwith the query "EUR rate today" — and fills in the parameters from the schema. - The client sends the call to the server (often asking you to confirm first), the server does the work and returns a result.
- The result goes back to the model, which continues its answer with the new data — or calls the next tool.
Besides tools, the protocol also describes resources — data the client can pull into context — and prompts, ready-made request templates. In practice, though, "connect an MCP server" almost always means the tools.
How MCP differs from an API
A common question with a simple answer: an API is written for a programmer, MCP for a model. Under the hood an MCP server usually is a wrapper around some API, but on the outside it adds what a model needs in order to use that API on its own: a description, in words, of when and why to call each function — and one single way to do it.
| A normal API | An MCP server | |
|---|---|---|
| Who calls it | Your code | The model — it decides when a tool is needed |
| How you learn what it can do | Read the documentation | The client asks the server; the tool list arrives by itself |
| Integration | One per service, written by you | One per protocol: any MCP client connects any MCP server |
| What it needs from you | Writing code | Adding an address or a command to the client's settings |
Local and remote MCP servers
Servers come in two kinds, and that decides how you connect them. A local one runs on your own machine as a process — usually via npx …, uvx … or Docker — and talks to the client over standard input/output (stdio). A remote one runs on someone else's server and is reached by URL over HTTP (the Streamable HTTP transport).
| Local (stdio) | Remote (HTTP) | |
|---|---|---|
| What you write down | A launch command | A URL |
| What your machine needs | Node.js, Python or Docker | Nothing |
| Sign-in | Keys in environment variables | OAuth, or a key in a header |
| Access to your files | Yes — that is its strength | No — only what you passed in |
| Works in Claude on the web | No | Yes, as a custom connector |
| When to pick it | Files, a local browser, a database on your machine | Search, generation, third-party services — anything that lives in the cloud anyway |
The rule of thumb: if the tool needs your files or your machine, go local. If it goes to the cloud regardless (search, image generation, SaaS), remote is simpler — nothing to install or update, and one URL works on every device. No ready-made server for what you need? Writing one is not hard: how to build an MCP server in Python and TypeScript.
How to connect MCP: instructions per client
The mechanics are the same everywhere — an address or a command plus a way to sign in — but where you type it differs per client. Step-by-step walkthroughs:
| Client | Where it is configured | Sign-in to a remote server |
|---|---|---|
| Claude and Claude Code | Connectors in settings; claude mcp add or .mcp.json | OAuth; in Claude Code also a key in a header |
| Cursor | ~/.cursor/mcp.json or .cursor/mcp.json | OAuth or a key in headers |
| LM Studio | mcp.json on the Program tab | A key in headers |
| Codex | ~/.codex/config.toml or codex mcp add | A key from an environment variable, or codex mcp login |
| OpenCode | The mcp block in opencode.json | A key in headers or opencode mcp auth |
A worked example: Twelver's remote MCP servers
So as not to stay abstract, here is what this looks like on a live server. Twelver serves each set of tools as its own remote MCP server at a URL like https://twelver.app/api/mcp/v1/image-generation. There is nothing to install: you paste the URL into the client and sign in with OAuth or a key. The model stays whichever one the client uses — the server gives it hands, not a head.
By category: image generation — 4, video generation — 8, music, speech and transcription — 6, search — 2, documents, code, sites and slides — 5, other — 1. The scenarios people ask for most have chapters of their own: image and video generation in Claude and web search over MCP. Tick what you need — the URLs and a ready mcp.json are assembled for you:
No keys: paste the URL into your client and sign in — Claude, Cursor and any other OAuth client.
Copy the connector URL
Paste it into your MCP client
Sign in via OAuth — done
Build your server
Check the tools — URLs and config update themselves.
Connector URLs
Image Generation (Nano Banana)
https://twelver.ru/api/mcp/v1/image-generationWeb Search
https://twelver.ru/api/mcp/v1/web-search{
"mcpServers": {
"twelver-image-generation": {
"url": "https://twelver.ru/api/mcp/v1/image-generation"
},
"twelver-web-search": {
"url": "https://twelver.ru/api/mcp/v1/web-search"
}
}
}The same mcp.json works in LM Studio, Windsurf, Cline, VS Code and any client that reads an mcp.json.
Security: what to check before you connect
An MCP server receives whatever the model passes it, and the model reads the server's answer as trusted text. A few simple rules follow from that:
- Only connect servers you trust. A server running someone else's code can return instructions for the model inside its answer — this is called prompt injection, and the model will not always tell them apart from yours.
- Do not turn off call confirmation for tools that change something or spend money. For reading and search, auto-approval is usually safe.
- Keys go in environment variables, not in git. Project-level
.mcp.jsonand.cursor/mcp.jsonare often committed with the code. - Fewer servers is better. Every tool's description is sent to the model on every request: twenty servers connected "just in case" eat the context window and confuse the model. A shortlist of what is actually worth having is in the best MCP servers.
What MCP costs
The protocol itself is free and open, and so are many servers — especially local ones. What you pay for is whatever sits behind the server: search, image and video generation consume a provider's resources.
At Twelver all 26 servers draw on one shared token balance — the same one the chat on the site uses. A new account gets 250,000 tokens to test the wiring, and after that there is a plan to pick:
| Plan | Per month | Tokens per month |
|---|---|---|
| Basic | $8 | 6.4M |
| Pro | $20 | 16M |
| Premium | $49 | 39.2M |
Which engines require PRO
Frequently asked questions
What is MCP, in plain words?
What is an MCP server?
How is MCP different from an API?
How do I connect an MCP server?
Do I need to install anything for MCP?
Does MCP only work with Claude?
Is it safe to connect someone else's MCP server?
Contents
- 1.MCP in Claude: connectors, Claude Desktop and Claude Code
- 2.MCP in LM Studio: web search and image generation for a local model
- 3.MCP in OpenCode: remote servers in opencode.json
- 4.MCP in Codex: config.toml, keys and timeouts
- 5.MCP in Cursor: mcp.json, OAuth and keys
- 6.The best MCP servers in 2026: free and remote
- 7.Image and video generation in Claude via MCP
- 8.MCP for web search: search for Claude, Cursor and local models
- 9.AI agents and MCP: giving an agent tools
- 10.How to build an MCP server: Python and TypeScript examples
Try it yourself
Everything in this guide runs inside Twelver
One chat for text, images, video, music and voice — no separate services or subscriptions.
Open Twelver chat