MCP FastMCP Demo Server
This project is a simple MCP (Model Context Protocol) server built using FastMCP.
It exposes:
A tool (
add)A dynamic resource (
greeting://{name})A prompt (
greet_user)
The server is designed to run over STDIO and can be inspected using the MCP Inspector UI.
π¦ Prerequisites
Make sure you have the following installed:
All Platforms
Python 3.9+
Node.js 18+
npm (comes with Node.js)
Check versions:
π Python Setup
1οΈβ£ Create a virtual environment (recommended)
Linux / macOS
Windows (PowerShell)
2οΈβ£ Install dependencies
βΆοΈ Running the MCP Server with Inspector The MCP Inspector will start the server and connect to it automatically using STDIO.
Linux / macOS / Windows
This will: Launch the Inspector UI Spawn python server.py and Connect via STDIO automatically.
π Inspector UI opens at:
http://localhost:5173 π§ͺ Verifying the Connection.
Once connected in the Inspector UI:
Tools
add(a: int, b: int) β int
Resources
greeting://{name}
Prompts
greet_user