M
MCP Framework Server
by @Elhan1505
MCP server by Elhan1505
Created 11/18/2025
Updated 27 days ago
README
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
- Clone the repository:
git clone <repository-url>
cd mcp-framework-server
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
cp .env.example .env
# Edit .env and add your Anthropic API key
- 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
- Push your code to GitHub
- Go to Railway
- Click "New Project" → "Deploy from GitHub repo"
- Select your repository
- Add environment variables:
ANTHROPIC_API_KEY: Your Anthropic Claude API keyFRAMEWORKS_PATH:./frameworks(default)
- Railway will automatically detect the
railway.jsonconfiguration and deploy
Option 2: Deploy using Railway CLI
- Install Railway CLI:
npm i -g @railway/cli
- Login to Railway:
railway login
- Initialize and deploy:
railway init
railway up
- 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:
- Sign up at https://console.anthropic.com
- Go to "API Keys" section
- Create a new key
- 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"
]
}
}
}