# AgentDrive

AgentDrive — an MCP server for Claude Code carries session context between coding agents and stores shared files. Retrieve project history or continue earlier work from another agent.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 2 repo stars
- Author: agentdrive-sh
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/agentdrive-sh/agentdrive-mcp
- Updated: 2026-11-11
- Security check: automated, 2026-11-17 (text) — warning: a command downloads a script and runs it right away. Do not run such commands without an explicit yes from the human.
- HTML: https://affpapa.org/en/nevibecode/mcp/agentdrive

## What it does

AgentDrive keeps session details and files in a shared workspace, so another agent can find earlier material or pick up a task. `drive_resume` loads the goal, changed files, and recent messages from a previous session. `drive_search` searches stored material, while `drive_sessions` lists recent runs for the project.

The server can also read, write, and delete files, track file versions, and handle comments. A key for the AgentDrive API is needed and is passed through `AGENTDRIVE_API_KEY`. Connect to the hosted MCP endpoint or run the server locally with `npx`; local use depends on a Node.js environment for that command.

Four Linux sandbox tools are experimental. They require the Cloudflare Containers plan on the AgentDrive worker; otherwise, those tools return a message that the feature is not configured.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://mcp.agentdrive.sh/mcp`
- Environment variables: `AGENTDRIVE_API_KEY`, `AGENTDRIVE_AGENT_PLATFORM` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI**
```bash
claude mcp add --env AGENTDRIVE_API_KEY=<AGENTDRIVE_API_KEY> --env AGENTDRIVE_AGENT_PLATFORM=<AGENTDRIVE_AGENT_PLATFORM> --transport stdio agentdrive -- npx -y @adrive/mcp-server
```
Replace <…> with your own values

2. **Platform CLI: remote server**
```bash
claude mcp add --transport http agentdrive https://mcp.agentdrive.sh/mcp
```

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add agentdrive --url https://mcp.agentdrive.sh/mcp
```

2. **Platform CLI**
```bash
codex mcp add agentdrive --env AGENTDRIVE_API_KEY=<AGENTDRIVE_API_KEY> --env AGENTDRIVE_AGENT_PLATFORM=<AGENTDRIVE_AGENT_PLATFORM> -- npx -y @adrive/mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "agentdrive": {
            "url": "https://mcp.agentdrive.sh/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "agentdrive": {
            "command": "npx",
            "args": [
                "-y",
                "@adrive/mcp-server"
            ],
            "env": {
                "AGENTDRIVE_API_KEY": "<AGENTDRIVE_API_KEY>",
                "AGENTDRIVE_AGENT_PLATFORM": "<AGENTDRIVE_AGENT_PLATFORM>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "agentdrive": {
            "type": "http",
            "url": "https://mcp.agentdrive.sh/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "agentdrive": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@adrive/mcp-server"
            ],
            "env": {
                "AGENTDRIVE_API_KEY": "<AGENTDRIVE_API_KEY>",
                "AGENTDRIVE_AGENT_PLATFORM": "<AGENTDRIVE_AGENT_PLATFORM>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http agentdrive https://mcp.agentdrive.sh/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e AGENTDRIVE_API_KEY=<AGENTDRIVE_API_KEY> -e AGENTDRIVE_AGENT_PLATFORM=<AGENTDRIVE_AGENT_PLATFORM> agentdrive npx -y @adrive/mcp-server
```
Replace <…> with your own values

## When to use it
- carry a session’s context to another agent
- find earlier project materials
- list recent project sessions
- read or save a shared file

## Example prompts
- Continue the task from the latest session by another agent on this project.
- Search AgentDrive for notes related to the current task.
- Show recent project sessions and read the planning file.

## Similar
- [Context7](https://affpapa.org/en/nevibecode/mcp/context7.md) — MCP server · 5563 installs
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Math-MCP](https://affpapa.org/en/nevibecode/mcp/math-mcp.md) — MCP server · 5958 installs
- [pipeworx gateway](https://affpapa.org/en/nevibecode/mcp/pipeworx-gateway.md) — MCP server · 419019 installs
- [SparkForge](https://affpapa.org/en/nevibecode/mcp/sparkforge.md) — MCP server · 219896 installs
- [OpenWebSearch](https://affpapa.org/en/nevibecode/mcp/openwebsearch.md) — MCP server · 494 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
