MCP_Server_Demo

stefano-chen/MCP_Server_Demo

3.1

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

ComponentDescription
api_server.pyPrimary HTTP interface (FastAPI) handling service endpoints
mcp_server_http.pyCustom MCP server using the HTTP transport mode
mcp_server_stdio.pyCustom MCP server using the STDIO transport mode
requirements.txtDependencies and version constraints

Getting Started

Prerequisites

  • Python 3.9+
  • pip
  • (Optional) Virtual environment tool, e.g. venv or virtualenv

Installation

  1. Clone the repo:

        git clone https://github.com/stefano-chen/Advanced_Agentic_RAG.git
        cd Advanced_Agentic_RAG
    
  2. Create and activate a venv:

    python3 -m venv .venv
    source .venv/bin/activate      # macOS / Linux
    .\.venv\Scripts\activate       # Windows (PowerShell / cmd)
    
  3. Install requirements:

    pip install -r requirements.txt
    
  4. Launch the FastAPI server

    fastapi run api_server.py
    

    This will launch the MCP server on the default port 8000. The MCP server will interact with this service using the endpoints

  5. Running the MCP server in HTTP mode

    python mcp_server_http.py
    

    This will allow external LLM to access the MCP server via HTTP protocol