cortrix-mcp
v1.0.0rc2Cortrix MCP Server — expose the Cortrix HTTP API as MCP tools for IDE agents (Claude Code / Cline / Cursor).
Agent-native semantic storage for retrieval, memory, and API-driven AI applications. Documentation · Quickstart · Install with an AI Agent · Agent access · Compatibility · OpenAPI Cortrix provides a local-first semantic storage server with namespaces, documents, blocks, hybrid search, memory APIs, and Agent-oriented access paths. It is designed for applications and Agents that need a programmable retrieval layer rather than a one-off vector database wrapper.
Summary extracted from the README.
Cortrix
Agent-native semantic storage for retrieval, memory, and API-driven AI applications.
Documentation · Quickstart · Install with an AI Agent · Agent access · Compatibility · OpenAPI
Cortrix provides a local-first semantic storage server with namespaces, documents, blocks, hybrid search, memory APIs, and Agent-oriented access paths. It is designed for applications and Agents that need a programmable retrieval layer rather than a one-off vector database wrapper.
Architecture
The repository includes:
cortrix-server: the C++ backend and HTTP API.api/openapi.yaml: the public OpenAPI contract.cortrix-mcp/: an MCP server for IDE and Agent clients.sdk/python/: the Python SDK.cortrix-agent/: the built-in fixed-flow RAG chat service.web/: the local Web UI.
Documentation Map
Start here:
- Quickstart: start Cortrix with Docker, check readiness, and run a source-backed reranked query.
- Install with an AI Agent: give a terminal-capable AI Agent a version-pinned local setup and verification contract.
- First-value SupportOps demo: run the deeper source-build verification path with versioned assertions, trace evidence, and zero-residual cleanup.
- Partial success check: send four queries to the Quick Start and see how an incomplete result is reported in
coverage_ratioandnamespaces_failed. - Stack fit and adoption boundaries: review evidence-backed keep/add/replace/unknown decision cards.
- Agent access: choose between HTTP/OpenAPI, MCP, Python SDK, and the built-in Agent.
- Minimal agent examples: two short scripts for the retrieval step of an agent, one with the Python SDK and one through the MCP server.
- Namespace recovery check: kill the server in the middle of a batch write, restart it, and check that every document ends up whole; then query across two project namespaces.
- Compatibility and known status: current public status for API, MCP, SDK, Agent, auth, tenant/RBAC, memory extraction, benchmarks, and security hardening.
- Deleting and restoring documents: soft delete, the restore window, cleanup, and which keys can restore.
- OpenAPI spec: endpoint paths, schemas, security schemes, and response contracts.
- MCP README: MCP server setup and tool reference.
- Python SDK README: Python client setup and resource model.
- Built-in Agent README: FastAPI Agent service and chat endpoints.
- Linux NVIDIA CUDA operations: separate image, provider policy, deployment, verification, and rollback.
- Security policy: security reporting path.
- Contributing: development workflow and contribution checklist.
- Maintainers: ownership, acknowledgment targets, and recusal rules.
- Code of Conduct: community standards and private reporting.
Current Status
Cortrix is in active pre-release development. The public documentation uses these status labels:
Preview: available and documented. Cortrix is in pre-release, so verify it against your own runtime before production use.In development: present in part or being built; not supported yet. Do not rely on it.Not provided: the server in this repository does not serve it on this release line. Do not rely on it.
High-signal current status:
| Area | Status | Notes |
|---|---|---|
| OpenAPI file | Preview |
api/openapi.yaml is present and declares the public API surface. |
| Local server, health endpoints, namespaces, documents, query | Preview |
Core surfaces exist and are documented. |
| MCP server | Preview |
MCP tooling exists and has test coverage, with release-readiness still under review. |
| Python SDK | Preview |
SDK resources and tests exist, with compatibility still tied to the live API contract. |
| Built-in Agent chat | Preview |
Fixed-flow chat mode exists. It is the only executor mode. |
| Account login (email and password) | Not provided |
The server authenticates with API keys; see Compatibility. |
| Tenants, members, ACLs, and tenant isolation | In development |
Not supported yet. |
| Roles (RBAC) and quotas | In development |
Not supported yet. |
| Memory extraction | In development |
Not supported yet. |
| Database import | In development |
Not supported yet. |
Published retrieval-quality evidence: an immutable four-corpus CPU measurement bundle records 16 cells against Core 79a4eb17c62521338d1ac47a9749e6230e87e69b. SciFact, NFCorpus, and FiQA use every judged test query; Quora uses its full 522,931-document corpus and the first 2,000 of 10,000 judged queries. These retrieval measurements do not establish answer quality, production performance, security, competitive ranking, or business outcomes.
See Compatibility and known status before making production, security, benchmark, or integration claims.
Quickstart
Run the local Docker Quick Start with real embedding and reranking:
git clone https://github.com/cortrix/cortrix.git
cd cortrix
CORTRIX_SOURCE_REVISION="$(git rev-parse HEAD)" \
docker compose -f deploy/docker-compose.yml up --build --wait
curl -fsS http://127.0.0.1:8420/api/v1/system/health/ready
curl -fsS -H 'Content-Type: application/json' \
-d '{
"namespaces": ["demo"],
"query": "What does semantic storage keep close to the agents that need it?",
"top_k": 5,
"rerank": true
}' \
http://127.0.0.1:8420/api/v1/query
You need Git, Docker, and Docker Compose. No .env file, LLM provider key, host-side model tooling, manual model download, model conversion, or separate bootstrap command is required. The first start downloads about 1.17 GB of pinned model assets and can take several minutes; later starts reuse the cached volume.
The Quick Start publishes only the loopback API at 127.0.0.1:8420 (publishing on an isolated test network is an explicit, unauthenticated opt-in — see Quick Start). It uses BGE-M3 embedding and bge-reranker-v2-m3 reranking on CPU, while external LLM roles and the built-in Agent remain disabled. For model provenance, checks, expected output, cleanup, and scope boundaries, see Quick Start. For the deeper source-build evidence workflow, see the First-value SupportOps demo.
If you are using a terminal-capable AI Agent, use the Agent-assisted setup contract. It pins the release and commit, limits the agent to the same loopback-only Docker path, and requires a structured verification report.
API Reference
The canonical API contract is api/openapi.yaml.
The spec includes:
- local and cloud server URLs;
- API key and Bearer auth schemes;
- namespaces, documents, query, memory, watch, import, auth, admin, tenant, Agent, system, GC, and maintenance paths;
- request/response schemas and error schemas.
OpenAPI presence is not the same as runtime verification. Use the status in Compatibility as the public claim boundary for an endpoint.
Agent Access
Cortrix exposes four access paths:
| Path | Best for | Entry point |
|---|---|---|
| HTTP API / OpenAPI | Custom services and direct Agent calls | api/openapi.yaml |
| MCP server | IDE Agents and MCP-compatible clients | cortrix-mcp/README.md |
| Python SDK | Python applications and RAG pipelines | sdk/python/README.md |
| Built-in Agent | Local fixed-flow chat over Cortrix storage | cortrix-agent/README.md |
See Agent access for selection guidance and current support status.
Core Concepts
- Namespace: a logical collection boundary for documents, blocks, memory, and queries.
- Document: uploaded source material that can be parsed and indexed.
- Block: a searchable unit derived from a document or memory record.
- Query: a retrieval request over one or more namespaces.
- Memory: structured long-term information captured from interactions or explicit API calls.
- Agent surface: a programmatic path that lets an Agent use Cortrix through HTTP, MCP, SDK, or the built-in Agent service.
Configuration
The default local config template is config.yaml.example. Copy it into build/config.yaml before the first run:
cp config.yaml.example build/config.yaml
LLM-backed features are configured by role:
semantic_llm: the query-time LLM steps a request asks for, query variants (rag_fusion) and LLM rerank (llm_rerank). It is separate from the local ONNX embedding and cross-encoder reranker used by the primary Quick Start.vision_llm: OCR image enhancement.agent_llm: built-in Agent chat.doc_summary_llm: ingest-side summaries.enricher_llm: ingest enrichment.
Use placeholder values in documentation and real provider keys only in local ignored config files. Do not commit secrets.
Production And Security Notes
Cortrix is pre-release. Before using it outside local development, review:
- Compatibility and known status for what is in preview and what is still in development.
- Security policy for reporting.
config.yaml.examplefor auth and API key configuration.deploy/for deployment templates.
Do not assume production readiness for auth, tenant isolation, RBAC, quota enforcement, or memory extraction. Do not generalize the published retrieval-quality measurements to answer quality, latency, cost, security, or production performance.
Roadmap
Roadmap items are not current capabilities.
- Advanced autonomous Agent executors such as tool-use and plan-execute modes.
- Additional integration adapters beyond the currently documented surfaces.
- A remote MCP access path using stateless Streamable HTTP, with production-grade authentication, authorization, and deployment hardening. The current MCP capability is local stdio only.
- Production-readiness hardening for auth, tenant isolation, RBAC, quota, logging redaction, and deployment operations.
- Additional datasets and production-representative latency or cost measurements after separate methods and artifacts are accepted.
Community And Contribution
- GitHub Issues: bugs and feature requests.
- Issue templates: bugs, feature or integration proposals, and documentation reports.
- Security policy: security reports.
- Contributing: local development and pull requests.
- Code of Conduct: community standards and private conduct reports.
- Maintainers: ownership and acknowledgment targets.
License
Cortrix-authored material in v1.0.0-rc.2 and later releases is licensed under the Apache License 2.0; the historical v1.0.0-rc.1 release remains under AGPL-3.0-only, and third-party material retains its own license. See NOTICE.md for copyright and exception boundaries and CONTRIBUTING.md for the no-CLA, DCO 1.1 contribution policy.