MCP server
A program that offers tools, resources or prompts to AI applications over the Model Context Protocol, locally over stdiostdio transport: The MCP transport in which the client starts the server as a child process and exchanges newline-delimited JSON-RPC messages over the process's standard input and output. or remotely over HTTP.
A server wraps one system, such as a file system, a database, a ticket tracker or a search API, and describes what it offers in a form any MCP clientMCP client: The part of an AI application that holds one connection to one MCP server: it negotiates the protocol version and capabilities, then sends that server's requests and receives its replies. understands. The client asks for the list (tools/list, resources/list, prompts/list) and then calls or reads what it needs.
Local and remote servers
- Local (stdio). The client starts the server as a child process and talks to it over standard input and output. Simple, and only that client can reach it, but the server runs with the user's own rights.
- Remote (Streamable HTTP). The server runs as a web service, often for many users. It needs authentication; the MCP authorization spec builds on OAuth 2.1 for this.
Example
A Postgres MCP server might expose a read-only query tool, a resource per table schema, and a prompt "explain this query". An agent connected to it can answer questions about the data without any database code in the agent itself.
Risks
A server is code you run or trust. The MCP security best practices warn that local servers can execute arbitrary commands with the client's privileges, and recommend showing the exact start command, asking for consent and sandboxing the process. A remote server's tool descriptions and results reach your model as text, which opens the door to tool poisoningTool poisoning: An attack that hides instructions for the model in a tool's description, schema or results, so the agent follows them while the user sees only a harmless tool. and indirect prompt injectionIndirect prompt injection: Prompt injection in which the attacker's instructions hide in content the model reads while doing its job, such as a web page, an email, a document or a tool result..
In L2M
Register a server once in the MCP server registry: L2M probes its health on a schedule, keeps a history of its tool schemas, flags breaking changes, and can run stdio servers in a sandbox. L2M can also act as an MCP server itself, through the MCP gateway.
Further reading
- MCP specification 2025-11-25: architecture (modelcontextprotocol.io)
- MCP security best practices (modelcontextprotocol.io)