Provides RAG (Retrieval-Augmented Generation) capabilities using OpenAI's API for document embedding and question-answering over ingested files stored in a Postgres vector database
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., "@Production-Ready FastMCP Serverrag_ask what are the refund policies?"
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 (FastMCP) and Client
Production-ready server and a production-grade client with structured logging, env config, health checks, metrics, and containerization.
Features
Server: Stdio and SSE runtimes via FastMCP, CORS & security headers, token auth, basic rate limiting
Client: SSE and stdio transports, CLI to list tools/call tools/get resources, structured logs
Structured JSON logging with
structlogEnv-based configuration
Health endpoints and CLI checks
Prometheus metrics primitives
Dockerfile and Makefile
Requirements
Python 3.9+
Setup
ls -la .venv
python3 -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
# . .venv/bin/activate for linux
# pip install -U pip
pip install -e .[dev]Copy and adjust environment:
cp .env.example .env || trueRun (stdio)
mcp-server-stdioRun (SSE)
mcp-server-sse # uses HOST, PORT, AUTH_TOKEN, CORS_ORIGINSHealth
mcp-server-healthDocker
docker build -t mcp-server:latest .
docker run --rm -p 8000:8000 -e AUTH_TOKEN=changeme mcp-server:latestClient CLI
Environment (SSE example):
export MCP_CLIENT_TRANSPORT=sse
export MCP_SSE_URL=http://localhost:8000/sse
export AUTH_TOKEN=changeme # if server requires itList tools:
mcpx list-toolsCall tool:
mcpx call-tool add --args '{"a": 1, "b": 2}'Get resource:
mcpx get-resource time://nowHealth check:
mcpx healthSecurity
Set a strong
AUTH_TOKENin production for SSE modeRestrict
CORS_ORIGINSto trusted originsRun the container as non-root (Dockerfile does)
Prefer TLS for SSE (
VERIFY_TLS=1)Limit client network egress in production and rotate tokens regularly
RAG (Postgres + pgvector)
Set
DATABASE_URL(orPG*envs) andOPENAI_API_KEY.Enable
vectorextension in Postgres (the app will attempt to create it).
Ingest files via CLI:
python -m rag.cli ingest path/to/dir path/to/file.pdfAsk a question via CLI:
python -m rag.cli ask "What does the document say about refunds?"Query with citations via client:
mcpx rag-query "What does the document say about refunds?" --server http://localhost:8000HTTP endpoints (when server running):
POST /rag/upload(multipart form withfiles)POST /rag/queryJSON{ "question": "..." }GET /rag/chunk/{chunk_id}(get chunk metadata)
MCP tool:
rag_ask(question: str) -> str
OpenTelemetry Tracing
Enable distributed tracing with:
export OTEL_ENABLE=1
export OTEL_SERVICE_NAME=mcp-server
export OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:14268/api/tracesTraces include:
RAG ingestion: file parsing, chunking, embedding, DB operations
RAG retrieval: vector search, BM25 reranking, context assembly
LLM calls: token usage, model info, latency
Database operations: SQL queries, connection pooling
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.