Document two audiences
Keep both layers consistent. A tool description in the server must not contradict its documentation page.
Start with a server overview
The first section should answer:- What does the server connect to?
- Who should use it?
- Is it local or remote?
- Which MCP protocol version and transports does it support?
- Does it expose tools, resources, prompts, or other capabilities?
- Which operations can change data?
- Where can users get support?
Document connection and authentication
Provide a copyable configuration for each supported client or explain the remote connection URL. Document:- Transport and endpoint
- Required runtime for a local server
- Environment variables
- OAuth flow, scopes, and redirect requirements
- API key placement when applicable
- Network and organization prerequisites
- Safe credential storage
Document every tool
For each tool, include:
A useful description is specific:
Retrieves one order by its exactAvoid descriptions such as “manages orders.” They make tool selection unpredictable.ord_identifier. Usesearch_orderswhen the identifier is unknown. This tool does not modify the order.
Document resources and prompts
For a resource, document its URI pattern, MIME type, parameters, access rules, pagination or subscription behavior, and expected size. For a prompt, document its purpose, arguments, generated message structure, embedded resources, user-control expectations, and security considerations.Explain errors by category
Document protocol errors separately from tool execution errors. Provide a table with:- Stable error category
- Meaning
- Whether retrying is safe
- Corrective action
- Support reference behavior
Add task-level examples
Examples should show complete user goals, not only isolated JSON. For each important workflow:- Show a realistic user request.
- Identify the likely tool or prompt.
- Show representative arguments.
- Show a shortened successful result.
- Show one common failure and recovery.
Document generated MCP servers
If the MCP server is generated from an API, explain its source:- OpenAPI 3.x or Swagger 2.0 document
- Direct REST API configuration
- GraphQL schema and selected operations
Publish version and change information
Document:- Server version
- Supported protocol version
- Added, changed, deprecated, and removed capabilities
- Schema changes
- Authentication or permission changes
- Migration steps
- Support window and rollback policy
Make documentation easy to find and cite
Use:- One clear question or topic per page
- A direct answer near the top
- Descriptive sentence-case headings
- Stable URLs
- Descriptive internal link text
- Short tables for exact mappings
- Working examples with explicit assumptions
- Links to primary sources and the MCP specification
Documentation template
Documentation checklist
- Overview identifies the server and intended users
- Connection examples are tested
- Authentication and scopes are explicit
- Every exposed capability is documented
- Tool descriptions distinguish similar operations
- Inputs, outputs, limits, and errors have examples
- Write and destructive operations are labeled
- Source API mappings are explained
- Changelog and deprecation policy are linked
- Secrets and real customer data are absent