MCP servers: what they are and how to connect one

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

  1. 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.
  2. 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.
  3. The model decides to call a tool — say web-search with the query "EUR rate today" — and fills in the parameters from the schema.
  4. The client sends the call to the server (often asking you to confirm first), the server does the work and returns a result.
  5. 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 APIAn MCP server
Who calls itYour codeThe model — it decides when a tool is needed
How you learn what it can doRead the documentationThe client asks the server; the tool list arrives by itself
IntegrationOne per service, written by youOne per protocol: any MCP client connects any MCP server
What it needs from youWriting codeAdding 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 downA launch commandA URL
What your machine needsNode.js, Python or DockerNothing
Sign-inKeys in environment variablesOAuth, or a key in a header
Access to your filesYes — that is its strengthNo — only what you passed in
Works in Claude on the webNoYes, as a custom connector
When to pick itFiles, a local browser, a database on your machineSearch, 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:

ClientWhere it is configuredSign-in to a remote server
Claude and Claude CodeConnectors in settings; claude mcp add or .mcp.jsonOAuth; in Claude Code also a key in a header
Cursor~/.cursor/mcp.json or .cursor/mcp.jsonOAuth or a key in headers
LM Studiomcp.json on the Program tabA key in headers
Codex~/.codex/config.toml or codex mcp addA key from an environment variable, or codex mcp login
OpenCodeThe mcp block in opencode.jsonA key in headers or opencode mcp auth
Checked against each client's own documentation on 17 September 2026. Interfaces move — if a menu item is named differently, look for the MCP or Connectors section.

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.

26sets of tools
98tools inside them
0programs to install

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.

1

Copy the connector URL

2

Paste it into your MCP client

3

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-generation

Web 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.json and .cursor/mcp.json are 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:

PlanPer monthTokens per month
Basic$86.4M
Pro$2016M
Premium$4939.2M
Figures as of 6 September 2026; current prices are on the pricing page.

Which engines require PRO

The Seedream, Ideogram, Grok (images and video), Veo, Wan sets are available on the PRO plan and above. Web search, Nano Banana and video through Seedance, Hailuo and HappyHorse work on any plan.

Frequently asked questions

What is MCP, in plain words?
MCP (Model Context Protocol) is a common standard AI applications use to plug in external tools: search, files, databases, image generation. A tool is packaged as an MCP server, and that server can be connected to any client that supports the protocol — Claude, Cursor, LM Studio, Codex, OpenCode and others.
What is an MCP server?
A program that, over the MCP protocol, tells a client the list of tools it has — names, descriptions and parameters — and executes calls to them. A server is either local (launched on your machine by a command) or remote (reached by URL over HTTP).
How is MCP different from an API?
An API is called by your code; the tools on an MCP server are called by the model itself, when it decides it needs them. An MCP server is usually a wrapper around an API, but with descriptions a model can read and one shared way to connect: the same server works in any MCP client with no separate integration.
How do I connect an MCP server?
For a remote server — add its URL in the client's settings and sign in with OAuth, or put a key in the Authorization header. For a local one — write the launch command (for example npx …) into the client's config. Step by step: Claude, Cursor, LM Studio, Codex, OpenCode.
Do I need to install anything for MCP?
For local servers — usually Node.js, Python or Docker, depending on what the server is written in. For remote ones — nothing: a client that supports MCP over HTTP and the server URL are enough.
Does MCP only work with Claude?
No. Anthropic invented the protocol, but it is open, and Cursor, Codex, OpenCode, LM Studio, VS Code, Windsurf, Cline and many other clients support it. The same server connects to any of them.
Is it safe to connect someone else's MCP server?
As safe as your trust in its author. The server sees the parameters of every call, and the model reads its answers as text and may act on instructions hidden inside them. Connect servers from sources you trust, keep keys in environment variables, and do not switch off confirmation for tools that change things.

Contents

  1. 1.MCP in Claude: connectors, Claude Desktop and Claude Code
  2. 2.MCP in LM Studio: web search and image generation for a local model
  3. 3.MCP in OpenCode: remote servers in opencode.json
  4. 4.MCP in Codex: config.toml, keys and timeouts
  5. 5.MCP in Cursor: mcp.json, OAuth and keys
  6. 6.The best MCP servers in 2026: free and remote
  7. 7.Image and video generation in Claude via MCP
  8. 8.MCP for web search: search for Claude, Cursor and local models
  9. 9.AI agents and MCP: giving an agent tools
  10. 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
Rate your experience