Analytos Brain Omnigraph MCP Server

Analytos Brain Omnigraph MCP Server

This MCP server provides governed read access to the Analytos Brain knowledge graph, enabling content and GTM agents to retrieve approved entities and relationships with access control and citations.

Category
访问服务器

README

Analytos Brain on Omnigraph — Submission POC

This repository is a submission-ready proof-of-concept for the Analytos Org Context Layer / Analytos Brain assessment.

It demonstrates the required loop:

Ingest → Extract → Human Review → Merge to main → Dashboard + MCP → Agents produce real work

What is included

  • Omnigraph schema in omnigraph/schema/analytos.pg
  • Omnigraph query templates in omnigraph/queries/*.gq
  • Cedar policy sketch in omnigraph/policies/analytos.cedar
  • Python ingestion pipeline that emits Omnigraph-compatible JSONL
  • Idempotent deterministic IDs for nodes and edges
  • Review/approval flow with branch diffs and merge attribution
  • FastAPI dashboard for entity browsing, search, review, and recent changes
  • MCP wrapper exposing governed graph reads to agents
  • Content Agent and GTM Agent scripts
  • Tests covering idempotency, governance, access control, and agent output
  • Demo seed files matching the requested filenames

Note: The official private seed docs were not available in this chat, so this repo includes realistic demo seed files with the required filenames. If you have the official assessment seed files, replace files in seed-data/ and rerun the same commands.

Architecture

seed-data/*.md
  → pipeline.ingest
  → Gemini Flash extraction when GEMINI_API_KEY is set; deterministic fallback otherwise
  → runs/<run-id>/graph.jsonl
  → ingest/<run-id> branch
  → human review diff
  → approve merge to main
  → dashboard + MCP wrapper
  → content_agent.py and gtm_agent.py

The local graph store in .local_graph/state.json is used so the full demo can run without external services. The pipeline also emits Omnigraph-compatible JSONL and includes the real Omnigraph schema/query/policy files for a server-backed deployment.

Local setup

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Optional MCP dependencies:

npm install

Optional Omnigraph install:

curl -fsSL https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.sh | bash
omnigraph version

Optional: enable real Gemini LLM extraction

The repo runs without secrets, but for assessment compliance you should set a Gemini key locally or in hosting:

export GEMINI_API_KEY="your-rotated-google-ai-studio-key"
# optional
export GEMINI_MODEL="gemini-1.5-flash"

Never commit .env files or paste API keys into the repository.

Run the full local demo

bash scripts/demo.sh

This will:

  1. Ingest all seed docs into ingest/demo-run.
  2. Print the diff.
  3. Approve and merge into main as human-reviewer.
  4. Run Content Agent.
  5. Run GTM Agent.

Manual workflow

1. Ingest seed data

python -m pipeline.ingest --input seed-data --run-id seed-run

Expected result:

branch: ingest/seed-run
status: pending_review
nodes/edges extracted

2. Review the branch diff

python -m pipeline.review diff ingest/seed-run

3. Approve and merge

python -m pipeline.review approve ingest/seed-run

Only human-reviewer can merge. ingest-agent cannot write directly to main.

4. Start dashboard

uvicorn dashboard.backend.main:app --reload --port 8000

Open:

http://localhost:8000

Dashboard pages:

  • /entities — entity browser
  • /search — search approved knowledge
  • /review — pending branch review
  • /recent — merge/commit history

5. Run Content Agent

python agents/content_agent.py "Stockly inventory forecasting"

The Content Agent:

  • Uses only approved main-branch knowledge
  • Cites graph node IDs
  • Avoids EmailThread/internal-only nodes
  • Shows access-control check

6. Run GTM Agent

python agents/gtm_agent.py "Stockly"

The GTM Agent returns:

  • Target company profile
  • Persona to contact
  • Example companies
  • Opening angle grounded in proof points
  • Graph node citations

MCP usage

Install Node dependencies:

npm install

Run content-agent MCP wrapper:

ANALYTOS_ACTOR=content-agent node mcp/custom-wrapper/server.mjs

Run GTM-agent MCP wrapper:

ANALYTOS_ACTOR=gtm-agent node mcp/custom-wrapper/server.mjs

Claude Desktop-style configs are provided:

  • mcp/content-agent-config.json
  • mcp/gtm-agent-config.json

The MCP tool try_read_email_threads demonstrates policy behavior:

{
  "actor": "content-agent",
  "visible_count": 0,
  "denied_count": 2
}

Omnigraph-backed mode

The POC emits JSONL that follows the Omnigraph bulk load shape:

{"type":"Product","id":"product:stockly","data":{...}}
{"edge":"HAS_FEATURE","id":"edge:...","from":"product:stockly","to":"feature:stockly:demand-forecasting","data":{...}}

Initialize a real graph:

mkdir -p data
omnigraph init --schema omnigraph/schema/analytos.pg data/analytos-brain.omni

Load an approved run branch into Omnigraph:

omnigraph branch create ingest/seed-run data/analytos-brain.omni
omnigraph load --data runs/seed-run/graph.jsonl --mode merge --branch ingest/seed-run data/analytos-brain.omni
omnigraph branch merge ingest/seed-run --into main data/analytos-brain.omni

For cluster/server deployments, adapt omnigraph/cluster.yaml, then use:

omnigraph cluster validate --config omnigraph/cluster.yaml
omnigraph cluster plan --config omnigraph/cluster.yaml
omnigraph cluster apply --config omnigraph/cluster.yaml
omnigraph-server --cluster omnigraph/cluster.yaml --bind 0.0.0.0:8080

Tests

pytest -q

Covered criteria:

  • Idempotent re-ingestion
  • No direct writes to main by ingest-agent
  • Merge requires human-reviewer
  • content-agent cannot read EmailThread nodes
  • Content Agent has citations and no internal client leak
  • GTM Agent produces a prospecting brief

Assessment criteria mapping

Criterion Where implemented
Governance correctness pipeline/graph_store.py, pipeline/review.py, tests
Extraction quality pipeline/extract.py, structured entities/edges, source metadata
Agent output quality agents/content_agent.py, agents/gtm_agent.py
Access control omnigraph/policies/analytos.cedar, local policy in LocalGraphStore.can_read
Dashboard usability dashboard/backend/main.py
Engineering hygiene README, tests, reproducible scripts, clear repo structure

Known limitations

  • Gemini Flash extraction is implemented and used when GEMINI_API_KEY is set. The deterministic fallback remains for reproducible tests and demos without credentials.
  • The local graph store is a test/demo fallback. Production submission hosting should run Omnigraph server with cluster.yaml and the Cedar bundle.
  • The included seed docs are demo fixtures because the private official seed docs were not uploaded here.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选