Unable to load MCP Servers
I recently attempted to add the burp mcp server (via the extension), and CAI does not recognize it. I see the option in the help menu, but it does not seem to understand the /mcp command. Everything else seems to work as expected.
Could you please let me know if this issue still exists in the latest code?
I’ve fixed some of the problems I encountered while using the /mcp command.
If the issue persists, please describe exactly how it happens — I might be able to help.
I have a problem that may be similar. I can load the MCP tools but the agents don't recognize them:
CAI> /mcp load http://localhost:8000/sse shyhurricane
✓ Connected to SSE server 'shyhurricane' at http://localhost:8000/sse
Available tools: 19
...
CAI> /mcp add shyhurricane redteam_agent
Adding tools from MCP server 'shyhurricane' to agent 'Red Team Agent'...
Adding tools to Red Team Agent
<SNIP>
Added 19 tools from server 'shyhurricane' to agent 'Red Team Agent'.
Agent now has 21 tools total
CAI> /agent select redteam_agent
Switched to agent: Red Team Agent (Parallel mode disabled)
🤖 Red Team Agent (Current Agent)
┣━━ Tools
┃ ┣━━ generic_linux_command
┃ ┣━━ execute_code
┃ ┗━━ (2 regular tools)
┗━━ Handoffs
CAI> /agent select one_tool_agent
Switched to agent: CTF agent (Parallel mode disabled)
🤖 CTF agent (Current Agent)
┣━━ Tools
┃ ┣━━ generic_linux_command
┃ ┗━━ (1 regular tools)
┗━━ Handoffs
╭─ Stream ─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [6] Agent: CTF agent >> I understand you'd like me to find CTF flags on 10.129.231.253 and have provided a list of │
│ tools: `run_unix_command`, `deobfuscate_javascript`, `find_wordlists`, `directory_buster`, │
│ `fetch_web_resource_content`, `find_domains`, `find_hosts`, `find_netloc`, `find_urls`, `find_web_resources`, │
│ `spider_website`, `save_finding`, `query_findings`, `index_http_url`, `port_scan`, `prompt_chooser`, `prompt_list`, │
│ `register_hostname_address`, `web_search`. │
│ │
│ However, after reviewing my capabilities, I can confirm that the **only** tool available to me for interacting with │
│ the target system is `default_api.generic_linux_command`. The other tools you listed are not present in my current │
│ environment. │
│ │
│ Given this limitation, I can only proceed with finding the flags on 10.129.231.253 using `generic_linux_command`. │
│ │
│ Would you like me to proceed with finding the CTF flags using `default_api.generic_linux_command`? Current: I:1803 │
│ O:769 R:506 ($0.0025) | Total: I:5175 O:2321 R:1792 ($0.0025) | Session: $0.0074 | Context: 1.4% 🟩 │
│ [15:00:55 (gemini/gemini-2.5-flash)] | I:1803 O:769 ($0.0025) | Session: $0.0074🟩 1.4% │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
$ cai_env pip freeze | grep cai
cai-framework==0.5.3
I have tried looking into this issue and submitted a possible fix in #222 . It seems that the latest version hasn’t been released on PyPI yet, but you can try fixing it by using the latest source code from the repository.
I am just going to echo what some others have said, I am encountering this same exact issue. It really does not make that much sense that agents dont recognize MCP tools that they have been associated with
Confirmed latest code pulled from main less than an hour ago will use tools from my MCP server. Now the problem is the timeout is too short for some tools like port scan and spider, but that's another issue.
It seems this is hardcoded in cai/src/cai/repl/commands/mcp.py, line 257.
As a temporary workaround, you might try changing that value.
Now that MCP server seems to be working properly, it looks like this issue has been resolved to some extent.
Glad to hear the issue is resolved. Thank you for your contributions to the community and for using CAI.