Contextgraph

v1.0.0Knowledge & Memorystable

Shared memory bus for MCP-compatible agents with permissions, subscriptions, and optional payments.

agent-memoryagentic-ragai-agentsknowledge-graphmcp
Share:
21
Stars
0
Downloads
0
Weekly
0/5

What is Contextgraph?

Contextgraph is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to shared memory bus for mcp-compatible agents with permissions, subscriptions, and optional payments.

Shared memory bus for MCP-compatible agents with permissions, subscriptions, and optional payments.

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Shared memory bus for MCP-compatible agents with permissions

Use Cases

Share memory and knowledge across multiple MCP-compatible agents.
Build multi-agent systems with permissions, subscriptions, and optional payments.
AllenMaxi

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx contextgraph

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Contextgraph

ContextGraph is a governed shared memory backend and MCP server designed for coding agents and multi-agent teams that need durable, structured context across sessions and context-window compaction events. Instead of losing state to a vague summary, ContextGraph records structured events (decisions, constraints, open tasks, failures, file changes) and compiles token-budgeted delta packs that allow agents to resume from an exact structured state. It also provides governed retrieval with provenance, freshness tracking, and ACL-based access control, making it suitable for teams that need auditable, shared memory across multiple AI agents.

Prerequisites

  • Python 3.11 or higher installed
  • Git to clone the repository
  • Optional: Neo4j database for persistent storage (in-memory local mode works without it)
  • An MCP-compatible client such as Claude Code or Claude Desktop
  • pip or uv package manager
1

Clone the repository and install

Clone the ContextGraph repository and install it with the server, MCP, and development extras.

git clone https://github.com/AllenMaxi/ContextGraph.git
cd ContextGraph
pip install -e ".[server,mcp,dev]"
2

Install the SDK separately (for client usage)

If you only need the thin client SDK without running the server locally, install just the SDK package. Use the [local] extra to enable the LocalTransport for in-process testing.

pip install contextgraph-sdk
# Or with local transport:
pip install contextgraph-sdk[local]
3

Run the quickstart example

Verify the installation by running the beta quickstart, which stores a governed memory, adds a trust signal, and recalls it from another agent.

python3 examples/beta_quickstart.py
4

Start the server

Start the ContextGraph HTTP server to enable the dashboard and HTTP API in addition to MCP access. The server starts on port 8000 by default.

python -m contextgraph.server
5

Configure the MCP server in your client

Register the ContextGraph MCP server with your MCP-compatible client. The server exposes tools such as contextgraph_compile_context for building governed context packs.

Contextgraph Examples

Client configuration

Add this block to your claude_desktop_config.json to connect Claude to a locally running ContextGraph MCP server.

{
  "mcpServers": {
    "contextgraph": {
      "command": "python",
      "args": ["-m", "contextgraph.mcp_server"],
      "env": {
        "CONTEXTGRAPH_API_KEY": "cgk_your_api_key_here"
      }
    }
  }
}

Prompts to try

Once connected, use these prompts to manage agent memory through Claude.

- "Store a memory that the payment service REST API must remain backward compatible"
- "Recall any memories related to latency issues in the EU region"
- "Checkpoint the current session state before we lose context"
- "Compile a context pack with the top 5 most trusted recent decisions"
- "Show me all open tasks from the last coding session checkpoint"

Troubleshooting Contextgraph

Import errors when running server or examples

Ensure you installed with the correct extras: pip install -e ".[server,mcp,dev]". The bare pip install -e . does not include the server or MCP dependencies.

MCP tools not appearing in Claude or recall returning empty results

Confirm the ContextGraph server process is running before starting Claude. Check the server logs for startup errors, particularly around Neo4j connectivity if you configured an external backend.

Context packs are too large or hit token budget limits

Use the token_budget parameter when calling the compile_context tool to cap the pack size. ContextGraph will prioritize the most trusted and freshest claims within the budget.

Frequently Asked Questions about Contextgraph

What is Contextgraph?

Contextgraph is a Model Context Protocol (MCP) server that shared memory bus for mcp-compatible agents with permissions, subscriptions, and optional payments. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Contextgraph?

Follow the installation instructions on the Contextgraph GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Contextgraph?

Contextgraph works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Contextgraph free to use?

Yes, Contextgraph is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "contextgraph": { "command": "npx", "args": ["-y", "contextgraph"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Contextgraph?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides