Get the FREE Ultimate OpenClaw Setup Guide →

mcp-fastify

Sample Model Context Protocol (MCP) Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio bgaurav7-mcp-fastify-server node server.js \
  --env PORT="8080" \
  --env MCP_PROTOCOL="mcp"

How to use

The mcp-fastify-server is a lightweight MCP server built on top of Fastify designed to expose the Model Context Protocol (MCP) endpoints for your Minecraft server or tooling ecosystem. It starts an internal HTTP API and MCP-compatible interface that you can query to discover, validate, and interact with MCP resources. You can use the provided HTTP routes to inspect available MCP models, fetch their metadata, and run lightweight validation against your data flows. Typical usage involves starting the server locally, then hitting its REST-like endpoints to understand the MCP schema and how your tooling should serialize and transmit MCP payloads.

How to install

Prerequisites:

  • Node.js (≥14.x) and npm installed on your machine
  • Git (optional, for cloning the repository)

Installation steps:

  1. Clone the repository (or download the source package): git clone https://github.com/your-org/mcp-fastify-server.git cd mcp-fastify-server

  2. Install dependencies: npm install

  3. Configure environment variables (if needed):

    • PORT: Port on which the server will listen (default 8080)
    • MCP_PROTOCOL: Protocol indicator (default mcp)
  4. Start the server: npm run start

    or if you prefer directly via node

    node server.js

  5. Verify it's running by visiting the configured port: http://localhost:8080/

Notes:

  • If the repository ships with a different start script, use npm run start:dev or npm run serve as documented by the project.
  • Ensure any required environment configuration is provided before starting the server.

Additional notes

Tips and common issues:

  • If you see port conflicts, change the PORT environment variable to an unused port.
  • Check logs for MCP compatibility notes if you encounter schema validation failures.
  • Ensure Node.js version matches the project's supported range as specified in the package.json engines field.
  • If you’re integrating with external tooling, confirm the MCP endpoints and payload formats align with your producer/consumer implementations.
  • For production deployments, consider configuring proper process management (e.g., a systemd service or PM2) and enabling TLS termination at a reverse proxy.

Related MCP Servers

Sponsor this space

Reach thousands of developers