Skip to content

dsmithco/mcp-server-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mcp-server-python

A minimal Model Context Protocol (MCP) server written in Python. Exposes four tools over stdio:

  • get_time(timezone?: str) — current date and time in the given IANA timezone (defaults to UTC)
  • text_stats(text: str) — character / word / line counts for an input string
  • get_weather(location: str, day?: str) — forecast for a location on a day. Uses Open-Meteo (no API key required).
  • get_movies_in_theaters(region?: str, rating?: str, limit?: int) — movies currently in theaters in a country, optionally filtered by MPAA rating. Uses TMDB (requires free API key in TMDB_API_KEY env var).

Built on the official mcp SDK (FastMCP).

Run locally

python3 -m venv .venv
source .venv/bin/activate
pip install -e .
python server.py

The server speaks the MCP protocol over stdin/stdout. To use it with Claude Code, Claude Desktop, or any MCP client, point the client at the script:

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

Companion repos

Same two tools, different languages:

License

MIT

About

Minimal MCP server in Python. Exposes get_time and text_stats tools over stdio. Built on the official mcp Python SDK (FastMCP).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages