Arc Memory Temporal Knowledge Graph MCP server

Provides a bridge to the Arc Memory Temporal Knowledge Graph, enabling structured access to repository history, entity relationships, and code provenance without manual navigation of complex codebases.
Back to servers
Provider
Arc Memory Team
Release date
Apr 28, 2025
Language
Python
Stats
1 star

Arc helps engineering teams understand the context and history behind their code. This MCP server allows AI assistants to query your codebase's history and relationships using natural language, answering questions about architectural decisions, code evolution, and implementation rationale.

Quick Start

Install Dependencies

pip install mcp arc-memory

Authenticate with GitHub

arc auth gh

This will guide you through authenticating with GitHub. You'll see a success message when complete.

Authenticate with Linear (Optional)

arc auth linear

This will guide you through authenticating with Linear using OAuth 2.0. A browser window will open for you to authorize Arc Memory to access your Linear data.

Build Your Knowledge Graph

arc build

This will analyze your repository and build a local knowledge graph. You'll see progress indicators and a summary of ingested entities when complete.

To include Linear issues in your knowledge graph:

arc build --linear

Integration Options

Claude Desktop

  1. Open your configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the server configuration:

    {
      "mcpServers": {
        "arc-memory": {
          "command": "python",
          "args": ["/absolute/path/to/src/arc_mcp_server.py"]
        }
      }
    }
    
  3. Restart Claude Desktop

VS Code Agent Mode

  1. Install the VS Code Agent Mode extension

  2. Configure the MCP server in your VS Code settings:

    "anthropic.agent-mode.mcp.servers": {
      "arc-memory": {
        "command": "python",
        "args": ["/absolute/path/to/src/arc_mcp_server.py"]
      }
    }
    

Cursor

  1. Open Cursor settings and navigate to the AI settings
  2. Configure the MCP server (similar to VS Code configuration)
  3. Restart Cursor

Available Tools

Arc provides several tools for querying your codebase:

arc_search_story

Natural-language graph query for multi-hop questions.

Parameters:

  • question: The natural language question to ask
  • max_depth (optional): Maximum depth for graph traversal (default: 3)
  • max_results (optional): Maximum number of results to return (default: 100)

Other Tools

  • arc_trace_history: Traces the decision history for a specific line in a file
  • arc_get_entity_details: Retrieves detailed information about a specific entity
  • arc_find_related_entities: Finds entities directly connected to a given entity
  • arc_blame_line: Gets the specific commit SHA, author, and date for a line

Example Questions

Architectural Reasoning

"What were the security considerations that led to our current authentication architecture?"
"Why did we migrate from monolith to microservices in Q3 2022, and what were the tradeoffs?"
"What performance issues drove the switch from Redis to our custom caching solution?"

Cross-System Impact Analysis

"Which backend services were affected by the payment processing refactoring?"
"What downstream components depend on the authentication middleware we're planning to change?"
"How many different teams' code would be impacted if we deprecate the legacy API?"

Technical Debt & Regression Prevention

"What previous attempts have we made to fix the intermittent test failures in the CI pipeline?"
"Which PRs have touched this fragile payment processing code in the last 6 months?"
"What was the root cause analysis of our last three production incidents?"

Knowledge Transfer & Onboarding

"What's the complete history of our authentication system from initial design to current implementation?"
"Who are the domain experts for each component of our data processing pipeline?"
"What were the key design decisions made before I joined the team that explain our current architecture?"

How Arc Works

Arc builds a graph of your codebase's history, connecting structured data from different sources. The knowledge graph includes:

  • Entities: PRs, commits, issues (GitHub & Linear), ADRs, files, and more
  • Relationships: MODIFIES, MENTIONS, MERGES, DECIDES, IMPLEMENTS
  • Temporal context: When changes happened and in what sequence
  • Provenance: Why changes were made and who made them
  • Cross-system connections: Links between GitHub PRs and Linear issues

This interconnected structure enables tracing the complete story behind any line of code—from the initial issue, through architectural decisions, to implementation PRs and commits.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later