stefano-chen/MCP_Server_Demo
If you are the rightful owner of MCP_Server_Demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Server Demo is a reference implementation of a Model Context Protocol server using FastAPI and the mcp-sdk for Python, designed for experimentation and integration with advanced agentic RAG systems.
MCP Server Demo
A demo implementation of a Model Context Protocol (MCP) server using FastAPI and the mcp-sdk for Python. This server is designed as a lightweight reference implementation to support advanced agentic RAG systems and other MCP-based architectures.
This custom MCP server is designed to work with this project
Table of Contents
About
MCP Server Demo is a reference server for the Model Context Protocol (MCP), built in Python using the mcp-sdk.
It's intended for experimentation, learning, and integration with more complex systems (e.g. agentic RAG setups).
Features
- HTTP interface (via FastAPI) to accept MCP requests
- STDIO mode for simpler or local testing
- Minimal dependencies and clear code paths
Architecture & Components
| Component | Description |
|---|---|
api_server.py | Primary HTTP interface (FastAPI) handling service endpoints |
mcp_server_http.py | Custom MCP server using the HTTP transport mode |
mcp_server_stdio.py | Custom MCP server using the STDIO transport mode |
requirements.txt | Dependencies and version constraints |
Getting Started
Prerequisites
- Python 3.9+
pip- (Optional) Virtual environment tool, e.g.
venvorvirtualenv
Installation
-
Clone the repo:
git clone https://github.com/stefano-chen/Advanced_Agentic_RAG.git cd Advanced_Agentic_RAG -
Create and activate a venv:
python3 -m venv .venv source .venv/bin/activate # macOS / Linux .\.venv\Scripts\activate # Windows (PowerShell / cmd) -
Install requirements:
pip install -r requirements.txt -
Launch the FastAPI server
fastapi run api_server.pyThis will launch the MCP server on the default port 8000. The MCP server will interact with this service using the endpoints
-
Running the MCP server in HTTP mode
python mcp_server_http.pyThis will allow external LLM to access the MCP server via HTTP protocol