What is an MCP server?
A MCP server is a lightweight program that exposes tools, data, or prompts to an AI agent using the Model Context Protocol (MCP), so the agent can call them in a standard way no matter which client or model it runs in.
Expanding the concept
The Model Context Protocol is an open standard for connecting AI agents to external capabilities. On one side sits an MCP client — the chat app, IDE plugin, or agent runtime the user interacts with. On the other side sits an MCP server, a small process that declares a set of tools (actions the agent can invoke), resources (data the agent can read), and sometimes prompts (reusable instructions). The client discovers what a server offers, then calls its tools with structured arguments and gets back structured results. Because the protocol is standardized, the same server works with any compliant client, and the same client can talk to any compliant server — an agent does not need custom integration code for each new capability.
How it works
Most MCP servers run locally as a subprocess, launched and managed by the client. A typical client configuration just points at a command to run:
{
"mcpServers": {
"docweave": {
"command": "npx",
"args": ["-y", "@docweave/mcp"]
}
}
}On startup, the client asks the server what it can do. The server responds with a list of tools — each with a name, a description, and a schema for its arguments. When the agent decides a tool is relevant (for example, generating a PDF from HTML), the client sends a call for that tool with matching arguments, the server executes it, and the result flows back into the agent's context.
How Docweave relates to MCP servers
Docweave ships @docweave/mcp, an open-source MCP server that wraps a single generate_pdf tool. Any MCP-compatible agent can call it with a source — HTML, a URL, or a template + JSON — and get a PDF back, rendered with Chromium. Under the hood it calls the same rendering path as the REST endpoint, POST /api/v1/pdf, and both are billed per document rather than per page. The tool also honors an idempotencyKey, so if an agent retries a call after a timeout, it does not generate — or get billed for — the same document twice. This is one concrete example of what an MCP server is for: giving an agent a reliable, discoverable action it can call directly, instead of the agent having to construct raw HTTP requests itself.
FAQ
What is an MCP server in simple terms?
It is a small program that speaks the Model Context Protocol and offers a fixed set of tools, data resources, or prompts to any AI agent that connects to it — similar to how a REST API offers endpoints to any HTTP client.
How is an MCP server different from a REST API?
A REST API is called over HTTP with routes and JSON bodies that differ from service to service. A MCP server exposes its capabilities as named, self-describing tools over a standard protocol, so an agent can discover and call them the same way no matter which server it is talking to.
Do I need to write code to use an MCP server?
No. Most MCP servers are installed with a single command (for example npx -y @docweave/mcp) and wired into an MCP-compatible client — such as Claude, Cursor, or another agent — through a small JSON config. The client handles discovering and calling the server's tools.
What can an MCP server actually do?
It depends on the server. Examples include reading files, querying a database, searching the web, or — as with Docweave's generate_pdf tool — turning HTML, a URL, or a template + JSON into a PDF. The server declares its tools; the agent decides when to call them.
Try the MCP-native PDF API.
Get an API key