expert-factory
Builds a queryable knowledge graph from a pack of repos, papers, and notes, and serves it to agents via MCP, enabling search, source reading, and neighbor exploration.
README
expert-factory
ef builds a queryable expert out of a pack of material — cloned repos,
fetched pages, papers, and your own notes — and serves it to an agent as one
knowledge graph over stdio MCP, plus a skill that teaches the agent to use it.
uv tool install . # or: pipx install .
One install carries the whole toolchain: ef imports graphify as a library, so
there is no separate binary, interpreter, or container to line up.
Build a pack
Packs live in ./experts/<name>, resolved from the current directory — so a
workspace is just a directory you cd into, and ef never searches upward.
ef clone research https://github.com/effect-ts/effect --title "Effect TS"
ef clone research https://github.com/some/monorepo --paths content/docs
ef add research https://arxiv.org/pdf/2501.12345
ef add research ~/Downloads/notes-on-fibers.md
ef build research
ef build extracts everything in the pack into a single graph and writes the
skill. Semantic extraction is the default and spends LLM tokens; --code-only
takes the cheap AST-only path and drops docs, papers and images from the
semantic pass. --backend is required only when an LLM is actually invoked.
Each pack holds four content layers plus its graph and metadata:
| Path | Contents |
|---|---|
repos/<owner>/<repo>/ |
Pristine clones, fast-forwarded by ef update |
raw/ |
Fetched pages, papers and images, with provenance frontmatter |
notes/ |
Markdown you wrote yourself |
graph/ |
graph.json, GRAPH_REPORT.md, and converted/ PDF text sidecars |
expert.json |
The authoritative source list: origin, lifecycle, checksums |
SKILL.md |
Generated skill teaching agents the served tools |
The graph sits at graph/ rather than inside a clone, so git status in a
checkout stays clean and every clone can always fast-forward.
expert.json is authoritative, not a cache: every file in raw/ and notes/
needs an entry. ef build refuses on files with no recorded origin (listing
them, and suggesting --adopt-all) and on entries whose file is gone, because a
graph that misreports its own coverage is worse than one that fails to build.
Extraction deliberately ignores VCS ignore files. A pack holds material that is
meant to stay uncommitted, so any sane workspace gitignores repos/ and
graph/ — and since the extractor walks up to the VCS root, honoring those
rules would let the line that keeps a pack out of git silently empty its corpus.
The pack's generated .graphifyignore still applies, and it restates the
credential patterns (.env, *.pem, id_rsa, …) that the clone's own
.gitignore would otherwise have covered, so a stray secret is never sent to an
LLM.
Serve a pack
ef run is a plain stdio process — no container, port, image, or daemon. It
writes nothing and validates the pack before the MCP handshake, so being spawned
in the wrong directory fails with a readable message instead of a dead transport.
{
"mcpServers": {
"research expert": {
"command": "sh",
"args": ["-c", "cd /abs/path/to/experts/research && exec ef run"]
}
}
}
The cd is the shell's job, not a cwd key: Claude Code ignores cwd on a
stdio server and spawns the process wherever the client was launched, where
ef run would find no manifest and exit. The pack is addressed by that one
path, so moving or copying it only changes that line. Copy its SKILL.md to
~/.claude/skills/<name>-expert/SKILL.md (or the consuming project's
.claude/skills/).
Tools: search (graph traversal), read_source (real text behind a node —
code, a fetched page, a paper, or a note), neighbors (callers, imports,
references), corpus_info (size, source composition, last reconciled).
Keep it fresh
ef update research # pull every refreshable source, then refresh the graph
ef sync research # rewrite manifest and skill from the graph on disk
ef list # every pack: nodes, size, last reconciled, composition
ef update fast-forwards each git source (refusing rather than discarding local
modifications), then picks a refresh path and prints which one and why:
- noop — nothing changed upstream.
- ast — only code changed. Cheap, no LLM.
- semantic — a doc, paper or image changed. graphify's AST-only update deliberately preserves existing semantic nodes, so a doc change has to force the expensive path or the graph keeps describing text that is no longer there.
Fetched pages and papers are snapshots with no refresh lifecycle; a changed checksum is reported as information, not as a broken pack.
A refresh re-extracts only what changed: graphify's semantic cache is left
readable, so unchanged files cost nothing the second time. --force bypasses
that cache and rebuilds the whole corpus — correct after changing the backend,
model or scope, and otherwise just an expensive way to get the same graph.
Both ef build and ef update then name the communities and rewrite
GRAPH_REPORT.md, because extraction detects communities without naming them
and never writes the report — skipping it would leave the pack describing a
graph that no longer exists. The first labeling pass spends a few LLM calls;
later ones reuse the saved names and only rename communities whose membership
actually changed.
Layout
src/ef/—workspace(cwd-based pack resolution),manifest,scoping,sources,extraction,skill,server,clitests/— pytest against real entry points and emitted artifacts; no test spends an LLM token
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。