fastify-mcp-server
Verified Safeby flaviodelgrosso
Overview
A Fastify plugin providing a streamable HTTP transport for the Model Context Protocol (MCP), enabling AI assistants to interact with services.
Installation
npm run devEnvironment Variables
- REDIS_HOST
- REDIS_PORT
- REDIS_DB
Security Notes
The plugin provides a secure framework for implementing an MCP server, including robust Bearer token authentication and session management with pluggable storage. Bearer token validation relies on a user-provided `OAuthTokenVerifier` implementation, ensuring no hardcoded secrets in the core plugin. Session management for Redis uses `SCAN` for operations to prevent blocking. The overall security posture in a deployed application will depend on the security of the user's `OAuthTokenVerifier` implementation, the `createMcpServer` logic, and the underlying `@modelcontextprotocol/sdk` itself. The demo includes a clearly marked mock verifier.
Similar Servers
hyper-mcp
A fast, secure Model Context Protocol (MCP) server that extends its capabilities through WebAssembly plugins, enabling AI agents to access tools, resources, and prompts.
tmcp
A server implementation for the Model Context Protocol (MCP) to enable LLMs to access external context and tools.
fastify-mcp
Integrates Model Context Protocol (MCP) server functionality into Fastify web applications, supporting streamable HTTP and legacy HTTP+SSE transports.
mcp-python-starter
A feature-complete Model Context Protocol (MCP) server template in Python for developing AI applications and agents.