Demo MCP Server
A simple demonstration MCP server that provides basic utility tools including dice rolling and number addition functionality. This server serves as a tutorial example for setting up both local and remote MCP servers using FastMCP.
README
Basic Setup
- Install uv
- Create a project folder named fastmcp-demo-server
- Open the folder in VS Code
- Open terminal
- Execute the command: uv init
- uv add fastmcp
- Fastmcp version
- Create a basic server
- Test the server -uv run fastmcp dev main.py (MCP Inspector CMD)
- Run the server -uv run fastmcp run main.py
- Add the server to claude desktop - uv run fastmcp install claude-desktop main.py (For local server)
<i>Use the same steps from above to create a Remote MCP Server and follow the below steps and for Local MCP Server just follow till the upper step.</i>
- Test the server using MCP Inspector | This opens in browser just like FastAPI's page
- Create a GitHub repo
- git init
- git add
- git commit -m "Initial commit: Simple MCP Server"
- git remote add origin https://github.com/YourUsername/simple-mcp-server.git
- git push -u origin main
- Create an account on FastMCP Cloud
- Deploy on FastMCP Cloud
import random
from fastmcp import FastMCP
# Create a FastMCP server instance
mcp = FastMCP(name="Demo Server")
@mcp.tool
def roll_dice(n_dice: int=1) -> list[int]:
"""Roll n_dice 6 sided dice and return the results."""
return [random.randint(1,6) for _ in range(n_dice)]
@mcp.toll
def add_numbers(a: float, b: float) -> float:
"""Add two numbers together."""
return a + b
if __name___ == "__main__":
mcp.run()
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.