reins MCP Server
Provides tools for AI coding agents to read and write shared team context, including status, pending items, and handoffs. Enables agents to query current project status and claim pending work.
README
reins
Shared context for teams that build with AI coding agents.
Live: reinshq.vercel.app · install the hook: npx reins-hook install
What it is
When a team codes with AI agents, each person's agent works on its own. Nobody can easily see
what a teammate's agent is doing, so people duplicate work, edit the same files without knowing,
and fall back to standups and a context.md that goes stale within a day.
Reins watches what each agent is doing, summarizes it into a short per-person and per-team status, and makes that status available in two places: a dashboard a admin can read, and an MCP server any teammate's agent can query before it starts work.
It is a small project, built for the 0G Zero Cup. The capture, the distillation, and the retrieval all work end to end today.
How it works
Claude Code hook -> reins server -> distill (triage, extract, reconcile, rollup)
|
|-- dashboard (Next.js, live over SSE)
|-- MCP server (reins_context, reins_pull_context, ...)
A hook in each teammate's Claude Code posts their prompts and agent turns to the reins server. The server runs each event through a short pipeline and keeps a current status per person and per project. The dashboard streams updates over SSE, and the MCP server lets any agent pull the same status as plain markdown.
The distillation pipeline
Each incoming event is processed in steps so that most of the noise is dropped early:
- Triage (fast model) sorts the event into noise, minor, or major. Low-value events stop here.
- Extract pulls structured facts: intent, actions, files touched, decisions, blockers, next steps.
- Reconcile merges those facts into the person's current status by calling tools that update
state:
set_headline,set_goal,set_status,add_timeline,add_pending,resolve_pending,set_working_on. - Rollup (debounced) summarizes the whole team for a lead: a short status, goal alignment, collisions (two people in the same file), and risks.
If no inference backend is configured, Reins still captures raw events but does not distill them.
Where 0G fits
- Inference runs on 0G Compute. The whole pipeline above calls the 0G Private Computer router, which is OpenAI compatible.
- Snapshots live on 0G Storage. Each context snapshot is written to 0G Storage and addressed by
its Merkle root hash, so the shared context can be pulled and verified from anywhere, not only
from this server's database. The MCP
reins_pull_contexttool rebuilds a snapshot from a hash alone, with no local state, which is something a plain database cannot do.
What works today
The pipeline is built around teams of people who each run a coding agent. What is working now:
- Capture from Claude Code through a hook, installed with one command.
- Distillation on 0G Compute: triage, extract, reconcile, and a debounced team rollup.
- A current status per person (headline, goal, what they are working on, recent timeline, pending items).
- A team rollup for a lead: summary, goal alignment, file collisions, and risks.
- Handoffs and @mentions, created automatically when two agents touch the same file or one is blocked on another's work.
- A live dashboard over SSE, and an MCP server so any teammate's agent can read or write the shared context.
- Verifiable, portable snapshots on 0G Storage, including
reins_pull_contextto rebuild context from a hash. - Multi-tenant auth (workspaces and tokens) and a simple deploy to Vercel plus a small VM.
Roadmap
- More agent harnesses. Today capture is wired for Claude Code. Add hooks for other coding agents (Cursor, opencode, pi, Aider, codex, koda and more) so a team on mixed tools still shares one context.
- Agents and sub-agents without a human in the loop. Capture from agents running in autonomous loops, and from sub-agents that a parent agent fans out, so the shared context keeps updating even when nobody is typing.
- Agents that act on the context. Let an agent claim and resolve pending work through the MCP write tools, so up-for-grabs items get picked up without a person.
- Cross-instance sync over 0G Storage. Two teams hand over a single root hash to share context, with no shared server.
- Optional on-chain anchoring on 0G Chain, so the history of snapshot hashes is a tamper-evident audit trail.
- Smarter retrieval that ranks and trims context, so an agent pulls only what is relevant to its task.
- Digests to Slack or Discord for the humans who still want a glance.
Quick start
npm run install:all
# 1) configure inference (runs on 0G Compute, via the 0G Private Computer router)
cp server/.env.example server/.env
# set REINS_LLM_PROVIDER=0g-router, OG_ROUTER_API_KEY, REINS_LLM_MODEL, OG_STORAGE=on
# (or REINS_LLM_PROVIDER=openai with REINS_LLM_BASE_URL for any OpenAI-compatible endpoint)
# 2) run server + dashboard
npm run dev
# server on http://localhost:4319
# dashboard on http://localhost:4320
# 3) optional: populate a demo board without wiring agents
npm run seed
Connect an agent
One command installs the capture hook into Claude Code:
npx reins-hook install --url http://localhost:4319 --me yourname
# then run /hooks in Claude Code to approve it
Every prompt and agent turn now flows into Reins. See hooks/README.md for flags
(--global, --project, --key) and the status and uninstall commands.
Pull context from an agent (MCP)
Register the MCP server so a teammate's agent can read the shared context:
{ "mcpServers": { "reins": { "command": "npx", "args": ["tsx", "server/src/mcp.ts"], "cwd": "/ABS/PATH/reins" } } }
Tools:
reins_contextreads a project's current status, fetched and verified from 0G Storage.reins_pull_contextrebuilds a snapshot from a 0G Storage root hash alone, with no database.reins_projects,reins_member,reins_pending,reins_handoffsfor narrower reads.reins_note,reins_claim,reins_resolve,reins_handoff_acklet an agent write back.
Layout
| Path | What |
|---|---|
server/ |
Express ingest, SSE, REST, SQLite, the distillation pipeline, the MCP server |
web/ |
Next.js dashboard, light editorial theme, live over SSE |
cli/ |
reins-hook, the npx installer that bundles the capture hook |
hooks/ |
Hook docs (the hook itself ships inside cli/) |
deploy/ |
DEPLOY.md and the deploy scripts |
Auth and deploy
Local dev runs as a single open instance (REINS_AUTH=off). For a shared instance, turn on
multi-tenant auth: workspaces are the tenant boundary, ingest tokens authenticate hooks and agents,
access tokens authenticate dashboard viewers (httpOnly session cookie), and admin tokens mint or
revoke tokens. Bootstrap with npm run admin -- create-workspace "Team".
The dashboard deploys to Vercel and the server with its SQLite database to a small VM. The dashboard
proxies /api/* to the backend so the browser stays first party. See deploy/DEPLOY.md.
Configuration
All server config is environment variables (server/.env, see server/.env.example). Inference
runs on 0G Compute (REINS_LLM_PROVIDER=0g-router with OG_ROUTER_API_KEY) and snapshots persist
to 0G Storage (OG_STORAGE=on). To use a different inference backend, set REINS_LLM_PROVIDER=openai
with REINS_LLM_BASE_URL and any OpenAI-compatible endpoint.
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.