Skip to content

tao12345666333/amp-acp

Repository files navigation

ACP adapter for Amp

CI npm

Screenshot

Use Amp from ACP-compatible clients such as Zed or Toad.

Installation

Option 1: Zed ACP Registry (Recommended)

Install Amp directly from Zed's ACP Registry:

  1. In Zed, open the Agent Panel
  2. Click +, then select + Add More Agents
  3. Search for Amp and install it

Zed will automatically download the correct binary for your platform.

Option 2: Pre-built Binary

Download a standalone binary from the GitHub Releases page — no runtime dependencies required.

Platform Architecture Binary
Linux x64 amp-acp-linux-x64
Linux arm64 amp-acp-linux-arm64
macOS x64 (Intel) amp-acp-darwin-x64
macOS arm64 (Apple Silicon) amp-acp-darwin-arm64
Windows x64 amp-acp-windows-x64.exe

Download the binary for your platform, make it executable (chmod +x on Linux/macOS), and add to your Zed settings.json (open with cmd+, or ctrl+,):

{
  "agent_servers": {
    "Amp": {
      "type": "custom",
      "command": "/path/to/amp-acp-darwin-arm64"
    }
  }
}

Option 3: npx

{
  "agent_servers": {
    "Amp": {
      "type": "custom",
      "command": "npx",
      "args": ["-y", "amp-acp"],
      "env": {
        "AMP_API_KEY": "your-api-key-here"
      }
    }
  }
}

Requires Node.js 18+.

Authentication

If you have Amp CLI installed: Run amp login first — credentials are shared automatically.

If you don't have Amp CLI: Run amp-acp --setup to configure your API key interactively. Alternatively, you can start a chat in Zed's Agent Panel — it will automatically trigger the setup flow if no credentials are found, just follow the prompts.

Auth Process

Features

  • Streaming responses — Amp messages, tool calls, and thinking are streamed in real-time via ACP
  • Image support — Handles image content blocks from Amp (base64 and URL)
  • MCP passthrough — MCP servers configured in Zed are automatically passed through to Amp
  • Session modes — Switch between Default (prompts for tool permissions) and Bypass (skips permission prompts)
  • /init command — Type /init to generate an AGENTS.md file for your project
  • Conversation continuity — Thread context is preserved across multiple prompts within a session

MCP Configuration Passthrough

MCP servers configured in Zed's context_servers are automatically forwarded to Amp. This is compatible with how other ACP agents like Claude Code and Codex handle MCP servers.

Supported MCP Server Types

Type Description Example
stdio Local command-line MCP servers @playwright/mcp, @modelcontextprotocol/server-filesystem
HTTP Remote HTTP MCP servers https://mcp.exa.ai/mcp
SSE Remote Server-Sent Events MCP servers https://mcp.monday.com/sse

Example: Using Exa Search with Amp

{
  "agent_servers": {
    "Amp": {
      "type": "custom",
      "command": "npx",
      "args": ["-y", "amp-acp"]
    }
  },
  "context_servers": {
    "exa": {
      "url": "https://mcp.exa.ai/mcp"
    }
  }
}

Example: Multiple MCP Servers

{
  "agent_servers": {
    "Amp": {
      "type": "custom",
      "command": "npx",
      "args": ["-y", "amp-acp"]
    }
  },
  "context_servers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest", "--headless"]
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token"
      }
    }
  }
}

For more details, see docs/mcp-passthrough.md.

Development

bun install
bun run build        # Bundle to dist/index.js
bun run lint         # Type-check with tsc
bun test src/        # Run unit tests
bun run test:binary  # Run binary integration tests
bun run test:all     # Run all tests

Troubleshooting

Adapter doesn't start: Make sure you have Node.js 18+ (for npx) or use a pre-built binary / Zed extension instead.

Connection issues: Restart Zed and try again. The adapter creates a fresh connection each time.

Tool execution problems: Check Zed's output panel for detailed error messages from the Amp SDK.

MCP server not connecting: Ensure the MCP server command is correct and any required environment variables are set. Check Zed's logs for connection errors.

License

Apache-2.0