convez.ai
MCP Server
repantis-ai

doc-cais-mcp

repantis-ai/doc-cais-mcp

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server for documentation-focused hybrid retrieval over code, docs, tests, and examples.

Instalação

$npx convez-ai repantis-ai/doc-cais-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
2

README

A tradução para o português deste README ainda está na fila.

doc-cais-mcp

Read-only MCP demo for documentation-focused hybrid retrieval over code, docs, examples, and tests.

This is a small public demo of Context-as-AI-Service (CAIS) for LLM-generated developer documentation. It builds a local hybrid index over a synthetic SDK and returns evidence packs that an agent can use when reviewing or writing docs.

Link to preprint paper: arXiv

The server does not write files, execute project code, call external APIs, or decide what the documentation should say. It only retrieves and packages evidence with provenance.

Why this exists

Documentation can look correct in the local file while depending on behavior elsewhere in the codebase.

This demo shows a tiny version of that failure mode:

  • docs/refunds.md describes refunds.
  • client.py implements the public API.
  • auth.py hides the required permission scope.
  • errors.py defines failure modes.
  • ledger.py contains idempotency behavior.
  • tests/test_refunds.py captures expected behavior.
  • examples/refund_example.py shows usage.

CaaS gives an agent a tool-callable way to retrieve that cross-file evidence.

Install

pip install -e .

Run

python -m doc_caas_mcp.server

The server talks MCP over stdio, so it won't print anything when it starts. It just waits for a client to connect. Press Ctrl+C to stop it.

Connect it to Claude Code

Put a .mcp.json file in the root of the repo:

{
  "mcpServers": {
    "doc-caas-mcp": {
      "command": "python",
      "args": ["-m", "doc_caas_mcp.server"]
    }
  }
}

On Windows swap in the launcher if you need it:

{
  "mcpServers": {
    "doc-caas-mcp": {
      "command": "py",
      "args": ["-3.12", "-m", "doc_caas_mcp.server"]
    }
  }
}

Claude Code won't load a server from .mcp.json until you approve it. The first time, accept the trust prompt or run /mcp, then reload. After that the four tools show up named mcp__doc-caas-mcp__*.

Demo

Once the server is approved, /mcp shows it as connected:

doc-caas-mcp connected in Claude Code

Ask the agent to review a doc against the code, for example "Review docs/refunds.md for correctness. Use the doc-caas-mcp tools to check whether it matches the actual implementation, and flag anything missing or wrong." The agent starts calling the tools:

Agent asked to review the refunds doc

Each tool call is gated by a permission prompt the first time:

Permission prompt for the search_context tool

The tool returns ranked evidence with file paths and line numbers, so the agent can trace a claim in docs/refunds.md back to the code it depends on:

search_context returning evidence with provenance

Tools

  • build_index(root) builds the read-only index. Leave root empty to use examples/tiny_sdk.
  • search_context(query, mode, top_k) searches the index. mode can be hybrid, keyword, or vector.
  • doc_context_pack(topic, queries, top_k) returns a deduped, ranked evidence pack with provenance.
  • index_status() shows what's currently indexed.

Smoke tests

python scripts/smoke_search.py
python scripts/smoke_pack.py
python scripts/smoke_server_core.py

Large repositories

For large repositories, index a subsystem together with its tests, examples, and docs.

Do not index only the package directory if the tests or prose docs live elsewhere. Cross-file documentation review only works when the indexed root contains the evidence chain the agent is supposed to inspect.

Ver o original no GitHub

Bom para

Relacionados