MCP Catalogs
Home

fastify-mcp-server

by flaviodelgrosso·27·Score 44

Fastify plugin for creating MCP HTTP servers with session management, authentication, and transport options.

developer-toolsai-llmops-infra
8
Forks
11
Open issues
this month
Last commit
2d ago
Indexed

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:

you:Building MCP servers for AI assistants to interact with Fastify-based backend services
you:Creating API gateways that expose MCP functionality over HTTP with authentication
you:Implementing distributed session management for MCP-based AI applications using Redis
you:How do I handle session persistence across server restarts?
you:Can I customize the authentication mechanism?

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 README
  • hello-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

mcp-server-expressmcp-server-kitnode-mcp-server

Installation

npm install fastify-mcp-server @modelcontextprotocol/sdk

In 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.