acg_run_workflowLABSCO SUMMARY
Verification here means re-reading the source, not asking the model again.
Most citation features stop at attaching a URL, which proves nothing about whether the sentence is in it. Re-fetching the page and fuzzy-matching each claim against the actual text is a different and much stronger guarantee — a claim either survives that check or it does not. The confidence tier is the practical companion: it tells you whether the index can answer before you spend a fetch. If large indexes start reporting LOW confidence wrongly, the candidate cap is the setting to raise.
What it is
An MCP server for grounded retrieval with verification attached. You index URLs into MongoDB; answers built from that index carry inline claim markers naming the source fingerprint and the chunk within it. A separate tool re-fetches each cited source and fuzzy-matches the claim against the real text, so verification is an independent check rather than the model's own opinion.
What you get
acg_run_workflowruns the whole pipeline in one call — search, auto-index if confidence is low and a URL was supplied, ground, verify, audit — and returns the answer with per-claim verification results and an audit footeracg_check_indexedreturns a confidence tier of HIGH, MEDIUM or LOW before any network call, so you only fetch a new page when the index genuinely cannot answeracg_index_urlfetches, chunks by sentence, embeds and stores a page;acg_crawl_and_indexdoes a whole documentation site with background task support, tracked byacg_crawl_statusandacg_crawl_list_tasksacg_search_sourcesreturns matching chunks with scores for building your own answer;acg_list_sourcesandacg_count_sourcesinspect the indexacg_generate_grounded_textattaches claim markers to text, andacg_verify_claimschecks marked text against the cited sources — which makes a verify-only pass over text generated elsewhere possibleacg_build_varemits the machine-readable audit record, listing every claim, its source fingerprint and the relationships between claimsacg_reset_databaseclears everything, and requires an explicit confirmation flag
Requirements
Python 3.11 or higher and a MongoDB instance, local or Atlas. Install into a virtual environment with pip install -e ., which puts acg-mcp on the path; MCP clients should be pointed at the absolute path of that binary rather than relying on the shell. MONGO_URI is required, MONGO_DB defaults to acg_protocol, and ACG_VECTOR_MAX_CANDIDATES caps how many embedded chunks a query scans — raise it if a large index starts returning false LOW confidence. Atlas Vector Search is optional; without an embedding model it falls back to keyword search. A one-shot CLI mode runs the full pipeline without any MCP client.
Setup effort
Build from source — git clone https://github.com/Kos-M/acg_mcp.git
USE CASES
Answering from your own documents with citations that hold up
Run the full pipeline and get the answer, the per-claim verification results and the audit record together.
Deciding whether to fetch a page at all
Check the index first and only crawl when the confidence tier says it cannot answer.
Auditing text that was written somewhere else
Attach claim markers to existing text, verify them against the sources, then build the audit record.
Indexing a whole documentation site
Crawl it in the background and check on the task rather than waiting on one long call.
13 tools
Listed in project docs. Your client may show a different list.
acg_index_urlacg_check_indexedacg_search_sourcesacg_list_sourcesacg_count_sourcesacg_generate_grounded_textacg_verify_claimsacg_build_varacg_crawl_and_indexacg_crawl_statusacg_crawl_list_tasksacg_reset_databaseBEFORE YOU INSTALL
What to know first
Tools you get
13 tools named in the project's documentation.
Requires
- Python 3.11+
- A MongoDB instance, local or Atlas, with its connection string in MONGO_URI
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/Kos-M/acg_mcp.git
cd acg_mcp
python -m venv venv
source venv/bin/activate
pip install -e .MCP Clients
Claude Desktop
{
"mcpServers": {
"acg-mcp": {
"command": "<YOUR_PATH_TO_ACG_MCP>/venv/bin/acg-mcp",
"env": {
"MONGO_URI": "<YOUR_MONGO_URI>"
}
}
}
}<YOUR_PATH_TO_ACG_MCP> is the full path to the acg_mcp folder you cloned, and <YOUR_MONGO_URI> is your MongoDB connection string. Clients do not load your shell, so they are pointed at the venv's acg-mcp; after a system-wide pip install -e . the bare command acg-mcp works too.
OpenCode
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"acg-mcp": {
"type": "local",
"command": [
"<YOUR_PATH_TO_ACG_MCP>/venv/bin/acg-mcp"
],
"enabled": true,
"environment": {
"MONGO_URI": "<YOUR_MONGO_URI>"
}
}
}
}<YOUR_PATH_TO_ACG_MCP> is the full path to the acg_mcp folder you cloned, and <YOUR_MONGO_URI> is your MongoDB connection string. Clients do not load your shell, so they are pointed at the venv's acg-mcp; after a system-wide pip install -e . the bare command acg-mcp works too.