What MCP is
Before MCP, every AI app wrote its own integration for every service: a GitHub plugin for one editor, a different one for the next. MCP replaces that with one protocol. A service writes an MCP server; any MCP client can discover and call what it offers.
It is often described as a USB-C port for AI applications: a standard plug, not a particular device.
MCP sits between the model and the outside world, not inside the model. The client, an editor or chat app, holds the conversation and decides which servers are connected. The model sees the tool list, picks a tool and arguments, the client sends the call to the server, and the result comes back into the conversation.
How it works
Messages are JSON-RPC 2.0. A client connects to a server, the two negotiate capabilities, and the client lists what the server exposes. The three main primitives are:
- Tools
- Functions the model can call, each with a name, description and JSON Schema for its arguments. Example: search a knowledge base.
- Resources
- Data the client can read, addressed by URI, such as a file or a record.
- Prompts
- Reusable prompt templates the server offers to users.
Servers run either locally, spoken to over stdio (the client launches the process), or remotely over Streamable HTTP. Tool descriptions matter a lot: the model decides when to call a tool by reading them.
Pitfalls and security
- Too many tools. Every tool description goes into the model's context. Dozens of overlapping tools cost tokens and confuse tool choice.
- Vague descriptions. If a description does not say when to use a tool, the model will guess. Good ones say what it does, when to reach for it, and what to call next.
- Trusting untrusted servers. An MCP server runs with whatever access you give it. Install servers you trust, and scope API keys narrowly.
- Prompt injection through results. Content a tool returns, such as a scraped web page, can contain instructions. Treat tool output as data.
- Long-running work. Tools that start a job should return quickly with an id and a status tool to poll, not block.
The most reliable pattern for an agent workflow is small and explicit: a tool to start work, a tool to check its status, and a tool to read or search the result.
How SarvCrawl handles it
SarvCrawl ships an MCP server with 21 tools for Claude Code, Cursor and VS Code, plus a hosted MCP endpoint. The tools cover creating and managing knowledge bases, scraping, crawling, web search into a knowledge base, job status, listing pages and searching. Each description tells the model when to use it, and job tools tell it to poll status before searching, so an agent can crawl a docs site and then answer questions from it without glue code.
Setup for each editor is in the MCP server docs, and agent workflows are on AI and MCP use cases.
Frequently asked questions
Who created the Model Context Protocol?
Anthropic introduced MCP as an open protocol in November 2024. It has since been adopted by many AI clients and tool providers.
What is the difference between an MCP server and an API?
An MCP server usually wraps an API. It adds a standard way for AI clients to discover the available operations, with descriptions and argument schemas written for a model to read.
Does MCP work only with Claude?
No. It is an open protocol, and clients include editors such as Cursor and VS Code as well as Claude's own apps and Claude Code.
Is a local or remote MCP server better?
Local stdio servers are simple to run and keep credentials on your machine. Remote HTTP servers need no local install and suit shared or hosted use. Both expose the same tools.