MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

M
MCP Framework Server

MCP server by Elhan1505

Created 11/18/2025
Updated 27 days ago
Repository documentation and setup instructions

MCP Framework Server

A Python-based MCP (Model Context Protocol) server for processing requests using various frameworks.

Features

  • FastAPI-based REST API
  • Health check endpoint
  • Framework processing endpoint
  • Railway deployment ready

Project Structure

mcp-framework-server/
├── src/
│   ├── server.py          # Main MCP server logic
│   └── api.py             # FastAPI application
├── frameworks/            # Framework definitions directory
├── requirements.txt       # Python dependencies
├── pyproject.toml        # Project configuration
├── railway.json          # Railway deployment config
└── .env.example          # Environment variables template

Note: Telegram bot integration is located in a separate repository. This server provides only REST API for processing requests.

Local Development

Prerequisites

  • Python 3.10 or higher
  • pip

Setup

  1. Clone the repository:
git clone <repository-url>
cd mcp-framework-server
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment variables:
cp .env.example .env
# Edit .env and add your Anthropic API key
  1. Run the server:
uvicorn src.api:app --host 0.0.0.0 --port 8000 --reload

The server will start at http://localhost:8000

API Endpoints

Health Check

GET /health

Response:

{
  "status": "healthy"
}

Process Request

POST /process
Content-Type: application/json

{
  "framework": "example-framework",
  "input": "your input data"
}

Response:

{
  "framework": "example-framework",
  "input": "your input data",
  "output": "processed output",
  "status": "success"
}

Reset Dialog

POST /reset_dialog
Content-Type: application/json

{
  "framework": "navigator_vocalis",
  "user_id": "123456"
}

Response:

{
  "status": "ok",
  "message": "История диалога сброшена"
}

Used by Telegram bot for /new_dialog command. Deletes conversation history from database.

Deployment on Railway

Option 1: Deploy from GitHub

  1. Push your code to GitHub
  2. Go to Railway
  3. Click "New Project" → "Deploy from GitHub repo"
  4. Select your repository
  5. Add environment variables:
    • ANTHROPIC_API_KEY: Your Anthropic Claude API key
    • FRAMEWORKS_PATH: ./frameworks (default)
  6. Railway will automatically detect the railway.json configuration and deploy

Option 2: Deploy using Railway CLI

  1. Install Railway CLI:
npm i -g @railway/cli
  1. Login to Railway:
railway login
  1. Initialize and deploy:
railway init
railway up
  1. Set environment variables:
railway variables set ANTHROPIC_API_KEY=your_key_here
railway variables set FRAMEWORKS_PATH=./frameworks

Verify Deployment

After deployment, Railway will provide a URL. Test your deployment:

curl https://your-app.railway.app/health

Environment Variables

  • ANTHROPIC_API_KEY: Your Anthropic Claude API key (required)
  • FRAMEWORKS_PATH: Path to frameworks directory (default: ./frameworks)

How to get Anthropic API key:

  1. Sign up at https://console.anthropic.com
  2. Go to "API Keys" section
  3. Create a new key
  4. Copy the key (format: sk-ant-api03-...)

Development Roadmap

  • [ ] Implement framework loading from external repository
  • [ ] Add framework execution logic
  • [ ] Implement authentication
  • [ ] Add request logging and monitoring
  • [ ] Add unit tests
  • [ ] Add integration tests

License

MIT

Quick Setup
Installation guide for this server

Install Package (if required)

uvx mcp-framework-server

Cursor configuration (mcp.json)

{ "mcpServers": { "elhan1505-mcp-framework-server": { "command": "uvx", "args": [ "mcp-framework-server" ] } } }