Skip to main content
Glama

AgentDrive MCP Server

The official Model Context Protocol server for AgentDrive — a cross-agent artifact workspace with provenance and portable storage across Claude Code, Codex, Cursor, LangGraph, and any MCP-aware host.

Give your agents a shared, persistent workspace: files with versioning, semantic recall over everything prior agents produced, run logging, and cross-agent attribution — so the next session (on any tool) picks up where the last one left off.

Claude Code plugin

This repo is also the Claude Code plugin marketplace. The plugin captures every session in the background and resumes it from Codex, OpenCode, Gemini CLI, Antigravity, or Cursor:

/plugin install agentdrive --marketplace Rakesh1002/agentdrive-mcp

On Claude Code older than 2.1.275, run /plugin marketplace add Rakesh1002/agentdrive-mcp then /plugin install agentdrive@agentdrive. Sign in with /agentdrive:login.

Related MCP server: Coding Tools MCP

Get an API key (free)

Create one at https://app.agentdrive.sh — no credit card. The free tier (1 workspace, 1 GB storage, 10k embeddings) is free indefinitely.

Two ways to connect

1. Hosted (no install) — Streamable HTTP

Point any MCP client that supports remote servers at the hosted endpoint and pass your key as a bearer token:

URL:    https://mcp.agentdrive.sh/mcp
Header: Authorization: Bearer agentdrive_live_xxx

Or install in one click via Smithery.

2. Local (stdio) — via npx

{
  "mcpServers": {
    "agentdrive": {
      "command": "npx",
      "args": ["-y", "@adrive/mcp-server"],
      "env": {
        "AGENTDRIVE_API_KEY": "agentdrive_live_xxx"
      }
    }
  }
}

Add that block to your host's MCP config:

  • Claude Desktop: claude_desktop_config.json

  • Cursor: ~/.cursor/mcp.json

  • Claude Code: install the plugin (see above), which also captures sessions

  • Codex / Cline / Continue / Zed: the standard mcpServers block above

The fastest path is the AgentDrive installer, which auto-wires every detected host:

curl -fsSL agentdrive.sh/install | sh

Configuration

Env var

Required

Default

Description

AGENTDRIVE_API_KEY

no

key saved by adrive auth login

Your AgentDrive API key (agentdrive_live_...). Falls back to ~/.config/agentdrive/config.json, so client configs never need the key inline. With no key at all the server still starts and offers one tool, drive_connect, which signs the user in through the browser and connects their other agent tools; the full toolset then appears in the same session.

AGENTDRIVE_API_URL

no

https://app.agentdrive.sh

Override the API endpoint (self-hosted worker).

AGENTDRIVE_AGENT_PLATFORM

no

unknown

Which agent runtime is calling — drives cross-agent provenance. One of claude-code, codex, opencode, gemini-cli, cursor, antigravity, langgraph, crewai, autogen, hermes, openclaw, unknown.

AGENTDRIVE_AGENT_ROLE

no

—

Free-text role label (e.g. planner, reviewer) to distinguish multiple agents on the same platform.

Tools

22 tools across files, memory, sessions, collaboration, org, and provenance. The stdio server derives the current project from its working directory (git remote, else repo path), which scopes drive_sessions and drive_resume.

Tool

Category

Description

drive_context

memory

Auto-pull the most relevant prior artifacts for the task you're starting.

drive_search

memory

Semantic search across your org's artifacts.

drive_recall

memory

Recall persistent facts/preferences agents have written.

drive_sessions

sessions

List recent agent sessions for this project across Claude Code, Codex, OpenCode, Gemini CLI, Antigravity, and Cursor.

drive_resume

sessions

Load a compact handoff (goal, files touched, recent turns) from a prior session, by default the latest from a different harness.

drive_write

files

Write a markdown file (auto-versioned).

drive_read

files

Read a file's content.

drive_list

files

List files in a workspace.

drive_delete

files

Delete a file.

drive_versions

files

View a file's version history.

drive_share

collaboration

Generate a (optionally email-gated) share link.

drive_comment

collaboration

Comment on a file.

drive_feedback

collaboration

Read human comments on a file.

drive_activity

provenance

Recent workspace activity (writes, comments, shares).

drive_log_run

provenance

Log an agent run (task, status, artifacts, identity).

drive_invite

org

Invite a human to your org by email.

drive_roles

org

Assign/list/remove per-workspace access by email.

drive_org

org

View org details: agents, members, plan, usage.

drive_sandbox_clone

sandbox (experimental)

Clone a git repo into a per-workspace Linux sandbox.

drive_sandbox_exec

sandbox (experimental)

Run a shell command in the sandbox.

drive_sandbox_read

sandbox (experimental)

Read a file from the sandbox filesystem.

drive_sandbox_commit

sandbox (experimental)

Stage + commit the sandbox worktree.

The drive_sandbox_* tools require the Cloudflare Containers plan on the AgentDrive worker and degrade cleanly to a "not configured" message otherwise.

Why AgentDrive

Agents lose context at every session boundary and every tool switch. AgentDrive is the shared substrate: one workspace, every agent, full provenance. Write once with Claude Code; recall it from Cursor; hand off to Codex — each call is attributed to the right principal and platform.

Develop

npm install
npm run build      # tsc -> dist/
npm test           # vitest

License

Apache-2.0. See LICENSE.

Available Tools

20 tools
drive_activityBInspect

Get recent activity in a workspace (file writes, comments, shares).

Inputs: workspace_id (required).

drive_commentCInspect

Add a comment to a file.

Inputs: body (required), file_id (required), workspace_id (required), line_end, +1 more.

drive_contextAInspect

Auto-pull the most relevant artifacts from prior agent sessions for the task you are about to do. Combines semantic relevance with recency. Call this at the START of any non-trivial task to ground the agent in prior context — replaces manual copy-paste of artifacts between sessions.

Inputs: task (required), limit, workspace_id.

drive_deleteCInspect

Delete a file from a workspace.

Inputs: file_id (required), workspace_id (required).

drive_feedbackBInspect

Read human comments on a file. Use this to check if humans have left feedback.

Inputs: file_id (required), workspace_id (required).

drive_inviteAInspect

Invite a human to your organization by email. They will receive a verification code to join.

Inputs: email (required), role.

drive_listAInspect

List files in a workspace, optionally filtered by path prefix.

Inputs: workspace_id (required), prefix.

drive_log_runAInspect

Log an agent run to AgentDrive's provenance store. Captures task, status, referenced/produced artifacts, and cross-platform identity (which agent on which tool). Used for retrospective context retrieval and team-wide audit.

Inputs: task (required), run_id, status, metadata, +3 more.

drive_orgAInspect

View your organization details: agents, members, plan, and usage.

Inputs: no named parameters.

drive_readBInspect

Read a file's content from a workspace.

Inputs: file_id (required), workspace_id (required).

drive_recallAInspect

Recall persistent facts and preferences your agents have written. In v1 this returns semantic search results across artifacts; v1.5 will narrow to auto-extracted facts (preferences, decisions, key entities).

Inputs: query (required), top_k.

drive_rolesAInspect

Manage per-workspace role delegation. Assign, list, or remove access for specific emails (view/comment/edit).

Inputs: action (required), workspace_id (required), email, permission.

drive_sandbox_cloneAInspect

[EXPERIMENTAL] Clone a git repo into a per-workspace Linux sandbox. Requires Cloudflare Containers on the AgentDrive worker; gracefully degrades to a 503 with "sandbox not configured" otherwise.

Inputs: url (required), workspace_id (required), depth, branch.

drive_sandbox_commitAInspect

[EXPERIMENTAL] Stage + commit the current sandbox worktree. Surfaces as an AgentDrive artifact at commits/.json. Requires Cloudflare Containers; degrades to 503 otherwise.

Inputs: message (required), workspace_id (required), author_name, author_email.

drive_sandbox_execAInspect

[EXPERIMENTAL] Run a shell command inside the per-workspace Linux sandbox. Captures stdout/stderr (64 KB cap), exit code, duration. Requires Cloudflare Containers; degrades to 503 otherwise.

Inputs: cmd (required), workspace_id (required), cwd, timeout_ms.

drive_sandbox_readAInspect

[EXPERIMENTAL] Read a file from the per-workspace sandbox filesystem (build artifacts, test output, logs). Requires Cloudflare Containers; degrades to 503 otherwise.

Inputs: path (required), workspace_id (required).

drive_shareAInspect

Generate a share link for a workspace or specific file. Optionally email-gate the link so only a specific person can access it. Humans open this link to view, comment, or edit files.

Inputs: permission (required), workspace_id (required), email, file_id, +2 more.

drive_versionsBInspect

View version history for a file in a workspace.

Inputs: file_id (required), workspace_id (required).

drive_writeBInspect

Write a markdown file to a workspace. Creates or updates the file with automatic versioning.

Inputs: path (required), content (required), workspace_id (required), message.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 20 tools

    Disambiguation4/5

    Tools are generally distinct, with clear verb-noun names. Some overlap exists between drive_search, drive_recall, and drive_context, as all retrieve information; however, descriptions clarify their intended use cases.

    Naming Consistency5/5

    All tools follow a consistent 'drive_' prefix with snake_case verb-noun or noun-verb pattern. No mixed conventions or irregular naming.

    Tool Count4/5

    20 tools cover a broad range of workspace management, collaboration, and experimental sandbox features. The count is slightly high but justified by the diverse functionality.

    Completeness4/5

    Core file operations (CRUD, sharing, commenting, versioning) are covered, along with user management, search, and context retrieval. Missing explicit workspace creation/renaming, but write and list imply workspace existence.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides persistent context synchronization and memory management for AI agents across sessions and projects, including file indexing, bug tracking, spatial navigation, and agent-to-agent handoff coordination.
      7 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to turn local projects into persistent workspaces, providing file editing, command execution, Git integration, and cross-session history management.
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI agents with a persistent, file-based workspace for storing, versioning, and retrieving contextual knowledge across sessions via MCP tools.
      21 PyPI
      28
      Apache 2.0