Skip to main content
Glama
hsiangjenli

Python MCP Template

by hsiangjenli

A DevOps-friendly template with CI/CD, Docker, and Documentation-as-Code (DaC) for building MCP server

🚀 Core Idea

This template leverages fastmcp and FastAPI to seamlessly integrate MCP functionality while inheriting the original OpenAPI specifications.

🌟 Features

  • CI/CD Integration: Automate your workflows with GitHub Actions.

  • Dockerized Environment: Consistent and portable development and production environments.

  • Documentation-as-Code: Automatically generate and deploy documentation using MkDocs. This process also utilizes the openapi.json file to ensure API documentation is up-to-date.

  • FastAPI Integration: Build robust APIs with OpenAPI support.

🛠️ Getting Started

Local Development

  1. Install dependencies:

uv sync
  1. Run the MCP server:

# stdio
uv run fastmcp run mcp_tools/main.py
# HTTP (Due to CORS middleware conflicts, additional setup is required)
uv run uvicorn mcp_tools.main_http:starlette_app --host 127.0.0.1 --port 8000

Docker

  1. Build the Docker image:

    docker build -t python-mcp-template:latest .
  2. Run the container:

    docker run -i --rm -p 8000:8000 python-mcp-template:latest
  3. Run MCP Server:

{
  "mcpServers": {
    "python-mcp-template": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-p",
        "8000:8000",
        "python-mcp-template:latest"
      ]
    }
  }
}

📚 Documentation

  • Documentation is built using MkDocs and deployed to GitHub Pages.

  • To build the documentation locally:

    chmod +x scripts/build_docs.sh
    scripts/build_docs.sh
    mkdocs build

Available Tools

1 tool
new_endpointD

New Endpoint

Responses:

  • 200 (Success): Successful Response

    • Content-Type: application/json

    • Response Properties:

      • message: A welcome message.

    • Example:

{
  "message": "Hello, world!"
}
  • 422: Validation Error

    • Content-Type: application/json

    • Response Properties:

    • Example:

{
  "detail": [
    "unknown_type"
  ]
}
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesThe name to include in the message.

Output Schema

ParametersJSON Schema
NameRequiredDescription
messageYesA welcome message.

TDQS

D1.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but provides minimal behavioral information. It documents response formats for success (200) and validation error (422) cases, which gives some insight into possible outcomes, but doesn't describe what the tool actually does, whether it's read-only or mutative, authentication requirements, rate limits, or other behavioral characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is poorly structured - it leads with a tautological title, then dives into response format details without first explaining the tool's purpose. While not excessively verbose, the content is misprioritized and doesn't efficiently communicate essential information. The response documentation could be useful but comes before establishing basic understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 1 parameter, 100% schema coverage, and an output schema, the description is incomplete. It documents response formats but fails to explain what the tool does, its purpose, or when to use it. The presence of an output schema means return values are documented elsewhere, but the description should still provide context about the tool's function and behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents the single 'name' parameter. The description adds no parameter information beyond what's in the schema - it doesn't explain how the name parameter affects the response or provide additional context about parameter usage. Baseline 3 is appropriate when schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is tautological - 'New Endpoint' restates the tool name without explaining what it does. It provides no verb or resource specification, no indication of functionality, and fails to distinguish from siblings (though none exist). The description focuses entirely on response formats rather than the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool. The description contains only response documentation with no context about appropriate use cases, prerequisites, or alternatives. There's no mention of when this tool should be invoked versus other approaches.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observednew_endpoint

TDQS

C2.2/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'new_endpoint' stands alone with a distinct purpose, so an agent cannot misselect between multiple options.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns. The name 'new_endpoint' follows a clear verb_noun structure, but consistency cannot be assessed across a set of one.

Tool Count2/5

A server with only one tool feels thin and under-scoped for most purposes, especially given the generic 'Python MCP Template' name that suggests broader functionality. One tool is typically insufficient for meaningful agent interactions, indicating a mismatch with the apparent scope.

Completeness1/5

The tool surface is severely incomplete, as a single 'new_endpoint' tool does not cover any domain meaningfully. There are obvious gaps in CRUD operations, lifecycle management, or any coherent workflow, making it impossible for agents to perform useful tasks beyond a trivial response.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related 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/hsiangjenli/mcp-slidev'

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