Skip to main content
Glama

MCP-Server

MCP-Server is a small Python workspace built around a FastMCP server. The main package lives in my-mcp/ and exposes a server named DataTools that combines local weather data from SQLite with live cryptocurrency tools from CoinGecko.

What it includes

  • MCP tools for querying weather readings and calculating averages from the local database

  • MCP tools for fetching crypto prices and top coins from CoinGecko

  • A dynamic MCP resource at weather://latest

  • A weather summary prompt for client-side LLM workflows

  • SQLite persistence with SQLAlchemy models and Alembic migrations

  • Docker support for running the server in a container

Related MCP server: Weather Service MCP Server

Repository layout

.
├── Dockerfile
├── pyproject.toml
├── uv.lock
└── my-mcp/
    ├── alembic.ini
    ├── migrations/
    ├── data/
    ├── pyproject.toml
    ├── README.md
    └── src/my_mcp/
        ├── server.py
        └── db/

Requirements

  • Python 3.14

  • uv

Setup

Install dependencies from the workspace root:

uv sync

The server uses environment variables from .env when available. The most important ones are:

  • HOST - bind address for the MCP server, for example 0.0.0.0

  • PORT - SSE port, for example 8080

  • DB_PATH - path to the SQLite database, defaulting to data/app.db

Database

The database schema is managed with Alembic and stored in SQLite.

Run migrations from the package directory:

cd my-mcp
uv run alembic upgrade head

If you want sample data, you can seed the database with:

cd my-mcp
uv run python -m my_mcp.db.seed

Run locally

Start the server from the repository root:

uv run --package my-mcp my-mcp

By default the server runs over SSE and listens on the host and port defined by HOST and PORT.

Docker

Build the image:

docker build -t mcp-server .

Run it:

docker run --rm -p 8080:8080 -e HOST=0.0.0.0 -e PORT=8080 -e DB_PATH=data/app.db mcp-server

MCP tools and resource

Tools

  • readings_for_city(city, hours=6) - returns recent weather readings for a city

  • average_temp(city, hours=6) - returns the average temperature for a city

  • get_crypto_price(coin_id="bitcoin") - returns price, market cap, and 24h change for a coin

  • get_top_coins(limit=5) - returns the top cryptocurrencies by market cap

Resource

  • weather://latest - returns the newest weather reading in the database

Prompt

  • weather_summary(city, hours=6) - prepares a concise weather summary prompt for a client or LLM

Client configuration

For SSE-based clients, point them at the running server URL, for example:

http://localhost:8080/sse

For Claude Desktop or similar tools, use a command-based config that launches uv run --package my-mcp my-mcp from this repository.

Notes

  • The crypto tools call the public CoinGecko API, so internet access is required.

  • The database file is created automatically if it does not exist.

  • Alembic is already configured to use sqlite:///./data/app.db inside my-mcp/alembic.ini.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    An MCP server for managing and persisting notes, offering CRUD operations, note summarization, and resource-based access via a note:// URI scheme.
    4
    7
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Claude-compatible MCP server that enables storing and summarizing notes through a simple note storage system with custom URI scheme.
    5
    -
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A simple notes system that allows creating, storing, and accessing text notes through MCP resources and tools, with built-in prompt support for generating summaries of stored notes.
    -