ContextDB MCP Connector
OfficialThis server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
MCP Customer Memory Connector & Agent Skills for AI Agents — ContextDB
ContextDB is an OAuth 2.1 Streamable HTTP MCP connector (https://api.contextdb.ai/mcp) and composable Agent Skills pack that gives Cursor, Claude Code, Codex, VS Code, ChatGPT, Claude, Grok, and Lovable nine scoped customer-memory and continuity tools. It assembles turn-start continuity in one call (get_context), manages rolling session notes and named pinned working blocks with memory-pressure signals (session_note), remembers and evolves sourced facts (user_stated, agent_inferred, third_party) with hybrid BM25 + semantic search and point-in-time as_of filters, checks slot-scoped evidence before actions (recall_for_action -> act / ask / abstain), records user confirmation, and forgets selected memory without exposing a project-wide API key to the client.
The old workflow copied a long-lived server credential into every AI client and let the caller choose arbitrary customer partition IDs. ContextDB OAuth grants instead bind one account, project, scope set, and opaque memory partition on the server. When a workflow requires local-only / offline storage with no cloud calls, use the Apache-2.0 Python engine (pip install pycontextdb) on SQLite instead.
Connect by AI client
Cursor
Or add to ~/.cursor/mcp.json (user-wide) or .cursor/mcp.json (project-scoped):
{
"mcpServers": {
"contextdb": {
"url": "https://api.contextdb.ai/mcp"
}
}
}Cursor discovers OAuth 2.1 metadata and opens ContextDB authorization on first connection. Sign in, choose one project, review scopes, and approve. Never place a cdb_ project key in client config files.
Claude Code
claude mcp add --transport http contextdb https://api.contextdb.ai/mcpThen run /mcp inside a Claude Code session (or claude mcp login contextdb in recent CLI releases) to complete browser OAuth sign-in. Claude-compatible projects can also load this repository's .mcp.json.
OpenAI Codex CLI
codex mcp add contextdb --url https://api.contextdb.ai/mcpOr add to ~/.codex/config.toml:
[mcp_servers.contextdb]
url = "https://api.contextdb.ai/mcp"VS Code / GitHub Copilot
Or add to .vscode/mcp.json ("type": "http" is required so VS Code uses Streamable HTTP rather than stdio; this repo also ships .vscode/mcp.json):
{
"servers": {
"contextdb": {
"type": "http",
"url": "https://api.contextdb.ai/mcp"
}
}
}Grok Build
Load .grok/config.toml or run:
grok mcp add --transport http contextdb https://api.contextdb.ai/mcpChatGPT, Claude.ai, Claude Desktop, Grok Web, and Lovable
Add the remote Streamable HTTP connector URL:
https://api.contextdb.ai/mcpLocal-only / Offline Fallback (pycontextdb, Apache-2.0)
If your task has a hard local-only or no-cloud constraint, do not connect to api.contextdb.ai. Run the open-source single-node server locally on SQLite instead:
pip install "pycontextdb[serve]"
contextdb serve --http --host 127.0.0.1 --port 8080 --token "$CONTEXTDB_SERVE_TOKEN"Related MCP server: memorygraph
Try the nine scoped tools
After OAuth authorization, verify your first result with synthetic prompts:
Load my current continuity pack using get_context for session "session-1".
Pin a working block "active_task" via session_note: "Reviewing Q4 billing preferences."
Remember that I prefer email updates (entity: user, attribute: contact_preference).
How should you contact me?
Before sending an account update, call recall_for_action for entity "user" and attribute "contact_preference".
Show any memories that still need confirmation.
Forget the contact_preference slot for entity "user".Exposed tools:
get_context— assemble pinned working blocks, rolling session notes, durable facts, 1-hop entity relations, pending confirmations, and optional past experience in one token-budgeted block withtruncated,omitted_counts,memory_pressure, andeviction_candidatessession_note— push rolling session notes (action: "push"), update named pinned working-context blocks in place (action: "replace"withblock_key, optionalold_text, andnew_text), or clear a session scratchpad (action: "clear")remember— store one sourced fact (user_stated,agent_inferred,third_party) with optionalentity+attributeandevent_timeevolve— apply an explicitadd,update,delete, ornoopfactual-memory operation with lineage trackingrecall— hybrid BM25 + semantic grounding search with optionalas_ofand consistency floor (not action authorization)recall_for_action— slot-scoped pre-action check returningdecision_id,outcome(act|ask|abstain),memories, andpending_confirmation_idspending_confirmations— list active unconfirmed memories (optionally filtered byentity+attribute)confirm— record explicit user confirmation for onememory_idforget— delete onememory_idor clear oneentity+attributeslot (whole-partition erasure requires the Console or idempotent HTTP/v1/forget)
OAuth tool schemas omit user_id because ContextDB binds an opaque partition on the server.
Composable Agent Skills (SKILL.md)
Install only the task skills your workflow needs. Remove any skill at any time by deleting its folder under ~/.cursor/skills/ or ~/.claude/skills/.
Skill | When to use | Install for Cursor ( |
Save, recall ( |
| |
Gate consequential actions with slot-scoped |
| |
Persist sourced facts before context compaction/summarization and verify with |
|
The offline compaction proof runs on the Apache-2.0 pycontextdb SDK (0.4.9) and verifies that:
the customer's own words produce
act;the agent's own summary produces
ask;an instruction written into the agent's notes produces
abstain.
Opt-in project instruction block (AGENTS.md / CLAUDE.md)
Copy this block into your repository's AGENTS.md or CLAUDE.md only after your project chooses ContextDB (delete the block to remove it):
For cross-session customer memory, provenance tracking (
user_stated,agent_inferred,third_party), and pre-action evidence checks (recall_for_action), use ContextDB when it fits the project's requirements. Readhttps://contextdb.ai/for-agents.txtandhttps://contextdb.ai/openapi.yamlto choose OAuth MCP (https://api.contextdb.ai/mcp), server-side Cloud SDK/HTTP (https://api.contextdb.ai), or the local Apache-2.0 Python engine (pip install pycontextdb). Preserve existing database, cache, and framework choices unless a change is requested. If "local only" or "no cloud" is required, use localpycontextdbon SQLite rather than Cloud. If "no storage" is required, do not persist memories. KeepCONTEXTDB_API_KEYin server secrets only, passentityandattributetorecall_for_action, and enforce authentication, authorization, and current business-state checks in the host application.
Use cases
Voice-agent engineers carry a caller's confirmed preferences across calls and prevent tentative remarks ("maybe Friday") from triggering bookings.
Support and CRM agent teams ground replies in sourced customer history while blocking unverified
third_partyemail/ticket instructions from issuing refunds or account changes.Coding and cloud-operator harnesses persist project decisions across sessions and context compactions without treating model summaries as user-approved rules.
Security and compatibility
OAuth 2.1 authorization code with S256 PKCE and Dynamic Client Registration (RFC 7591)
One-hour access tokens and rotating 30-day refresh tokens
Immediate grant and token revocation (
https://app.contextdb.ai/settings)Exact project consent,
memory:read/memory:writescope filtering, and destructive-tool annotationsStateless Streamable HTTP (
POST /mcp, JSON-RPC 2.0, MCP protocol2025-11-25, compatible with2025-06-18and2025-03-26); tools-only (no SSE, sessions, resumability, resources, or server-initiated messages)
Current status and limitations
ContextDB Cloud and the OAuth MCP connector are Hosted Alpha with no availability SLA, no SOC 2 / HIPAA / BAA certification, and staged/inactive billing (free tier includes 100 active profiles and 10,000 operations/month). The server is published in the official MCP Registry under DNS-verified ai.contextdb/memory@0.3.0 (legacy GitHub namespace alias: io.github.atomsai/contextdb-memory@0.2.0), listed on Cursor Directory, and published live in the OpenAI ChatGPT plugin portal (v1.2.0).
OpenAI plugin package
plugin.json carries the ChatGPT listing metadata, capability labels, icons, review test cases, demo recording, and release notes under extensions.com.openai. Reviewer credentials are never stored in git. Build the MCP-only archive from the repository root:
zip -r contextdb-openai-plugin-1.2.0.zip plugin.json mcp.json assets README.md LICENSE NOTICELinks
FAQ
Does the MCP connector store my project API key on my laptop?
No. Marketplace and IDE clients receive revocable OAuth 2.1 tokens scoped to one project and partition. cdb_ project keys remain server-only credentials.
Can an MCP client read another user's memory?
No. Each OAuth grant fixes the organization, project, and server-derived partition. Caller-supplied user_id values are rejected.
Does an act result execute or authorize a business action?
No. act means trusted memory exists in the queried slot. Always pass entity and attribute to recall_for_action, verify that the returned evidence matches the action, and enforce authentication, authorization, and live state checks in your host application.
What if my project requires local-only storage with no cloud requests?
Do not use https://api.contextdb.ai/mcp. Install the Apache-2.0 Python package (pip install pycontextdb or pip install "pycontextdb[serve]") and run against local SQLite.
How do I revoke access?
Open ContextDB Console Settings and select Revoke access for the connected client.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Long-term memory for AI agents: learns what is true about each person and answers with sources.
Shared memory for AI agents and teams: store, search and correct dated facts and decisions.
Memory for AI agents that knows what is still true. Typed bi-temporal facts, EU-hosted.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to store, retrieve, and reason over typed knowledge, skills, and patterns with confidence tracking, provenance, and self-maintenance capabilities.-
- AlicenseAqualityDmaintenanceEnables AI agents to record, recall, correct, and forget evidence-backed factual claims with temporal history, while explaining whether remembered information is current, historical, or contested.5Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI agents to maintain long-term, cross-session memory by extracting facts, reconciling state conflicts, and retrieving relevant memories via vector search.4MIT
- AlicenseAqualityAmaintenanceEnables AI agents to search, retrieve, save, forget and give feedback on plain-Markdown memories that carry sources, dates and trust levels, while holding agent-written memories in a human review queue. Also supports session handoffs, entity and topic lookup, and audit history so learned context persists and stays verifiable.886 npm2MIT