MCP.so
登录

Fastify MCP Server

@haroldadmin

基本信息

分类

其他

许可证

Apache-2.0

传输方式

stdio

作者

haroldadmin

关于 Fastify MCP Server

A Fastify plugin to run Model Context Protocol (MCP) servers

Fastify MCP Server 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

Fastify MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is fastify-mcp?

fastify-mcp integrates Model Context Protocol (MCP) servers with your Fastify application. It supports both the Streamable HTTP transport and the legacy HTTP+SSE transport, and is designed for developers building MCP-compatible tools and resources on top of Fastify.

How to use fastify-mcp?

Install with npm install fastify-mcp or yarn add fastify-mcp. Define an MCP server using McpServer from the MCP TypeScript SDK, then register the streamableHttp plugin on a Fastify app, passing options such as stateful, mcpEndpoint, sessions, and createServer. The plugin handles session management automatically using an in-memory mapping.

Key features of fastify-mcp

  • Integrates MCP servers into any Fastify application.
  • Supports Streamable HTTP and legacy HTTP+SSE transports.
  • Built‑in session management with event emitters (connected, terminated, error).
  • Works with the official MCP TypeScript SDK.
  • Configurable endpoint path and stateful/stateless modes.

Use cases of fastify-mcp

  • Expose MCP tools and resources through a Fastify web server.
  • Build stateful MCP servers that manage multiple client sessions.
  • Add MCP endpoints to existing Fastify applications with minimal overhead.
  • Leverage Fastify’s plugin ecosystem for logging, authentication, and routing.

常见问题

1

Which MCP transports does fastify-mcp support?

It supports the Streamable HTTP transport (2025-03-26 spec) and the legacy HTTP+SSE transport (2024-11-05 spec).

2

How does session management work?

The package uses an in-memory mapping of session IDs to transport instances. The `Sessions` class emits `connected`, `terminated`, and `error` events, and you can listen for them to track session lifecycle.

3

What options does the plugin accept?

The `streamableHttp` plugin accepts: `stateful` (boolean), `mcpEndpoint` (string path), `sessions` (a `Sessions` instance), and `createServer` (a function that returns an MCP server).

评论

其他 分类下的更多 MCP 服务器