Skip to main content
Glama
zongjieshen

Simple FastMCP Server

by zongjieshen

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

Related MCP server: Example MCP Server

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

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    A minimal fastmcp demonstration server that provides a simple addition tool through the MCP protocol, supporting deployment via Docker with multiple transport modes.
    Last updated
    3
  • F
    license
    A
    quality
    D
    maintenance
    A demonstration MCP server built with FastMCP v2.0 that provides basic mathematical calculations and greeting functionality. Features Docker containerization, comprehensive testing, and CI/CD automation for learning MCP development patterns.
    Last updated
    2
  • F
    license
    C
    quality
    D
    maintenance
    A demonstration MCP server that provides a simple addition tool for learning how to create and deploy servers following the Model-Context-Protocol specification. Serves as a basic example for developers getting started with MCP server development.
    Last updated
    1
  • F
    license
    B
    quality
    D
    maintenance
    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.
    Last updated
    3

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zongjieshen/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server