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
- Double-click
start.bat. - Confirm the source folders and Sheet scope.
- Mark the semantic rows and resolve every blocking diagnostic.
- Build the RAG index.
- 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:
- Check
start.batand the project YAML without changing files. - Wait for the user to complete the four-step local build.
- Add or refresh the stdio MCP only after
RAG索引构建完毕. - Call
get_projectand report the returned project and catalog statistics. - Use the narrowest read-only tool for later questions:
- known table and ID:
get_record; - known table and business term:
search_recordsorsearch_knowledge; - unknown table:
find_tablesfirst; - field meaning or allocation rule:
describe_table,describe_column,search_rules, orget_field_knowledge; - verified cross-table link:
trace_relationsorexplain_record.
- known table and ID:
- Cite workbook, Sheet, row, cell, or rule evidence in every answer.
- 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.