JUHE API Marketplace
jairosoft-com avatar
MCP Server

My MCP Server

A Python template for building Model Context Protocol (MCP) servers that expose tools via JSON-RPC, enabling secure and scalable context and tool invocation for language models.

0
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. mcp-server-python-template

README Documentation

My MCP Server

My MCP Server is a Python template for building a Model Context Protocol (MCP) server. It uses FastMCP to expose tools via JSON-RPC over stdio (and can be extended to HTTP), enabling secure and scalable context and tool invocation for language models.

Project Structure

├── src/ Source code (package: my_mcp_server) │ ├── server.py Entry point and tool registrations │ ├── main.py Console script entry │ ├── config/ Configuration modules │ ├── context/ Context providers for MCP │ ├── models/ Pydantic models and schemas │ ├── tools/ Custom tool implementations │ └── utils/ Helper utilities ├── tests/ Unit, integration, and performance tests ├── Taskfile.yaml Common development and CI tasks ├── pyproject.toml Project metadata and build configuration ├── requirements.txt Runtime dependencies └── docs/ Contribution & architecture guides

Prerequisites

  • Python >=3.13
  • Git
  • (Optional) Taskfile task runner

Setup

Create and activate virtual environment

task create-venv source .venv/bin/activate

Install runtime dependencies

task install-requirements

(Optional) Install development dependencies

task install-dev

Taskfile Tasks

Run task --list to see all available tasks. Common tasks include:

  • default: List available tasks
  • create-venv: Create a Python virtual environment in .venv
  • activate-venv: Show activation commands for the venv
  • clean-venv: Remove the .venv directory
  • install-requirements: Install runtime dependencies (pip install -r requirements.txt)
  • install-dev: Install the project in editable mode with dev dependencies (pip install -e ".[dev]")
  • flake8: Run flake8 over src/ and tests/
  • mypy: Run mypy over src/ and tests/
  • black: Format code with black
  • format: Alias for black (formats all Python files)
  • lint: Run both flake8 and mypy
  • test: Run all tests (unit, integration, performance) with pytest
  • test-unit: Run unit tests only
  • test-integration: Run integration tests only
  • test-performance: Run performance tests only
  • coverage: Generate coverage report (HTML + terminal) with pytest-cov
  • check: Run format, lint, and test sequentially
  • run: Start the console-based MCP server (python -m my_mcp_server)
  • dev: Alias for run (start server in development mode)
  • clean: Clean Python build artifacts and caches
  • build: Build distribution packages (sdist & wheel) using Hatchling

Development & Usage

After setup, you can start the server in stdio mode:

task run

Or directly:

python -m my_mcp_server

Testing & Linting

  • Run all tests: task test
  • Run linters: task lint
  • Format code: task format

Build & Release

  • Build distributions: task build
  • Upload to PyPI: twine upload dist/*

Configuration

Environment variables can be managed via a .env file (loaded by python-dotenv/pydantic-settings).

Contributing

See docs/CONTRIBUTING.md for guidelines on contributing and architecture details.

License

MIT License

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved