mcp-server-example-v2
Language:
Python
Stars:
2
Forks:
1
Simple MCP Server Example
This is a basic implementation of a Model Context Protocol (MCP) server using FastAPI. The server demonstrates the core concepts of MCP by providing a simple context service.
Features
- Basic health check endpoint
- Context endpoint that processes prompt templates
- Support for parameterized prompts
Setup
-
Install dependencies:
pip install -r requirements.txt
-
Run the server:
uvicorn src.main:app --reload
Usage
The server provides two endpoints:
- GET / - Health check
- POST /context - Get context for a prompt
Example request:
curl -X POST http://localhost:8000/context \
-H "Content-Type: application/json" \
-d '{"prompt_id": "greeting", "parameters": {"time": "12:00 PM"}}'
Publisher info
More MCP servers built with Python
Create, backtest, and execute trades directly in one chat box. The Composer MCP Server gives LLMs the power to backtest investment ideas and execute automated trading strategies. Trade across stocks, ETFs, and crypto directly in Claude.
An MCP to generate presentations with AI. Create and edit PowerPoint presentations with AI.
The PaddleOCR MCP server brings enterprise-grade OCR and document parsing capabilities to AI applications. Built on PaddleOCR — a proven solution with 50,000+ GitHub stars, deeply integrated by leading projects like MinerU, RAGFlow, and OmniParser— with targeted optimizations based on the MCP concept.