How MCP Servers Work for Developers: No-Fluff Guide
Part of the MCP guide. Start with Best MCP Servers for Developers: Top Picks for 2026
Suppose you ask your coding assistant to find an existing price formatter before writing another one. Somewhere between that question and the answer, the application has to find a suitable tool, send it arguments, apply its execution controls, and put the result back where the model can use it.
MCP gives applications a shared protocol for that exchange. I want a result I can inspect: one that names a function, points me to its definition, and comes from a graph whose branch I know.
What an MCP server does
MCP is the Model Context Protocol, an open standard for connecting AI applications to external systems.
Think about maintaining integrations across several AI applications and several internal services. With a custom connector for each pairing, you have an N × M problem, where adding another application means revisiting every service connection, and changing a service can mean updating several connectors.
The shared interface lets compatible applications reuse a server integration.
Anthropic's MCP engineering article describes that integration problem.
The host, client and server
These names describe different responsibilities in the MCP architecture:
| Component | Responsibility |
|---|---|
| Host | The AI application, such as Claude Code, that manages MCP clients. |
| Client | The component inside the host that communicates with one server. |
| Server | The program that exposes tools or context to the client. |
The host creates a client for each server it connects to. The model works through the host; it doesn't become the MCP client itself.
Tools and resources are different from transport
A tool is a callable operation. It has a name, a description, an input schema and a result, so the client can discover what it does before requesting execution. The tool specification defines tools/list for discovery and tools/call for invocation.
A resource is data addressed by a URI. The host decides how to use it as context.
Servers can also provide reusable prompt templates. A database integration might expose a schema as a resource, offer a query tool, supply a prompt for reviewing a migration, and let the host use the parts it supports.
Transport answers a separate question: how do the messages travel?
-
stdio: The client launches a subprocess and exchanges messages through its standard input and output.
-
Streamable HTTP: Messages go to an MCP endpoint over HTTP, which fits a hosted service.
Those are the standard transport bindings.
The older HTTP+SSE transport is deprecated. Its replacement, Streamable HTTP, can still stream responses using SSE, so seeing that abbreviation in implementation details doesn't tell you the transport version, and it's worth checking the server's connection instructions.
npx can run a package's executable, including a local server process. It's a package runner, rather than an MCP transport.
npm may fetch a missing package into its cache before executing it. For a stdio setup, inspect the package you're about to run, its arguments, the directories it can access, and any credentials you give it.
What happens during a tool call
At the protocol level, client and server exchange JSON-RPC messages, and the current specification uses server/discover for capability discovery, while earlier revisions use an initialization handshake, so traces can differ across versions.
For a tool request, the sequence is:
-
The client discovers tool definitions with
tools/list. -
The host makes relevant tools available to the model.
-
The model requests a tool with arguments, and the host applies its execution controls.
-
The client sends
tools/call; the server checks the input and runs the operation. -
The server returns text or structured data, and the host supplies it to the model for its next step.
The tool schema constrains the input's shape. It doesn't establish whether the underlying data is current.
I care about that distinction when reviewing an integration, because a call can be valid without describing my checkout, and I still need to check its answer against the source, especially before an edit.
MCP and function calling work together
Function calling lets a model request an operation with structured arguments.
For a user-defined tool, the application executes the request and sends the result back.
MCP supplies a standard interface between that application and an external server. The application can discover a server's tools, expose them to its model, route a requested call through MCP, and return the result to the conversation.
Your existing API can remain behind the server, even if several AI applications use it, because MCP defines a shared way to discover and call the capability, with the model interaction still managed by each application.
Connect a server in Claude Code
I build Pharaoh, a hosted MCP server for questions about TypeScript, JavaScript, Python, C and C++ repositories. It maps repo structure into a graph and exposes queries such as search_functions.
Install the GitHub App on the account or organization that owns the repository first.
With Claude Code installed, add the hosted endpoint from your terminal using the documented HTTP syntax:
claude mcp add --transport http pharaoh https://mcp.pharaoh.so/mcp
claude mcp list
claude mcp get pharaoh
In a Claude Code session, run /mcp, inspect the connection, and complete browser authentication with GitHub. The list and get commands help you check the configured server; a successful sign-in is a separate step from receiving a useful answer.
npx @pharaoh-so/mcp is the route our Claude Code connection guide documents.
Run it in a terminal, sign in with GitHub, and it registers Pharaoh and its plugin commands for Claude Code.
claude mcp add, above, is the generic route for any remote HTTP server; for Pharaoh it adds the server without the plugin commands.
Inspect an actual function-search result
With the relevant repository connected, ask:
Use search_functions to look for formatPrice in cal.diy.
Show the matching signature and source location before proposing new code.
On Pharaoh-so/cal.diy, revision 54343aa6, a captured search_functions call searched for formatPrice, with a limit of eight results. The first match is reproduced unchanged:
- const formatPrice = (price: number, currency: string | undefined, locale = "en") => ... [exported, complexity: 3]
packages/lib/currencyConversions.ts:60-71 (lib)
Now there's a file to open. Check that implementation against the behavior you need before reusing it, compare its signature with the proposed helper, and remember the result describes the default branch as last mapped, especially if your checkout has moved on.
That is one step in checking for existing functions before adding duplicates.
For module relationships, see an MCP server that answers code-structure questions.
Check freshness and permissions before relying on the answer
Pharaoh's graph describes the default branch. For a live repository, a push to its default branch triggers a remap (every repository is live during the trial and on Pro), and pharaoh_account can request a refresh before the next push. Another branch or an uncommitted edit won't be represented in that graph.
For a refactor on your working branch, use the graph to identify places to inspect, then read the current files, check the changes you've made since the mapped revision, and run the tests relevant to your edit.
The GitHub App reads authorized repositories, with Checks write as its only write permission. It can publish check results; it can't push commits or change source files.
Mapping uses a temporary clone that is deleted when the job ends, including on failure. The stored graph holds names, paths, signatures, relationships and short doc comments, with source-file and function bodies excluded. The security documentation explains the boundary.
For any server you add, I would check the account it can access, the operations it exposes, the revision or timestamp behind its answers, and a result you can verify yourself. Start with one question whose answer you already know.
To try this with your own repository, set up Pharaoh, choose a function you already know, ask your agent to find it, and open the returned location before requesting an edit.