Give TableRAG to an AI client

August 13, 2026 · View on GitHub

TableRAG keeps the spreadsheet catalog outside the model context and gives the AI only the records and evidence needed for the current question. Complete the local index before connecting an AI client.

Local setup

  1. Double-click start.bat.
  2. Confirm the source folders and Sheet scope.
  3. Mark the semantic rows and resolve every blocking diagnostic.
  4. Build the RAG index.
  5. Tell the AI exactly RAG索引构建完毕.

The source spreadsheets remain read-only throughout this workflow.

Codex CLI

After the Web workbench reports a successful build, add the local stdio server:

codex mcp add TableRAG -- `
  "C:\path\to\table-rag-mcp\.venv\Scripts\table-rag.exe" `
  mcp `
  --project "C:\path\to\table-rag-mcp\projects\your-project.local.yaml" `
  --transport stdio

Verify the connection:

codex mcp list

Then ask Codex to call TableRAG.get_project. A connection is not considered delivered until that call returns the expected project identity and catalog statistics.

Generic desktop MCP configuration

{
  "mcpServers": {
    "TableRAG": {
      "command": "C:\\path\\to\\table-rag-mcp\\.venv\\Scripts\\table-rag.exe",
      "args": [
        "mcp",
        "--project",
        "C:\\path\\to\\table-rag-mcp\\projects\\your-project.local.yaml",
        "--transport",
        "stdio"
      ]
    }
  }
}

The workbench generates these paths from the active project. Prefer its Copy MCP config button when connecting a different checkout or project YAML.

Copy this instruction to an AI

The Web workbench's Copy the complete setup instruction for AI button expands the active local paths automatically. The copied instruction requires the AI to:

  1. Check start.bat and the project YAML without changing files.
  2. Wait for the user to complete the four-step local build.
  3. Add or refresh the stdio MCP only after RAG索引构建完毕.
  4. Call get_project and report the returned project and catalog statistics.
  5. Use the narrowest read-only tool for later questions:
    • known table and ID: get_record;
    • known table and business term: search_records or search_knowledge;
    • unknown table: find_tables first;
    • field meaning or allocation rule: describe_table, describe_column, search_rules, or get_field_knowledge;
    • verified cross-table link: trace_relations or explain_record.
  6. Cite workbook, Sheet, row, cell, or rule evidence in every answer.
  7. State what evidence is missing instead of guessing or silently scanning the whole Excel folder.

Streamable HTTP

For a local HTTP client:

uv --directory "C:\path\to\table-rag-mcp" run table-rag mcp `
  --project "C:\path\to\table-rag-mcp\projects\your-project.local.yaml" `
  --transport streamable-http `
  --host 127.0.0.1 `
  --port 8765

The endpoint is http://127.0.0.1:8765/mcp. Do not expose it beyond localhost without explicit authentication and a network policy.