Skip to content

fix: detect Droid MCP tools using ___ delimiter#7

Merged
ashwin-corridor merged 1 commit into
mainfrom
tan/fix-droid-mcp-type-detection
Feb 27, 2026
Merged

fix: detect Droid MCP tools using ___ delimiter#7
ashwin-corridor merged 1 commit into
mainfrom
tan/fix-droid-mcp-type-detection

Conversation

@tanuj-corridor

@tanuj-corridor tanuj-corridor commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Droid's MCP tools use serverName___toolName format (e.g. corridor___listProjects) instead of Claude's mcp__server__tool format
  • The droid OnBeforeExecution handler now checks for ___ in the tool name as an additional MCP detection path
  • Without this fix, all Droid MCP tool calls are classified as ExecutionTool and silently allowed, bypassing compliance checks and debug logging

Test plan

  • Added TestDroidPreToolUse_MCPTypeDetection covering corridor___listProjects → MCP, Read → tool, Bash → shell
  • All existing tests pass

Open with Devin

Droid's MCP tool naming convention uses serverName___toolName
(e.g. corridor___listProjects) instead of Claude's mcp__server__tool
format. Without this fix, all Droid MCP tools are classified as
ExecutionTool instead of ExecutionMCP, causing the unified execution
handler to silently skip them.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@corridor-security corridor-security Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: This PR adds string-based detection for Droid MCP tool names (using the "___" delimiter) in OnBeforeExecution and associated tests; it only inspects ToolName strings and does not execute user-controlled input. No exploitable security vulnerabilities were identified.

Risk: Low risk. The change is limited to classification logic with no new attack surface, external integrations, or sensitive data handling, and it does not introduce command execution or path handling.

Recommendations:

  • Ensure downstream MCP execution paths continue to validate MCP URLs and commands (allowlist domains, deny localhost/private IPs, and avoid re-executing user-controlled command strings) regardless of how the tool type is detected.

Comment thread unified.go
@ashwin-corridor
ashwin-corridor merged commit 79a3a47 into main Feb 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants