This policy covers the code in this repository: the MCP servers (mcp_server.py, mcp_server_http.py), the rag_indexer package and the llm-context CLI (rag_indexer/cli.py, also reachable through cli.py).
llm_context is designed as a local component that runs on a developer machine next to a PostgreSQL instance with pgvector.
- The HTTP server binds to
127.0.0.1by default and validates theHostandOriginheaders against allowlists (MCP_ALLOWED_HOSTS,MCP_ALLOWED_ORIGINS). - Optional bearer authentication: when
MCP_AUTH_TOKENis set, every HTTP endpoint (including/health) requiresAuthorization: Bearer <token>. The server refuses to start on a non-loopbackMCP_HOSTunless a token is configured. The token is not a substitute for TLS: put a TLS-terminating proxy in front of the server if traffic leaves the machine. - Exposing the HTTP server beyond localhost is outside the intended deployment. If you do it, set
MCP_AUTH_TOKENand add network-level access control. - Embedder, model and embedding dimension are server-side settings only (environment and config). MCP clients cannot select a model; a client value that differs from the server setting is rejected. Client-controlled sizes (
top_k,limit,max_chars,query_text,query_embedding, request body) are capped. - Retrieval is project-scoped through an explicit project registry. Ingest and write operations are controlled by
ingest_enabledandwrite_enabled, which default tofalse, and the ingest path is not exposed as a standard MCP tool. - Indexed content is whatever you ingest. Anything indexed can be returned by retrieval tools to the connected MCP client. Use
exclude_globsand the registry include rules to keep secrets and sensitive files out of the index. - Database credentials are supplied through environment variables or CLI arguments, never stored in the repository.
.envfiles are ignored by git; only.env.exampleis tracked.
Please do not open a public issue for security problems.
- Preferred: use GitHub Security Advisories for this repository ("Security" tab, "Report a vulnerability").
- If that is not available, open an issue that only asks for a private contact channel, without technical details.
Include the affected version or commit, reproduction steps and the expected impact. Reports are handled on a best-effort basis.
- Deployments that expose the server to untrusted networks without additional protection.
- Content that users choose to index, including secrets present in indexed files.
- Vulnerabilities in third-party dependencies (PostgreSQL,
pgvector,sentence-transformersand others) that are not caused by how this project uses them. Report those upstream. - Denial of service through very large local inputs on a machine you already control.