Skip to main content
Glama
sh-aidev

MCP Server Template

by sh-aidev

MCP Server Template

python mcp uv license

A minimal MCP (Model Context Protocol) server template managed with uv, exposing a string-reversal tool and basic two-integer arithmetic tools (add, subtract, multiply, divide).

📌 Feature

  • uv for dependency management

  • TOML + Pydantic based config

  • reverse_string tool

  • add / subtract / multiply / divide tools

  • Centralized logging (loguru)

  • Custom exception handling

  • Standalone stdio client for manual testing

Related MCP server: DDG MCP1234

📁 Project Structure

The directory structure of the project looks like this:

├── LICENSE
├── Makefile
├── README.md
├── client.py
├── main.py
├── configs
│   └── config.toml
├── outputs
├── pyproject.toml
└── src
    ├── __init__.py
    ├── app.py
    ├── server
    │   ├── __init__.py
    │   └── server.py
    └── utils
        ├── __init__.py
        ├── config.py
        ├── exceptions.py
        ├── logger.py
        └── models.py

🚀 Getting Started

Step 1: Install dependencies

uv sync

Step 2: Run the server

uv run python main.py
# or
make run

The server communicates over stdio and is meant to be launched by an MCP client (see Step 3), not run standalone in a terminal.

Step 3: Try it with the bundled client

uv run python client.py
# or
make client

This spawns main.py as a subprocess over stdio, lists the available tools, then prompts you to try reverse_string and the arithmetic tools.

Step 4 (optional): Inspect it with the MCP Inspector

uv run mcp dev main.py:mcp

Opens a browser UI to browse and call the registered tools interactively. main.py exposes a lazily-built mcp attribute for this purpose (see __getattr__ at the bottom of the file) — normal runs via make run / make client don't trigger it.

📜 References

Install Server
A
license - permissive license
A
quality
C
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.

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/sh-aidev/mcp-server-template'

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