Simple FastMCP Server

Simple FastMCP Server

A minimal demonstration MCP server that provides basic mathematical addition and greeting functionality, serving as a template for building and deploying FastMCP servers.

Category
Visit Server

README

Simple FastMCP Server

This repository contains a minimal MCP server built with FastMCP 2.0. It exposes two tools:

  • add(a: int, b: int) -> int: Returns the sum of two numbers.
  • greet(name: str) -> str: Returns a friendly greeting.

Local Development

Prerequisites:

  • Python 3.9+
  • pip

Install dependencies:

pip install -r requirements.txt

Run the server locally over HTTP:

python my_server.py

The MCP endpoint will be available at http://localhost:8000/mcp.

Optional: Test with a simple client script.

Create client_test.py:

import asyncio
from fastmcp import Client

async def main():
    async with Client("http://localhost:8000/mcp") as client:
        result = await client.call_tool("greet", {"name": "FastMCP"})
        print(result)

asyncio.run(main())

Run it:

python client_test.py

Deploy to FastMCP Cloud

FastMCP Cloud hosts MCP servers from your GitHub repository and provides a URL like https://your-project-name.fastmcp.app/mcp ([1]).

Steps:

  • Push this repository to GitHub (ensure requirements.txt is present).
  • Sign in to FastMCP Cloud with your GitHub account and create a project.
  • Set the entrypoint to my_server.py:mcp (Cloud imports the server object and ignores __main__) ([2]).
  • Deploy; your server becomes available at https://<project>.fastmcp.app/mcp.

Notes:

  • Cloud automatically installs dependencies from requirements.txt ([1]).
  • Entry-point configuration accepts file.py:object_name syntax if you rename the server instance ([1]).

References

  • [1] FastMCP Cloud guide: https://gofastmcp.com/deployment/fastmcp-cloud
  • [2] FastMCP Quickstart: https://gofastmcp.com/getting-started/quickstart

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured