fastify-mcp-server
by flaviodelgrosso·★ 27·Score 44
Fastify plugin for creating MCP HTTP servers with session management, authentication, and transport options.
Overview
Fastify MCP Server Plugin provides a robust implementation of the Model Context Protocol for Fastify applications. It offers seamless integration through streamable HTTP transport, with support for session management, authentication via bearer tokens, and both in-memory and Redis session storage. The plugin includes comprehensive event handling, graceful shutdown capabilities, and TypeScript support for production environments.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this if you're building MCP servers within a Fastify-based microservices architecture and need HTTP transport with session management capabilities.
When NOT to choose this
Avoid if you need non-HTTP transport protocols or require extensive features beyond MCP's core protocol capabilities.
Tools this server exposes
1 tool extracted from the READMEhello-world() => { content: [{ type: 'text', text: 'Hello from MCP!' }] }Returns a greeting message from the MCP server
Note: Only one explicit tool example found in the README. The server allows defining custom MCP tools through the McpServer interface, but no other specific tools are documented.
Comparable tools
Installation
npm install fastify-mcp-server @modelcontextprotocol/sdkIn Claude Desktop config.json:
{
"mcpServers": {
"fastify-mcp": {
"command": "node",
"args": ["path/to/your/fastify-server.js"]
}
}
}FAQ
- How do I handle session persistence across server restarts?
- Use the Redis session store instead of the default in-memory storage. Configure it with your Redis client instance for persistent sessions.
- Can I customize the authentication mechanism?
- Yes, the plugin supports Bearer token authentication with custom verifiers and optional OAuth 2.0 integration through the authorization configuration.
Compare fastify-mcp-server with
Last updated · Auto-generated from public README + GitHub signals.