ACG

MCP搜索检索

提供方 未标注

搜索检索 未标注 未标注 社区 / 第三方 Claude DesktopClaudeCursorVS Code

为审计上下文生成(ACG)协议提供的独立MCP服务器——通过MongoDB实现可验证的事实核查与基于上下文的RAG。

一句话选型结论

按资料字段整理

ACG 属于搜索检索类 MCP 服务器,传输方式未标注,鉴权方式未标注,可直接接入 Claude Desktop、Claude、Cursor 等,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类搜索检索 传输方式未标注 鉴权未标注 部署方式未标注
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

搜索检索
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

搜索

安装与配置

未标注 未标注
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
联网搜索取证

让模型查最新资料并给出出处。

资料聚合

把一个主题的网页、文档集中抓回来整理。

情报与竞品检索

按关键词持续检索行业动态和竞品信息。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在搜索检索场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
ACG当前 未标注 未标注 未标注 无 未标注
Brave Search 433812ff 2 未标注 未标注 无 2026-05-17
Sequentialthinking 1 SSE · 服务端推送 远程部署 有 2026-05-18
Baidu Netdisk 未标注 未标注 未标注 无 2026-05-17
ragflow 未标注 stdio · 本地进程 本地部署 有 2026-04-11
mindsdb (430e18) 未标注 未标注 未标注 有 2026-05-17

服务器档案

搜索检索
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类搜索检索本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

13.9 KB
来自项目仓库与上游目录的原文,未做删改

ACG MCP Server

Standalone MCP server for the Audited Context Generation (ACG) Protocol — verifiable fact-checking and grounded RAG via MongoDB.

ACG provides a dual-layer standard for veracity assurance:
- UGVP (Layer 1): Atomic fact grounding with Claim Markers and Source Hash Identity (SHI)
- RSVP (Layer 2): Logical synthesis verification with Relationship Markers

Why ACG — what you can do with it

LLMs confidently state things that are wrong, and there is usually no way to
check
— the answer is a black box with no provenance. ACG fixes this by making
every answer auditable by construction:

  • Ground every fact to its source. Index a URL once and every later answer
    built from it carries inline Claim Markers like
    [C1:9f7a2c4d8e1b:css=#acg-chunk-aa-0] — the SHA-256-based SHI prefix
    fingerprints the exact source document, and the CSS selector points to the
    precise chunk inside it.

  • Verify instead of trust. acg_verify_claims re-fetches every source and
    fuzzy-matches each claim against the actual text, so verification is not a
    self-reported LLM opinion — it is an independent, repeatable check. A claim
    either exists in the cited source or it fails.

  • Know when the knowledge base is enough. acg_check_indexed returns a
    confidence score (HIGH / MEDIUM / LOW) before you ever hit the network, so
    you only fetch new pages when the index genuinely can't answer.

  • Get a machine-readable audit trail. acg_build_var emits a Veracity
    Audit Registry (SSR + RAR entries) — a JSON record of every claim, its
    source fingerprint, and every logical relationship between claims, ready to
    be consumed by downstream systems or humans.

  • Use it in two modes. Run the enforced workflow (acg_run_workflow)
    and get a complete, verified, audited answer in one call — or compose the
    individual tools any way your own workflow requires (see
    Two ways to use ACG).

In short: ACG turns "trust me, the model said so" into
"here is the claim, here is the exact source location, here is the
verification result, and here is the audit record."

Features

  • Enforced workflow → One call runs the whole pipeline: search, auto-index,
    ground, verify, audit (see Two ways to use ACG)
  • Index URLs → Extract text, chunk by sentences, generate embeddings, store in MongoDB
  • Search Sources → Semantic (vector) + keyword search across indexed content
  • Check Indexed → Confidence-scored lookup to avoid unnecessary web_fetch calls
  • Generate Grounded Text → Create verifiable output with inline Claim Markers
  • Verify Claims → Re-fetch sources, fuzzy-match claims against source text
  • Build VAR → Generate machine-readable Veracity Audit Registry (SSR + RAR)
  • Crawl & Index → BFS URL discovery + automatic ACG indexing pipeline
  • Reset Database → Drop all ACG collections (with confirmation guard)

Requirements

  • Python 3.11+
  • MongoDB instance (local or Atlas)
  • Atlas Vector Search is optional — falls back to keyword search if no embedding model

Installation

Requires Python 3.11+. A virtual environment is strongly recommended —
on recent Debian/Ubuntu (23.04+) and other PEP 668 distros, bare pip install
refuses to write to the system Python, so Option A is the reliable path there.

Option A: Virtual environment + editable install (recommended)```bash

git clone https://github.com/Kos-M/acg_mcp.git
cd acg_mcp

python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate

pip install -e .


This installs the package and its dependencies into the venv and puts the
`acg-mcp` command on PATH **while the venv is active**. Editable mode means
local code changes apply immediately — no reinstall needed.

MCP clients don't source your shell, so point them at the venv's binary
by absolute path instead of relying on PATH (see Connect from an MCP client).

### Option B: System-wide install (agents / CLI tools)

If you want `acg-mcp` available on PATH from **any** directory without a venv:```bash
git clone https://github.com/Kos-M/acg_mcp.git
cd acg_mcp
pip install -e .

If pip fails with externally-managed-environment (PEP 668), either use a venv
(Option A) or add --break-system-packages.

Option C: Run from source (no install)```bash

git clone https://github.com/Kos-M/acg_mcp.git
cd acg_mcp
pip install -r requirements.txt

Must be run from the project root:

python -m src.server


## Configuration

Copy `.env.sample` to `.env` and configure:```env
# MongoDB connection string (required)
MONGO_URI=mongodb://localhost:27017

# MongoDB database name (optional, default: acg_protocol)
MONGO_DB=acg_protocol

# Embedding model cache directory (optional)
EMBEDDING_CACHE_DIR=

# Vector search candidate cap (optional, default: 10000).
# Number of embedded chunks scanned per query. Raise it if your index
# exceeds this and you see false "LOW confidence" results.
ACG_VECTOR_MAX_CANDIDATES=10000

For MongoDB Atlas:```env
MONGO_URI=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/acg_protocol?retryWrites=true&w=majority


## Usage

### Run the MCP server (stdio transport)

**After installing with Option A or B:**```bash
# venv (Option A): works while the venv is active
# system-wide (Option B): works from any directory
acg-mcp

Without installing the CLI (source directory only):```bash
cd /path/to/acg_mcp
python -m src.server


### Run the enforced workflow from the CLI

The one-shot CLI runs the entire audited pipeline without an MCP client:```bash
# Query the index, print the grounded answer + audit footer
acg-mcp --workflow &quot;What does the README say about MONGO_URI?&quot;

# Same, but auto-index a URL first when confidence is LOW
acg-mcp --workflow &quot;How do I configure MongoDB Atlas?&quot; https://example.com/docs/setup

Connect from an MCP client

The server communicates over stdio. Claude Desktop and Opencode use
different config formats, so the examples below are split per client:
Claude Desktop uses the mcpServers key; Opencode uses a top-level mcp
key where every server needs &quot;type&quot; and command is an array.

Claude Desktop

Claude Desktop reads claude_desktop_config.json and uses the mcpServers
key. If you installed with Option A (venv), point at the venv binary —
clients don't source your shell:```json
{
"mcpServers": {
"acg-mcp": {
"command": "/absolute/path/to/acg_mcp/venv/bin/acg-mcp",
"env": {
"MONGO_URI": "mongodb+srv://..."
}
}
}
}


With a system-wide install (Option B), the bare command works directly:```json
{
  &quot;mcpServers&quot;: {
    &quot;acg-mcp&quot;: {
      &quot;command&quot;: &quot;acg-mcp&quot;,
      &quot;env&quot;: {
        &quot;MONGO_URI&quot;: &quot;mongodb+srv://...&quot;
      }
    }
  }
}

Opencode

Opencode reads opencode.json (or opencode.jsonc) and uses a top-level
mcp key. Local servers require &quot;type&quot;: &quot;local&quot;, command as an array
of the binary + args, and env vars under &quot;environment&quot; (not &quot;env&quot;):```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"acg-mcp": {
"type": "local",
"command": ["/absolute/path/to/acg_mcp/venv/bin/acg-mcp"],
"enabled": true,
"environment": {
"MONGO_URI": "mongodb+srv://..."
}
}
}
}


With a system-wide install (Option B), use the bare command:```json
{
  &quot;$schema&quot;: &quot;https://opencode.ai/config.json&quot;,
  &quot;mcp&quot;: {
    &quot;acg-mcp&quot;: {
      &quot;type&quot;: &quot;local&quot;,
      &quot;command&quot;: [&quot;acg-mcp&quot;],
      &quot;enabled&quot;: true,
      &quot;environment&quot;: {
        &quot;MONGO_URI&quot;: &quot;mongodb+srv://...&quot;
      }
    }
  }
}

Running from source directory

If you haven't installed the CLI, use the full path. Claude Desktop:```json
{
"mcpServers": {
"acg-mcp": {
"command": "python",
"args": ["-m", "src.server"],
"env": {
"MONGO_URI": "mongodb+srv://..."
}
}
}
}


Opencode — note `cwd` so `src.server` resolves relative to the project:```json
{
  &quot;$schema&quot;: &quot;https://opencode.ai/config.json&quot;,
  &quot;mcp&quot;: {
    &quot;acg-mcp&quot;: {
      &quot;type&quot;: &quot;local&quot;,
      &quot;command&quot;: [&quot;python&quot;, &quot;-m&quot;, &quot;src.server&quot;],
      &quot;cwd&quot;: &quot;/path/to/acg_mcp&quot;,
      &quot;environment&quot;: {
        &quot;MONGO_URI&quot;: &quot;mongodb+srv://...&quot;
      }
    }
  }
}

> Important: When using python -m src.server, run the MCP client from
> the project root (/path/to/acg_mcp) or set cwd in the MCP config.

Config locations

Tool Config File Scope
Claude Desktop claude_desktop_config.json User-wide
Opencode ~/.config/opencode/opencode.json User-wide (global)
Opencode opencode.json / opencode.jsonc (project root) Per-project (local)

Two ways to use ACG

ACG ships both an enforced end-to-end workflow and the individual tools
it is built from. Use whichever fits your task.

1. Enforced workflow — the whole protocol in one call

Call acg_run_workflow(query, url=&quot;&quot;) and the server runs the full
pipeline for you, in this order:

  1. search — search the indexed sources for the query
  2. index — if confidence is LOW and a url was provided, index it
    first, then re-search (auto-fetch)
  3. ground — compose a grounded answer with inline UGVP Claim Markers
  4. verify — re-fetch every cited source and fuzzy-match each claim
  5. audit — build the Veracity Audit Registry (SSR + RAR)

The single returned report contains everything: the grounded answer,
per-claim verification results, a Chunk Signatures Table, and the
audit footer — [Claims Verified: x/y], [ACG Accuracy: N%],
[ACG Signed: ACG Protocol]. You get a verifiable answer without
orchestrating any of the steps yourself.```jsonc
// acg_run_workflow("What is the pricing of the flash model?")
{
"query": "What is the pricing of the flash model?",
"workflow": ["search", "ground", "verify", "audit"],
"confidence_tier": "HIGH",
"grounded_answer": "Flash input tokens cost $0.14 per 1M [C1:9f7a2c4d8e1b:css=#acg-chunk-aa-0].",
"claims_verified": "1/1",
"acg_accuracy": 100.0,
"acg_signed": "ACG Protocol",
"var": { "protocol": "ACG/1.0", "ssr_entries": [ / ... / ], "rar_entries": [] }
}


### 2. Individual tools — adapt ACG to your own workflow

Every step is also available as a standalone tool, so you can compose
exactly the pipeline your workflow needs — different chunking, custom
verification thresholds, your own retrieval strategy, or ACG used purely
as a post-generation audit layer.

| Tool | When to use it |
|------|----------------|
| `acg_index_url` | You have a URL and want it in the knowledge base |
| `acg_check_indexed` | You want to know if the index can answer before fetching anything |
| `acg_search_sources` | You want raw matching chunks with scores, to build your own answer |
| `acg_generate_grounded_text` | You have an answer and want to attach Claim Markers to it |
| `acg_verify_claims` | You have marked text and want an independent verification pass |
| `acg_build_var` | You want the machine-readable audit record (SSR + RAR) |
| `acg_crawl_and_index` | You have a docs site and want it indexed as a whole |

For example, a &quot;verify-only&quot; workflow that audits text generated elsewhere:```text
acg_generate_grounded_text(claim, shi_prefix, css_selector)
    -&gt; acg_verify_claims(grounded_text)
    -&gt; acg_build_var(grounded_text)

Usage from other tools & agents

Once installed with Option A (venv) or Option B (system-wide), any tool or
agent on the machine can use acg-mcp by referencing it in their MCP configuration.
Add it to the agent's global Opencode config
(~/.config/opencode/opencode.json) using Opencode's mcp syntax:json { &quot;$schema&quot;: &quot;https://opencode.ai/config.json&quot;, &quot;mcp&quot;: { &quot;acg-mcp&quot;: { &quot;type&quot;: &quot;local&quot;, &quot;command&quot;: [&quot;acg-mcp&quot;], &quot;enabled&quot;: true, &quot;environment&quot;: { &quot;MONGO_URI&quot;: &quot;mongodb://localhost:27017&quot; } } } }

The agent can then call ACG tools directly:
- acg_run_workflow() — One call: full verified, audited answer
- acg_check_indexed() — Check if answers exist in indexed sources
- acg_index_url() — Index new URLs
- acg_verify_claims() — Verify grounded text claims
- acg_search_sources() — Search indexed knowledge base

Passing environment variables

Pass MONGO_URI and other config via the env field (Claude Desktop) or
environment field (Opencode) in the MCP config. The server also loads
.env from the project directory (via python-dotenv) when installed
editable (pip install -e .) or run from the project root.

Available Tools

Tool Description
acg_run_workflow Enforced pipeline — search, auto-index, ground, verify, audit in one call
acg_index_url Index a URL for ACG — fetches, chunks, embeds, stores
acg_check_indexed Check if a query has results in indexed sources
acg_search_sources Search indexed sources by keyword
acg_list_sources List all indexed sources
acg_count_sources Count total indexed sources
acg_generate_grounded_text Create text with Claim Markers (UGVP)
acg_verify_claims Verify claims against their sources (fuzzy matching)
acg_build_var Build Veracity Audit Registry (SSR + RAR)
acg_crawl_and_index Crawl + index multiple URLs (background support)
acg_crawl_status Check background crawl task status
acg_crawl_list_tasks List all background crawl tasks
acg_reset_database ⚠️ Delete all indexed data (requires confirm=true)

Database Collections

The server uses a standard MongoDB collection structure:

Collection Purpose
sources Source metadata (url, shi_prefix, url_hash, total_chunks)
data Chunks with embeddings (source_id, text, sentences, embedding)
claims Verified claims (claim_id, shi_prefix, claim_text, verified)
relationships RSVP relationship records (rel_id, rel_type, claim_ids)
var_entries Veracity Audit Registry entries

Indexes are auto-created on first connection.

License

MIT

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
ACG 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

ACG 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

ACG 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

ACG 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

ACG 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、VS Code、Codex、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

ACG 能提供哪些能力?

资料显示能力标签包括 搜索。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。