1. Conduid
  2. AI
  3. Fastify MCP
MCP server · AI

Fastify MCP

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

64Good

Scored 4 hours ago · breakdown

About Fastify MCP

Fastify MCP is an MCP server published by haroldadmin in the AI category: a Fastify plugin to run Model Context Protocol (MCP) servers.

The repository has 27 stars and 8 forks, with the last commit 5 months ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/haroldadmin/fastify-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Fastify MCP

Powered by Claude · Grounded in docs

I know everything about Fastify MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

3.0.03.0.0 · 12 May 2026Version 3.0.0 This release migrates fastify-mcp to an ESM package. This change aligns the package with the direction of the rest of the Node.js ecosystem. Breaking changes** We now supply ESM exports only. If you consume the package with…
2.1.02.1.0 · 10 Dec 2025What's Changed Upgrade @modelcontextprotocol/sdk to 1.24.3 by @nickgraz in https://github.com/haroldadmin/fastify-mcp/pull/26 New Contributors @nickgraz made their first contribution in https://github.com/haroldadmin/fastify-mcp/pull/26…
2.0.82.0.8 · 14 Sep 2025What's Changed Bump MCP SDK to 1.18 by @haroldadmin in https://github.com/haroldadmin/fastify-mcp/pull/25 Full Changelog**: https://github.com/haroldadmin/fastify-mcp/compare/2.0.7...2.0.8
2.0.72.0.7 · 3 Sep 2025What's Changed Bump MCP SDK to 1.17 by @haroldadmin in https://github.com/haroldadmin/fastify-mcp/pull/24 Full Changelog**: https://github.com/haroldadmin/fastify-mcp/compare/2.0.6...2.0.7
2.0.62.0.6 · 3 Sep 2025What's Changed Bump MCP SDK to 1.16 by @haroldadmin in https://github.com/haroldadmin/fastify-mcp/pull/23 Full Changelog**: https://github.com/haroldadmin/fastify-mcp/compare/2.0.5...2.0.6

README

fastify-mcp

Integrate Model Context Protocol servers with your Fastify app.

Supports the Streamable HTTP transport as well as the legacy HTTP+SSE transport.

Usage

First, define your MCP server.

function createServer() {
  const mcpServer = new McpServer({
    name: "...",
    version: "...",
  });

  mcpServer.tool("...");
  mcpServer.resource("...");

  return mcpServer.server;
}

Create a Fastify app and register the plugin.

import { fastify } from "fastify";
import { streamableHttp } from "fastify-mcp";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";

const app = fastify();

app.register(streamableHttp, {
  // Set to `true` if you want a stateful server
  stateful: false,
  mcpEndpoint: "/mcp",
  sessions: new Sessions<StreamableHTTPServerTransport>()
  createServer,
});

app.listen({ port: 8080 });

See the examples directory for more detailed examples.

Installation

# npm
npm install fastify-mcp

# yarn
yarn add fastify-mcp

Session Management

The official MCP TypeScript SDK does not support managing multiple sessions out of the box, and therefore it's the host server's responsibility to do so.

This package uses an in-memory mapping of each active session against its session ID to manage multiple sessions, as recommended by the MCP SDK examples.

Session Events

The Sessions class emits the following events:

  • connected: Emitted when a new session is added.
  • terminated: Emitted when a session is removed.
  • error: Emitted when an asynchronous event handler throws an error.
const sessions = new Sessions<StreamableHTTPServerTransport>();

sessions.on("connected", (sessionId) => {
  console.log(`Session ${sessionId} connected`);
});

sessions.on("terminated", (sessionId) => {
  console.log(`Session ${sessionId} terminated`);
});

Contributing

Please file an issue if you encounter a problem when using this package. Pull requests for new features or bug fixes are also welcome.

README fetched from the repository 4 hours ago. The original is authoritative.

Questions

About Fastify MCP

How do I install Fastify MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Fastify MCP safe to use with an AI agent?

Its trust score is 64 out of 100 (good). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Fastify MCP still maintained?

Yes — the latest release is 3.0.0 (12 May 2026), and the last commit was 5 months ago. The repository has 27 stars and 4 open issues.