Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FastAPI MCP Servercheck the health status of the database and Redis connections"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server
एक production-ready Model Context Protocol (MCP) server जो FastAPI framework का उपयोग करके बनाई गई है।
विशेषताएं (Features)
🚀 FastAPI Framework: High-performance async API server
🔒 Security: JWT authentication और secure coding practices
🗄️ Database: PostgreSQL के साथ asyncpg
📦 Caching: Redis integration
🐳 Docker Ready: Production-ready containerization
📊 Health Checks: Built-in health monitoring
🔧 Development Ready: Comprehensive testing और development tools
आवश्यकताएं (Requirements)
Python 3.11+
PostgreSQL 13+
Redis 6+
Docker (optional)
इंस्टॉलेशन (Installation)
1. Repository Clone करें
git clone <repository-url>
cd mcp-server2. Virtual Environment बनाएं
python -m venv venv
source venv/bin/activate # Linux/Mac
# या
venv\\Scripts\\activate # Windows3. Dependencies Install करें
pip install -r requirements.txt4. Environment Variables सेट करें
.env file बनाएं:
# Database
DATABASE_URL=postgresql://username:password@localhost:5432/mcp_db
# Redis
REDIS_URL=redis://localhost:6379/0
# Security
SECRET_KEY=your-secret-key-here
JWT_ALGORITHM=HS256
JWT_EXPIRE_MINUTES=30
# Server
HOST=0.0.0.0
PORT=8000
DEBUG=falseUsage
Development Mode
uvicorn main:app --reload --host 0.0.0.0 --port 8000Production Mode
uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4Docker के साथ
# Build करें
docker build -t mcp-server .
# Run करें
docker run -p 8000:8000 --env-file .env mcp-serverAPI Documentation
Base URL
http://localhost:8000Interactive Documentation
Swagger UI: http://localhost:8000/docs
ReDoc: http://localhost:8000/redoc
Main Endpoints
Health Check
GET /healthServer की health status check करता है।
API Endpoints
GET /api/v1/status
POST /api/v1/connect
GET /api/v1/tools
POST /api/v1/tools/{tool_name}/callDevelopment
Code Quality
# Format code
black .
# Sort imports
isort .
# Lint code
flake8 .
# Type checking
mypy .Testing
# सभी tests run करें
pytest
# Coverage के साथ
pytest --cov=src tests/
# Specific test file
pytest tests/test_main.pyProject Structure
mcp-server/
├── src/ # Source code
│ ├── main.py # FastAPI application
│ ├── models/ # Pydantic models
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ ├── database/ # Database configuration
│ └── utils/ # Utility functions
├── tests/ # Test files
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose (optional)
├── .env.example # Environment variables template
├── .gitignore # Git ignore patterns
├── .dockerignore # Docker ignore patterns
└── README.md # This fileConfiguration
Environment Variables
Variable | Description | Default |
| PostgreSQL connection URL | Required |
| Redis connection URL | redis://localhost:6379/0 |
| JWT secret key | Required |
| JWT algorithm | HS256 |
| JWT expiration time | 30 |
| Server host | 0.0.0.0 |
| Server port | 8000 |
| Debug mode | false |
Database Setup
-- PostgreSQL database बनाएं
CREATE DATABASE mcp_db;
-- User बनाएं (optional)
CREATE USER mcp_user WITH PASSWORD 'secure_password';
GRANT ALL PRIVILEGES ON DATABASE mcp_db TO mcp_user;Redis Setup
# Redis start करें
redis-server
# या Docker के साथ
docker run -d -p 6379:6379 redis:alpineSecurity Features
JWT-based authentication
Password hashing with bcrypt
CORS protection
Rate limiting
Input validation
SQL injection protection
XSS protection
Monitoring
Health Checks
# Server health check
curl http://localhost:8000/health
# Database connection check
curl http://localhost:8000/health/db
# Redis connection check
curl http://localhost:8000/health/redisLogging
Logs /logs/ directory में store होते हैं। Production में proper logging configuration set करें।
Deployment
Docker Deployment
# Production image build करें
docker build -t mcp-server:latest .
# Docker Compose के साथ
docker-compose up -dManual Deployment
# Gunicorn के साथ
gunicorn main:app -w 4 -k uvicorn.workers.UvicornWorkerContributing
Fork करें
Feature branch बनाएं (
git checkout -b feature/amazing-feature)Commit करें (
git commit -m 'Add amazing feature')Push करें (
git push origin feature/amazing-feature)Pull Request open करें
License
यह project MIT license के under है।
Support
समस्याओं के लिए GitHub Issues create करें या documentation पढ़ें।
Changelog
v1.0.0
Initial release
FastAPI integration
JWT authentication
Redis caching
Docker support
Comprehensive documentation
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.