Skip to main content
Get up and running with the ABP MCP Bridge to use ABP-compliant web applications from Claude Code or other MCP-compatible agents.

What is the MCP Bridge?

The ABP MCP Bridge is a generic MCP server that:
  • Connects to any ABP-compliant web application
  • Discovers and exposes its capabilities as MCP tools
  • Manages browser lifecycle automatically
  • Routes data efficiently (large outputs to files)
  • Handles all ABP protocol complexity
You don’t need to know ABP internals. The bridge translates ABP into familiar MCP tools.

Prerequisites

  • Node.js 18+ and npm
  • Claude Code or another MCP-compatible agent
  • Chrome/Chromium (installed automatically by Puppeteer if missing)

Installation

1

Clone and Build

After building, the compiled server is at build/index.js.
2

Verify Build

Configuration

Create .mcp.json in your project root:
Replace /absolute/path/to/abp-mcp-bridge with the actual path. Example:

Option 2: Global Configuration

Edit ~/.claude/config.json:

Option 3: Environment-Specific Path

Use an environment variable:
Then set the environment variable:

First Connection

1

Start Claude Code

2

Check Available Tools

The bridge starts with five static tools:
3

Connect to an ABP App

Claude Code will:
  1. Discover the app’s ABP manifest
  2. Launch a browser (headless by default — set ABP_HEADLESS=false to see the window)
  3. Load the app
  4. Initialize an ABP session
  5. Expose the app’s capabilities as MCP tools
4

See New Tools

After connection, you’ll see dynamic tools:
Naming convention:
  • ABP capability: convert.markdownToHtml
  • MCP tool: abp_convert_markdownToHtml
(Dots become underscores, prefixed with abp_)
Not all MCP clients support dynamic tool registration reliably. Claude Code, for instance, may not expose dynamically registered tools to the LLM. If dynamic tools don’t appear, use abp_call instead — it can invoke any capability and is always available. See Limitations and Known Issues for details.

Using ABP Capabilities

abp_call is the primary tool for executing any capability. It works regardless of whether dynamic tools are available. Parameters: Example — convert markdown to HTML:
Response format: All results are saved to a file and the file path is returned. Read the file if you need to inspect the output.

Example: Convert Markdown to HTML

What happens:
  1. Claude Code calls abp_call
  2. Bridge calls window.abp.call('convert.markdownToHtml', { markdown: "..." })
  3. App processes the markdown
  4. Bridge returns the HTML result
  5. Claude Code sees the output

Example: Generate PDF

What happens:
  1. Bridge calls the PDF capability
  2. App generates PDF (may take a few seconds)
  3. Bridge saves PDF to a file (automatically, because it’s binary)
  4. Claude Code receives a file path like /tmp/abp-mcp-bridge/export_pdf_1707234567890.pdf
Large outputs are automatically saved to files to avoid context bloat.

Example: Check Status

Response:

Example: Disconnect

What happens:
  1. Bridge calls window.abp.shutdown()
  2. Browser closes
  3. Dynamic tools disappear
  4. Back to static tools only

Configuration Options

Headful Mode

By default, the bridge uses headless mode. Set ABP_HEADLESS=false for headful (visible browser) when you need:
  • User sessions (needs user’s profile)
  • GPU/WebGL (requires hardware access)
  • Permission prompts (needs a user to click “Allow”)
  • Visual debugging
Most capabilities work fine in headless mode. PDF generation uses abp_render_to_pdf which works in both modes.

Environment Variables

The bridge supports these environment variables: Example:

Troubleshooting

Browser Doesn’t Launch

Symptom: abp_connect fails with “Failed to launch browser” Solutions:
  1. Check Chrome/Chromium is installed:
  2. Puppeteer should auto-install Chrome. If not:
  3. Check permissions (macOS may block automated browsers):
    • System Settings -> Privacy & Security -> Automation
    • Allow Terminal/your IDE to control Chrome

Connection Fails

Symptom: abp_connect returns “No ABP manifest found” Cause: The app doesn’t support ABP or the manifest link is missing. Solutions:
  1. Verify the URL is correct
  2. Check the app’s HTML has:
  3. Manually fetch the manifest:

Tools Don’t Appear After Connection

Symptom: abp_connect succeeds but no dynamic tools appear Cause: Session initialization failed or no capabilities are available. Solutions:
  1. Check abp_status() — is connected: true?
  2. Look at the terminal running Claude Code for error messages
  3. Enable debug logging:
  4. Check browser console (in the visible Chrome window)

Large Outputs Not Saved

Symptom: Binary data returned inline instead of as a file Cause: Output routing rules may need adjustment. Solutions:
  1. Check output directory exists and is writable:
  2. Set custom output directory:
  3. Check file was created:

Capabilities Fail with Permission Errors

Symptom: A capability returns “Permission denied” Cause: Browser lacks necessary permissions (usually in headless mode). Solutions:
  1. Use headful mode (default)
  2. Ensure the browser window has focus
  3. Check browser permissions:
    • Chrome -> Settings -> Privacy and security -> Site Settings -> Permissions

Browser Crashes or Freezes

Symptom: Browser window becomes unresponsive Solutions:
  1. Disconnect and reconnect:
  2. Restart Claude Code
  3. Check system resources (RAM, CPU)
  4. Reduce concurrent operations

Logs Not Visible

Symptom: Can’t see what the bridge is doing Solutions:
  1. Check stderr (where MCP servers log):
    • In Claude Code, logs appear in the debug console
  2. Enable debug logging:
  3. Run the bridge manually for testing:

Next Steps

Building ABP Web Apps

Build your own ABP-compatible app

MCP Bridge Architecture

Understand the bridge internals

Data Flow

Understand the data routing logic

Protocol Overview

Full ABP specification

Additional Resources