Agent Context Hub
A reusable MCP server providing shared, versioned context across AI agents and devices via a private GitHub workspace, with tools to discover projects, bootstrap, query, and close out task state.
README
Agent Context Hub
Agent Context Hub is a reusable MCP server for shared, versioned context across AI agents and devices. It is not tied to OpenClaw: Codex, Claude Code, Hermes, Cursor, OpenClaw, and any client that supports Streamable HTTP MCP can connect to the same workspace.
Not a personal workbench. Agent Context Hub is not a dashboard, task manager, chat UI, or a new agent. It is shared-context infrastructure: the private Workspace is the data and facts layer; Agent Context Hub is the access, synchronization, permission, and revision layer.
It keeps human-readable Markdown and YAML in a private GitHub workspace repository and exposes a small MCP interface. This public repository contains only server code, tests, documentation, and generic examples.
What it solves
- Different agents and devices read the same current profile, rules, skills, and project state.
- GitHub
mainstays the source of truth instead of chat history or opaque agent memory. - Each device has its own token and can be revoked independently.
- Task closeouts write only allowed project-state files and reject stale concurrent updates.
MCP tools
| Tool | Purpose |
|---|---|
context_routes |
Discover projects, aliases, and routes. |
context_bootstrap |
Load minimal task context and return a workspace revision. |
context_query |
Search selected workspace scopes with source paths. |
context_closeout |
Write an evidence-backed closeout to approved files. |
context_review_candidate |
Accept, reject, or supersede one pending candidate without auto-promoting it to formal state. |
Quick start
git clone https://github.com/YOUR_ACCOUNT/agent-context-hub.git
cd agent-context-hub
npm install
npm test
export PERSONAL_CONTEXT_WORKSPACE="$PWD/templates/agent-context-workspace"
npm run dev
The stdio server is ready to add to an MCP client. It does not print normal console output after startup.
For a guided first setup, start with Quick start | 快速开始(中文).
Create your private workspace
Use templates/agent-context-workspace as the starter for a new private GitHub repository. Replace the sample profile, rules, projects, and route map with your own information.
Never publish that workspace. Do not put tokens, private keys, passwords, personal documents, or chat transcripts in it.
context-map.yaml is the important control file. It declares exactly which files a route can read and which project files a closeout may write.
common:
always_read:
- profile/RESPONSE_PREFERENCES.md
- rules/EVIDENCE_POLICY.md
routes:
sample_project_code:
project_id: sample-project
aliases: [sample-project, Sample Project]
task_aliases: [code, fix, review]
read:
- projects/sample-project/CURRENT_STATE.yaml
- projects/sample-project/NEXT_ACTIONS.md
write:
- projects/sample-project/CURRENT_STATE.yaml
- projects/sample-project/NEXT_ACTIONS.md
Remote deployment
For cross-device use, run the HTTP server on one trusted machine or server and connect clients through HTTPS.
- Deployment guide | 部署指南(中文)
- OpenClaw setup | OpenClaw 配置(中文)
- Client compatibility | 客户端兼容性(中文)
- Workspace setup | Workspace 初始化(中文)
- Agent prompts | Agent 提示词(中文)
- Phase-by-phase Prompt Pack | 分阶段提示词包(中文)
- Tailscale guide | Tailscale 教程(中文)
- Background service | 后台与开机启动(中文)
- Troubleshooting | 故障排查(中文)
- Real multi-device validation | 真实多设备验收(中文)
- Security model
The server reads GitHub through a GitHub App installed only on the private workspace repository. The app needs Contents: Read and write only if you enable context_closeout.
cp .env.example .env
# Fill in your own GitHub App and device-token values. Never commit .env.
npm run build
npm run http:start
Task lifecycle
- The agent calls
context_routesif it does not know the available routes. - The agent calls
context_bootstrapbefore work and savesworkspaceRevision. - The agent performs the task.
- On completion, pause, or block, it calls
context_closeoutwith that revision, a factual summary, evidence, and next actions. - The server checks the allowlist and concurrency, writes a Git commit, then returns the revision and commit URL.
Agents should not upload full conversations. Only concise, evidence-backed project state belongs in the workspace.
Verify
npm test
npm run typecheck
npm run build
License
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。