P
mcp-server-example-v2
...
Created 12/2/2024bydabouelhassan
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"}}'
Last updated: 2/15/2025
Publisher info
More MCP servers built with Python
https://github.com/fastnai/mcp-fastn
Unified Context Layer (UCL) is a multi-tenant Model Context Protocol (MCP) server that enables AI agents, automation platforms, and applications to connect to over 1,000 SaaS tools—such as Slack, Jira, Gmail, Shopify, Notion, and more—via a single standardized /command endpoint.
By Fastn
Web-To-MCP
Bridge the gap between design and code. Send pixel-perfect website components directly to Cursor or Claude Code using Model Context Protocol (MCP). No more screenshots or descriptions needed.
By Web-To-MCP