npm @darkmatterhub/mcp-serverstdioApache-2.0updated 11d ago
Universal MCP server that emits Context Passport records for AI agent decisions and actions. Drop into any MCP-compatible client (Claude Code, Cursor, Cline, Continue, ChatGPT Desktop, Zed, Goose, and others) to give your agent a commit / verify / replay / export toolset for verifiable, tamper-evident records.
What can you do with DarkMatter?
DarkMatter MCP Server
Universal MCP server that emits Context Passport records for AI agent decisions and actions. Drop into any MCP-compatible client (Claude Code, Cursor, Cline, Continue, ChatGPT Desktop, Zed, Goose, and others) to give your agent a commit / verify / replay / export toolset for verifiable, tamper-evident records.
Built by DarkMatter. Implements Context Passport v2.0, an open CC0 standard. Records emitted by this server use RFC 8785 (JCS) canonicalization and are byte-equivalent across the Python and TypeScript reference SDKs.
Install
In your MCP client's config (claude_desktop_config.json, Cursor's mcp.json, etc.):
{
"mcpServers": {
"darkmatter": {
"command": "npx",
"args": ["-y", "@darkmatterhub/mcp-server"]
}
}
}
Restart the client. Five tools become available to your agent:
darkmatter_commitā record an agent decision or actiondarkmatter_verifyā check that the chain has not been tampered withdarkmatter_replayā walk the full chain in orderdarkmatter_exportā produce a portable proof bundledarkmatter_list_sessionsā see what sessions exist locally
Bundles explain themselves
darkmatter_export produces a bundle that a stranger can act on. Alongside the
records it carries the format name, a link to the specification, whether the
chain was intact at export time, and the exact command to verify it in Python or
TypeScript, plus what a failure looks like.
That matters because the bundle is the artifact that leaves your machine. It goes to an auditor, a regulator or a counterparty who has never heard of this format, and the whole claim is that they can check it without trusting whoever sent it. A bundle that does not say how is asking to be trusted.
Local by default, published when you ask
With no configuration the server keeps every record on your own disk. The
chain verifies offline through darkmatter_verify, so you can evaluate the
whole idea without an account.
Set an API key to publish records and get a link somebody else can check:
| Variable | Effect |
|---|---|
DARKMATTER_API_KEY |
Publishes each record to DarkMatter and returns a verify_url. Get one at darkmatterhub.ai. |
DARKMATTER_SHARE |
Set to true to make published records readable by anyone with the link. Off by default, because publishing is not something to do to your records without being asked. |
DARKMATTER_API_URL |
Override the API host. Defaults to https://darkmatterhub.ai. |
DARKMATTER_MCP_STORE_DIR |
Where local records are written. |
commit reports which of the two happened, in the storage field. If
publishing fails the record is still committed locally and the error is
returned alongside it, so a network problem cannot cost you the record.
Changed in 0.3.0. Earlier versions returned a
https://darkmatterhub.ai/r/{id}link for every commit while making no network calls at all, so the link always 404ed. A verification URL is now returned only when there is a published record behind it.
What gets captured
Whatever the agent (or user) explicitly invokes via darkmatter_commit. Auto-capture of every tool call without explicit invocation is a separate component (see Auto-capture below).
Example agent flow:
User: Approve the refund for order #1247 and record the decision.
Agent: Calls refund_order(1247).
Agent: Calls darkmatter_commit({
input: "Approve refund for order #1247",
output: "Approved. $84.00 refunded to original payment method.",
role: "compliance",
event_type: "commit"
})
Result: { ok: true, passport: {...}, storage: "local", verify_url: null,
note: "Saved locally and verifiable offline..." }
The passport is signed (if a key is configured), hash-chained to the previous commit in the session, and stored locally at ~/.darkmatter/mcp/<session_id>/chain.jsonl.
Storage
Default: local-only. Passports never leave the machine.
~/.darkmatter/mcp/
āāā default/
ā āāā chain.jsonl # append-only stream of all commits
ā āāā latest.json # most recent passport (used as parent for the next)
āāā <other-session-id>/
āāā ...
To forward each passport to a DarkMatter receiving server in addition to local storage, set:
export DARKMATTER_API_KEY="dm_sk_..."
The forwarding is best-effort and never blocks the agent's tool call. Local storage remains the source of truth.
Auto-capture
The MCP server captures only what the agent explicitly invokes. To auto-capture every tool call and turn boundary in a specific dev tool (without the agent having to remember to call darkmatter_commit), install one of the dev-tool-specific adapters:
- darkmatter-hub/claude-code ā auto-capture for Claude Code (Anthropic)
- Cursor adapter ā planned
- OpenAI Codex adapter ā planned
- Aider adapter ā community-built welcome
Each adapter hooks into its specific dev tool's event lifecycle and routes events through this MCP server's darkmatter_commit tool. One canonical endpoint, many capture surfaces.
Verification
Records are valid Context Passport v2.0 artifacts. Verify with any conformant implementation:
pip install context-passport context-passport-conformance
context-passport-conformance --level signed # 9/9 vectors, no --vectors-dir needed
The conformance package ships its vectors inside the wheel, so this is a one-line check against the public reference suite.
Or use the offline reference verifier directly on the JSONL file:
import json
from context_passport import verify_chain
with open("~/.darkmatter/mcp/default/chain.jsonl") as f:
chain = [json.loads(line) for line in f]
print(verify_chain(chain)) # True if intact, False if tampered
Why MCP
MCP (Model Context Protocol) is becoming the universal interop layer for AI tools. Writing this server once means it works in every MCP-compatible client without per-client integration code. See the Context Passport for MCP proposal for the broader architectural rationale.
License
Apache-2.0. See LICENSE.
The Context Passport schema this server implements is released separately under CC0 1.0 at github.com/contextpassport/spec.
Related repositories
- github.com/contextpassport/spec ā the open standard
- github.com/contextpassport/python ā Python reference SDK
- github.com/contextpassport/typescript ā TypeScript reference SDK
- github.com/darkmatter-hub/claude-code ā auto-capture for Claude Code
- github.com/darkmatter-hub/darkmatter ā DarkMatter receiving server
Install
Add DarkMatter to your client. Pick the one you use.
claude mcp add mcp-server -- npx -y @darkmatterhub/mcp-servercodex mcp add mcp-server -- npx -y @darkmatterhub/mcp-serveramp mcp add mcp-server -- npx -y @darkmatterhub/mcp-server{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@darkmatterhub/mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@darkmatterhub/mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp-server","command":"npx","args":["-y","@darkmatterhub/mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@darkmatterhub/mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@darkmatterhub/mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@darkmatterhub/mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@darkmatterhub/mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"@darkmatterhub/mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @darkmatterhub/mcp-serverRun `goose configure`, choose **Add Extension ā Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance19/25
- Trust16/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 3 days ago
- Has a release history
- Repository is not archived
- Licensed Apache-2.0
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 0.4.0Latest | Aug 28, 2026 |
| 0.3.2 | Aug 20, 2026 |