> For the complete documentation index, see [llms.txt](https://ai.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai.ortusbooks.com/model-context-protocol-mcp.md).

# Model Context Protocol (MCP)

- [MCP Servers](https://ai.ortusbooks.com/model-context-protocol-mcp/server.md): Expose your application's tools, resources, and prompts to AI clients through a complete MCP server implementation.
- [Getting Started](https://ai.ortusbooks.com/model-context-protocol-mcp/server/getting-started.md): Get your first MCP server running in 5 minutes.
- [Transports (HTTP & STDIO)](https://ai.ortusbooks.com/model-context-protocol-mcp/server/transports.md): Choose between HTTP and STDIO transport mechanisms for your MCP server based on deployment scenario.
- [Server Configuration](https://ai.ortusbooks.com/model-context-protocol-mcp/server/server-configuration.md): Configure authentication, CORS, request limits, and other security settings for your MCP server.
- [Registering Tools, Resources & Prompts](https://ai.ortusbooks.com/model-context-protocol-mcp/server/registration.md): Register the tools, resources, and prompts your MCP server exposes to clients.
- [Annotation-Based Discovery](https://ai.ortusbooks.com/model-context-protocol-mcp/server/annotation-discovery.md): Automatically discover and register tools, resources, and prompts from annotated methods.
- [Class-Based Servers](https://ai.ortusbooks.com/model-context-protocol-mcp/server/class-based-servers.md): Encapsulate your entire MCP server in a dedicated class that extends MCPServer for better organization and testability.
- [HTTP Endpoint & Routing](https://ai.ortusbooks.com/model-context-protocol-mcp/server/http-endpoint.md): Set up and customize HTTP endpoints and routing for your MCP server.
- [Observability & Monitoring](https://ai.ortusbooks.com/model-context-protocol-mcp/server/observability.md): Track performance, monitor requests, and respond to MCP server events in real-time.
- [Pause & Resume](https://ai.ortusbooks.com/model-context-protocol-mcp/server/pause-resume.md): Temporarily halt an MCP server without destroying its configuration.
- [Best Practices](https://ai.ortusbooks.com/model-context-protocol-mcp/server/best-practices.md): Guidelines for production MCP servers — security, monitoring, performance, and deployment.
- [Examples & Use Cases](https://ai.ortusbooks.com/model-context-protocol-mcp/server/_examples.md): Complete working examples for common MCP server scenarios.
- [MCP Clients](https://ai.ortusbooks.com/model-context-protocol-mcp/client.md): Connect to external MCP servers to consume tools, resources, and prompts from other AI applications.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai.ortusbooks.com/model-context-protocol-mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
