mirror of https://github.com/aliasrobotics/cai.git
1.9 KiB
1.9 KiB
MCP
CAI supports the Model Context Protocol (MCP) for integrating external tools and services with AI agents. Common patterns:
- STDIO (Standard Input/Output) — For local processes, including the Burp Suite MCP stdio proxy from PortSwigger (extract
mcp-proxy-all.jarfrom the MCP Server BApp; default Burp SSE URL is usuallyhttp://127.0.0.1:9876):
CAI>/mcp load stdio burp java -jar /path/to/mcp-proxy-all.jar --sse-url http://127.0.0.1:9876
- SSE (Server-Sent Events) — Direct HTTP/SSE only works when the server sends a compliant
Content-Type: text/event-streamresponse. Many tools (including Burp’s in-process SSE) are unreliable with CAI’s client; prefer stdio for Burp.
CAI>/mcp load http://127.0.0.1:8000/sse myserver
Other stdio servers:
CAI>/mcp load stdio myserver python mcp_server.py
Once connected, add the MCP tools to an agent (server name first, then agent id or index). The REPL prints a table of each tool and its status.
CAI>/mcp add burp redteam_agent
You can list all active MCP connections and their transport types:
CAI>/mcp list
Other useful subcommands: /mcp status, /mcp associations, /mcp test <server>, and /mcp help (same summary as /help mcp and /h mcp).
https://github.com/user-attachments/assets/386a1fd3-3469-4f84-9396-2a5236febe1f
Example: Controlling Chrome with CAI
- Install node, following the instructions on the official site
- Install Chrome (Chromium is not compatible with this functionality)
- Run the following commands:
CAI>/mcp load stdio devtools npx chrome-devtools-mcp@latest
CAI>/mcp add devtools redteam_agent
CAI>/agent redteam_agent
Once this is done, you will have full control of Chrome using the red team agent.