Model Context Protocol: Tools, Resources and Boundaries
MCP standardizes how an AI application connects to external capabilities. It reduces custom integration work, but does not decide whether a tool is safe or whether a user authorized an action.
#Quick answer: what is MCP, and which version is current?
MCP (Model Context Protocol) is an open protocol for connecting AI applications to tools and data. A client inside the AI application (the host) connects to an MCP server, which offers tools (callable functions), resources (data) and prompts (templates). It is not tied to one model vendor.
- Current specification:
2026-07-28(MCP Specification↗). - Message format: JSON-RPC 2.0.
- Standard transports: stdio (newline-delimited messages to a client-launched subprocess) and Streamable HTTP (each message is a POST to one MCP endpoint; replies are JSON or an SSE stream).
- TypeScript SDK: servers use
@modelcontextprotocol/server(npm latest 2.4.0); the older@modelcontextprotocol/sdk(1.x, latest 1.32.2) still installs, but new projects follow the v2 README (typescript-sdk↗). - Safety: the specification requires explicit user consent before the host invokes any tool, and treats tool descriptions from untrusted servers as untrusted.
Last checked: 2026-11-09.
#Host, client and server
The host is the AI application. It creates clients that communicate with MCP servers. A server can expose tools, resources and prompts; these are different capabilities, not interchangeable names for a model call.
Local servers communicate over stdio; remote servers use Streamable HTTP. Follow the current protocol and SDK documentation for the chosen transport and authentication flow.
#Discover before executing
Inspect the server's declared tools, their descriptions and input schemas. Confirm which account or workspace each tool acts on. A tool called search may query public pages, private files or a production database; the name alone does not establish its scope.
Use a small capability set and narrow filesystem roots. Pin and review server dependencies. Do not install an arbitrary package merely because a retrieved page recommends it.
#Build a useful server
Start with one read-only tool, such as a lookup in a synthetic catalog. Define required arguments and a predictable result containing status, data and source identifiers. Validate input, bound response size and return explicit errors.
Keep secrets server-side. For remote access, validate authentication and resource ownership; do not treat an arbitrary supplied token or client-controlled tenant ID as sufficient authority.
#Diagnose integration failures
For local transport, inspect executable paths, environment and stderr; stdout must remain valid protocol traffic. For remote transport, separate network, authentication and capability-discovery failures. A successful connection does not prove tool execution succeeded.
Test invalid arguments, missing records, cancellation and permission denial with local fixtures before connecting real write operations. MCP is a connection protocol, not a sandbox or a guarantee against prompt injection.