FastMCP Tools Server

FastMCP Tools Server

FastMCP server providing health check, greeting, and UUID generation tools.

Category
Visit Server

README

You can use the following production-style README.md for your FastMCP server and client applications.

FastMCP Tools Server

A production-ready FastMCP server exposing the following tools:

  • health - Health check endpoint
  • say_hello - Returns a greeting message
  • generate_uuid - Generates a random UUID

Project Structure

project/
│
├── app/
│   ├── __init__.py
│   └── server.py
│
├── client/
│   └── mcp_client.py
│
├── tests/
│   └── test_mcp_tools.py
│
├── requirements.txt
├── pyproject.toml
└── README.md

Prerequisites

  • Python 3.14+
  • pip

Verify installation:

python --version

Expected:

Python 3.14.x

Create Virtual Environment

Windows

python -m venv .venv
.venv\Scripts\activate

Linux / macOS

python -m venv .venv
source .venv/bin/activate

Install Dependencies

pip install -r requirements.txt

or

pip install fastmcp pytest pytest-asyncio

Start MCP Server

Navigate to the project root folder.

Run:

python app/server.py

Expected output:

INFO: FastMCP server started
INFO: Listening on http://0.0.0.0:8000/mcp

Verify Server

Open a new terminal and run:

curl http://localhost:8000/mcp

or

fastmcp list http://localhost:8000/mcp

Expected tools:

health
say_hello
generate_uuid

Run Client Application

Example:

python client/mcp_client.py

Expected output:

Available Tools:
- health
- say_hello
- generate_uuid

Health Response:
{'status': 'healthy'}

Hello Response:
{'message': 'Hello Satheesh'}

UUID Response:
{'uuid': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'}

Example Client Code

import asyncio

from fastmcp import Client


async def main():
    async with Client("http://localhost:8000/mcp") as client:

        health = await client.call_tool("health")
        print(health.data)

        hello = await client.call_tool(
            "say_hello",
            {"name": "Satheesh"}
        )
        print(hello.data)

        uuid_result = await client.call_tool(
            "generate_uuid"
        )
        print(uuid_result.data)


if __name__ == "__main__":
    asyncio.run(main())

Run Tests

Execute:

pytest -v

Expected:

tests/test_mcp_tools.py::test_health PASSED
tests/test_mcp_tools.py::test_say_hello PASSED
tests/test_mcp_tools.py::test_generate_uuid PASSED

Available Tools

health

Request:

await client.call_tool("health")

Response:

{
  "status": "healthy"
}

say_hello

Request:

await client.call_tool(
    "say_hello",
    {
        "name": "Satheesh"
    }
)

Response:

{
  "message": "Hello Satheesh"
}

generate_uuid

Request:

await client.call_tool(
    "generate_uuid"
)

Response:

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000"
}

Troubleshooting

List Tools Works but Tool Returns None

Verify the server returns a dictionary:

@mcp.tool
def say_hello(name: str) -> dict:
    return {
        "message": f"Hello {name}"
    }

Avoid returning primitive values such as strings for production APIs.

Connection Refused

Ensure the MCP server is running:

python app/server.py

Verify port:

netstat -ano | findstr 8000

Verify FastMCP Version

pip show fastmcp

Recommended:

fastmcp >= 3.x

Production Recommendations

  • Run behind Nginx or API Gateway.
  • Enable HTTPS.
  • Add authentication and authorization.
  • Use structured responses (dict/Pydantic models).
  • Add logging and monitoring.
  • Deploy with Docker/Kubernetes.
  • Add retry and timeout handling in clients.

License

MIT License

This README should be sufficient for onboarding developers, running the server/client locally, and validating the MCP tools end-to-end.

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