# ContextForge — Complete Reference for AI Agents > Persistent memory for AI coding agents via MCP (Model Context Protocol). One server, every AI tool, memory that never expires. ## Overview ContextForge is a SaaS platform that provides persistent memory for AI coding assistants. It works as an MCP server — the open standard by Anthropic that lets AI tools connect to external services. When connected, your AI assistant can save, search, and recall knowledge across sessions. The problem it solves: AI coding tools (Claude Code, Cursor, GitHub Copilot, etc.) forget everything between conversations. Developers waste 15-20 minutes per session re-explaining their project. ContextForge eliminates this by giving AI tools a persistent knowledge base they can read and write to. ## Supported AI Tools | Tool | Integration | Setup | |------|-------------|-------| | Claude Code | MCP native | `claude mcp add contextforge -- npx contextforge-mcp` | | Cursor | MCP via config | Add to `.cursor/mcp.json` | | GitHub Copilot | MCP Agent Mode | Add to `.mcp.json` or VS Code settings | | ChatGPT | MCP via desktop app | Add to ChatGPT desktop MCP settings | | Windsurf | MCP via config | Add to Windsurf MCP settings | | Claude Desktop | MCP via config | Add to `claude_desktop_config.json` | ## Installation ### For Claude Code (recommended) ```bash npx contextforge-mcp ``` The interactive setup will guide you through API key configuration. Or manually: ```bash claude mcp add contextforge \ -e CONTEXTFORGE_API_KEY=your-api-key \ -- npx contextforge-mcp ``` ### For Cursor Create or edit `.cursor/mcp.json`: ```json { "mcpServers": { "contextforge": { "command": "npx", "args": ["-y", "contextforge-mcp"], "env": { "CONTEXTFORGE_API_KEY": "your-api-key" } } } } ``` ### For GitHub Copilot Create `.mcp.json` in project root: ```json { "servers": { "contextforge": { "command": "npx", "args": ["-y", "contextforge-mcp"], "env": { "CONTEXTFORGE_API_KEY": "your-api-key" } } } } ``` ## Core Concepts ### Projects Top-level containers for organizing knowledge. A project might represent a codebase, a client, or a product. Each project can have multiple spaces and collaborators. ### Spaces Containers within a project for categorizing knowledge. Examples: "Architecture", "Bugs", "API Docs", "Business Rules". Can be regular spaces or Git-connected spaces. ### Knowledge Items Individual pieces of stored knowledge. Each item has content, optional tags, and can be linked to other items via relationships. Items are embedded for semantic search. ### Semantic Search AI-powered search that understands meaning, not just keywords. Searching "how we handle payments" will find items titled "Invoice Processing Workflow" because the concepts are semantically related. ### Git Integration Connect GitHub repositories to automatically sync commits and pull requests into your knowledge base. Your AI assistant stays up-to-date with your latest code changes. ### Knowledge Graph Connect related knowledge items with typed relationships (relates_to, derived_from, depends_on). When you search, related items surface automatically through relationship-aware search. ### Tasks Track development tasks within projects. Create, assign, comment on, and resolve tasks — all from your AI assistant via MCP tools. ### Snapshots Point-in-time backups of a knowledge space. Create snapshots before major changes, restore them if needed. ## MCP Tools Available When connected, ContextForge exposes these MCP tools to your AI: ### Memory Operations - `memory_ingest` — Save knowledge to a space - `memory_query` — Semantic search across knowledge - `memory_list_items` — List items in a space - `memory_get_item` — Get a specific item - `memory_delete` — Delete a knowledge item - `memory_delete_batch` — Batch delete items - `memory_export` — Export space data (JSON, Markdown, CSV) - `memory_import` — Import from Claude Code, ChatGPT, Knowledge Graph, Markdown - `memory_ingest_batch` — Batch import items ### Organization - `memory_list_projects` — List your projects - `memory_create_project` — Create a new project - `memory_list_spaces` — List spaces in a project - `memory_create_space` — Create a new space - `memory_link_project` — Link project to local directory - `memory_current_project` — Get current linked project ### Relationships - `memory_relate` — Create relationship between items - `memory_list_relationships` — List relationships for an item ### Git - `memory_git_connect` — Connect a GitHub repository - `memory_git_sync` — Sync commits and PRs - `memory_git_commits` — List synced commits - `memory_git_prs` — List synced pull requests ### Tasks - `tasks_create` — Create a task - `tasks_list` — List tasks - `tasks_update` — Update a task - `tasks_start` — Start working on a task - `tasks_resolve` — Mark task as resolved - `tasks_assign` — Assign task to collaborator - `tasks_add_comment` — Comment on a task ### Snapshots - `memory_snapshot_create` — Create a snapshot - `memory_snapshot_list` — List snapshots - `memory_snapshot_restore` — Restore a snapshot ### Collaboration - `collaborators_list` — List project collaborators - `project_share` — Share project with someone ### Utility - `memory_stats` — Usage statistics - `memory_help` — Help and documentation ## Import Formats ContextForge can import from: - **Claude Code MEMORY.md** — Each `##` section becomes a knowledge item - **MCP Knowledge Graph (.jsonl)** — Entities and relations from `@modelcontextprotocol/server-memory` - **ChatGPT exports (conversations.json)** — Assistant responses extracted automatically - **Plain Markdown (.md)** — Split by headings - **ContextForge JSON** — For backup/restore between spaces - **Obsidian vaults** — Markdown files with frontmatter and wikilinks ## Pricing | Plan | Price | Projects | Documents | Queries/mo | Storage | Collaborators | |------|-------|----------|-----------|------------|---------|---------------| | Free | $0/forever | 1 | 200 | 500 | 50 MB | — | | Pro | $9/month | 25 | 5,000 | 15,000 | 1 GB | 5 | | Premium | $29/month | Unlimited | 10,000 | 20,000 | 2 GB | Unlimited | Pro and Premium include Git integration, snapshots, and a 14-day free trial. ## Links - **Website**: https://contextforge.dev - **Documentation**: https://contextforge.dev/docs - **Quick Start**: https://contextforge.dev/docs/mcp-native - **Pricing**: https://contextforge.dev/pricing - **Blog**: https://contextforge.dev/blog - **npm package**: https://www.npmjs.com/package/contextforge-mcp - **Security**: https://contextforge.dev/docs/security - **Import/Export docs**: https://contextforge.dev/docs/import-export ## Contact - Support: support@contextforge.app - Website: https://contextforge.dev