SENTRA MCP
A minimal FastAPI-based MCP server that provides basic utility tools like ping and time functions. Designed for easy deployment with Docker support, authentication, and extensible architecture for future tool additions.
README
sentra-mcp
Minimal MCP-ready service built with FastAPI. It exposes a health endpoint, a discovery endpoint for tools, and an execution endpoint wired to two simple tools (ping, time). The service is designed to run locally (uvicorn), inside Docker, or on an OVH VPS behind a TLS-enabled reverse proxy.
Features
- FastAPI server with optional Bearer authentication (
MCP_AUTH_TOKEN). /health,/tools,/tools/executeendpoints.- NDJSON request logging middleware for easy ingestion by log processors.
- Modular tool registry ready for future additions (git, files, n8n, RAG, RBAC, metrics).
- Dockerfile based on
python:3.12-slimand Docker Compose profile exposing port8400. .envmanagement withpython-dotenvfor local runs.
Repository Layout
mcp/– application package (main.py, config, middleware, tools).docker/– container builds (Dockerfile,Caddyfilefor TLS reverse proxy).requirements.txt– Python dependencies..env.example– template for sensitive configuration.docker-compose.yml– brings up the API + optional Caddy reverse proxy..gitignore– ignores Python caches, env files, and other generated assets.
Local Development
- Create and activate a virtualenv; install dependencies.
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt - Copy
.env.exampleto.envand adjust values. - Launch the API.
uvicorn mcp.main:app --host 0.0.0.0 --port 8400 --reload - Test the endpoints (replace
TOKENifMCP_AUTH_TOKENis set).curl -fsSL http://localhost:8400/health curl -fsSL -H "Authorization: Bearer TOKEN" http://localhost:8400/tools curl -fsSL -H "Authorization: Bearer TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"ping","payload":{"message":"hello"}}' \ http://localhost:8400/tools/execute
Docker & Compose
cp .env.example .env
# Build and launch the stack (API + optional Caddy proxy)
docker compose up --build
- The API is served on
http://localhost:8400. - When the
reverse-proxyservice is enabled, the HTTPS endpoint ishttps://localhost:8443with certificates generated by Caddy on first run.
Healthcheck & Restart
The Compose file defines a healthcheck hitting /health every 30 seconds and uses restart: unless-stopped to keep the service online.
VPS Preparation Checklist
Run these steps on the OVH VPS before deploying:
- Inspect resources.
lscpu | egrep 'Model name|CPU\(s\)' free -h df -h / - Docker resource usage.
docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}' docker system df - Prune unused artifacts. Review before confirming.
docker container prune docker image prune docker volume prune docker network prune docker system prune - Remove conflicting services/ports.
sudo ss -tulpn | grep ':8400' sudo systemctl disable --now <legacy-service> - Update packages + reboot if required.
sudo apt update && sudo apt upgrade -y sudo reboot
Reverse Proxy with TLS (Caddy)
docker/Caddyfileconfigures Caddy as an HTTPS reverse proxy for the API.- Set the
DOMAINenvironment variable before running Compose to request real certificates via ACME (Caddy handles LetsEncrypt automatically). - For Cloudflare tunnel alternatives, swap the proxy container with your tunnel config and continue to terminate TLS at Cloudflare.
Firewall & OVH Network
- Configure the OVH control panel firewall to allow only the required IP ranges (your office, CI runners, ChatGPT connectors).
- On the VPS, restrict ports with UFW (example):
sudo ufw default deny incoming sudo ufw allow from <trusted-ip>/32 to any port 22 proto tcp sudo ufw allow from <trusted-ip>/32 to any port 80,443 proto tcp sudo ufw enable - Document the allowed IP list to keep parity between the OVH panel and the VPS firewall.
Validation (Local or VPS)
docker compose up --build(or deploy stack on VPS).- Check logs for NDJSON output (one entry per request).
- Validate endpoints:
curl -fsSL http://<host>:8400/health curl -fsSL -H "Authorization: Bearer TOKEN" http://<host>:8400/tools curl -fsSL -H "Authorization: Bearer TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"time"}' \ http://<host>:8400/tools/execute - Run
docker psand ensure only the MCP stack services are exposed. - Monitor resource usage (
htop,docker stats) for stability.
ChatGPT Developer Mode Integration
- Expose the MCP HTTPS endpoint publicly (DNS record -> proxy -> VPS port 8400).
- Verify valid TLS certificate (LetsEncrypt or Cloudflare).
- In ChatGPT → Connectors → Developer Mode, add the new server URL.
- Confirm the
pingandtimetools show up and respond to execution tests.
Future Enhancements
- Implement rich tools:
git.commit_push,files.write,n8n.trigger,doc.index,doc.query, ... - Add a lightweight vector store (Chroma/FAISS) and CPU embeddings for local RAG.
- Introduce RBAC, per-token quotas, and metrics exporters (Prometheus/OpenTelemetry).
- Harden reverse proxy (rate limiting, mTLS for internal hops, WAF in front of Caddy/NGINX).
- Automate VPS provisioning with Terraform + Ansible for repeatable deployments.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。