Skip to main content
Glama

MCP Server (FastMCP)

A minimal Model Context Protocol server using FastMCP, with one tool, one prompt, and one resource.

Type

Name

Description

Tool

calculate

Safe math expression evaluation (sqrt, sin, pi, etc.)

Prompt

explain

Ask the model to explain a topic in simple terms

Resource

app://info

Server name and capabilities (read-only)


Requirements

  • Python 3.10+

  • pip


Setup

1. Create and activate a virtual environment

python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

2. Install dependencies

pip install -r requirements.txt

3. Run the server

MCP servers use stdio by default. Your MCP client launches the process. To verify it starts:

python server.py
# Blocks waiting for MCP messages. Press Ctrl+C to quit.

Connecting to Claude Desktop

Add to your Claude Desktop config:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "example-server": {
      "command": "/absolute/path/to/MCP-Server/.venv/bin/python",
      "args": ["/absolute/path/to/MCP-Server/server.py"]
    }
  }
}

Use your actual paths and restart Claude Desktop.


Using with MCP Dashboard

The MCP Dashboard launches this server as a subprocess and talks to it over stdio, so tools, resources, and prompts all appear in the UI.

From the MCP-Dashboard directory (with Flask installed), run:

# Unbuffered (-u) so the dashboard receives list responses immediately
python app.py -- python -u path/to/MCP-Server/server.py

Windows:

python app.py -- python -u path\to\MCP-Server\server.py

Use a Python that has both flask and fastmcp installed (or use the full path to this repo's venv Python if you use one).

The dashboard will open at http://localhost:8080 and show the calculate tool, app://info resource, and explain prompt. You can try the tool, read the resource, and get the prompt from the browser.


Reference

Tool: calculate

  • Input: { "expression": "sqrt(2) * pi" }

  • Output: "4.442882938158366"

  • Supports: +, -, *, /, **, %, //, and functions like abs, round, sqrt, ceil, floor, log, log10, sin, cos, tan; constants pi, e.

Prompt: explain

  • Input: { "topic": "recursion" }

  • Returns a user message asking the model to explain the topic in simple terms.

Resource: app://info

  • Read-only. Returns JSON: {"name": "mcp-server", "capabilities": ["calculate", "prompts", "resources"]}.


Project structure

MCP-Server/
├── server.py
├── requirements.txt
└── README.md

To add more tools, prompts, or resources, use the @mcp.tool, @mcp.prompt, and @mcp.resource(...) decorators in server.py.

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/michaelmoser8875/MCP-Server'

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