# ContextForge MCP server

> Provides AI coding assistants with persistent, searchable long-term memory across sessions for projects and teams.

- Repository: https://github.com/alfredoizdev/contextforge-mcp
- Page: https://hostedmcp.org/servers/alfredoizdev/contextforge-mcp
- Transport: stdio
- Stars: 2
- License: MIT
- Latest version: 0.13.3

## Install

### Claude Code

```sh
claude mcp add --env 'CONTEXTFORGE_API_KEY=<YOUR_CONTEXTFORGE_API_KEY>' contextforge-mcp -- npx -y contextforge-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "contextforge-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "contextforge-mcp"
      ],
      "env": {
        "CONTEXTFORGE_API_KEY": "<YOUR_CONTEXTFORGE_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "contextforge-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "contextforge-mcp"
      ],
      "env": {
        "CONTEXTFORGE_API_KEY": "<YOUR_CONTEXTFORGE_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"contextforge-mcp","type":"stdio","command":"npx","args":["-y","contextforge-mcp"],"env":{"CONTEXTFORGE_API_KEY":"<YOUR_CONTEXTFORGE_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "contextforge-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "contextforge-mcp"
      ],
      "env": {
        "CONTEXTFORGE_API_KEY": "<YOUR_CONTEXTFORGE_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add contextforge-mcp --env 'CONTEXTFORGE_API_KEY=<YOUR_CONTEXTFORGE_API_KEY>' -- npx -y contextforge-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.contextforge-mcp]
command = "npx"
args = ["-y", "contextforge-mcp"]

[mcp_servers.contextforge-mcp.env]
CONTEXTFORGE_API_KEY = "<YOUR_CONTEXTFORGE_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'CONTEXTFORGE_API_KEY=<YOUR_CONTEXTFORGE_API_KEY>' contextforge-mcp npx -- -y contextforge-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "contextforge-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "contextforge-mcp"
      ],
      "env": {
        "CONTEXTFORGE_API_KEY": "<YOUR_CONTEXTFORGE_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CONTEXTFORGE_API_KEY` | yes | yes | Your API key from the ContextForge dashboard at contextforge.dev |
| `CONTEXTFORGE_API_URL` | no | no | API endpoint URL (defaults to production) |

## Tools (42)

- `cf_tools`
- `memory_ingest`
- `memory_query`
- `memory_list_items`
- `memory_delete`
- `memory_ingest_batch`
- `memory_delete_batch`
- `memory_list_spaces`
- `memory_create_space`
- `memory_delete_space`
- `memory_move_space`
- `memory_list_projects`
- `memory_create_project`
- `memory_delete_project`
- `memory_link_project`
- `memory_unlink_project`
- `memory_current_project`
- `memory_git_connect`
- `memory_git_list`
- `memory_git_activate`
- `memory_git_sync`
- `memory_git_commits`
- `memory_git_prs`
- `memory_git_disconnect`
- `issues_list`
- `issues_create`
- `issues_start`
- `issues_resolve`
- `issues_resolve_by_name`
- `issues_assign`
- `issues_what_next`
- `project_share`
- `collaborators_list`
- `memory_snapshot_create`
- `memory_snapshot_list`
- `memory_snapshot_restore`
- `memory_snapshot_delete`
- `memory_export`
- `memory_import`
- `memory_stats`
- `memory_relate`
- `memory_help`

## FAQ

### Does it work with Claude Code, Cursor, and GitHub Copilot?

Yes, it is designed to provide persistent memory to Claude Code, Cursor, and GitHub Copilot via the Model Context Protocol.

### Do I need to configure it manually?

For many clients like Claude Desktop and Claude Code, it works automatically without manual configuration on connection.

### How can I find specific information in my project memory?

The server uses semantic search, allowing you to find knowledge by meaning rather than just keywords.

### Is there a free version available?

Yes, there is a free tier available that does not require a credit card to get started.
