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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.