Skip to content

fix(mcp): allow Claude Code names in tool validation#3135

Merged
amitksingh1490 merged 2 commits intotailcallhq:mainfrom
justinpbarnett:fix-mcp-allowlist-claude-format
Apr 24, 2026
Merged

fix(mcp): allow Claude Code names in tool validation#3135
amitksingh1490 merged 2 commits intotailcallhq:mainfrom
justinpbarnett:fix-mcp-allowlist-claude-format

Conversation

@justinpbarnett
Copy link
Copy Markdown
Contributor

Summary

Allow agent tool validation to accept Claude Code formatted MCP tool names when the agent is configured with Forge's legacy MCP tool names or globs.

Problem

Custom agents can be configured with MCP tools using Forge's internal legacy format, for example mcp_github_tool_create_issue or mcp_github_tool_*.

After the Claude Code MCP naming compatibility work, incoming tool calls may arrive as mcp__github__create_issue. MCP execution lookup already accepts both formats, but agent tool validation still checked only the incoming name directly. That caused valid MCP calls to be rejected as not allowed.

Fix

When validating a tool call, continue checking the incoming normalized name and also check its legacy MCP form when the incoming name uses the Claude Code mcp__{server}__{tool} format.

Validation

  • Added regression test for exact legacy MCP tool allowlists
  • Added regression test for legacy MCP glob allowlists
  • Ran cargo test -p forge_app tool_resolver::tests -- --nocapture
  • Ran cargo clippy -p forge_app --lib --tests -- -D warnings

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 23, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the type: fix Iterations on existing features or infrastructure. label Apr 23, 2026
@amitksingh1490 amitksingh1490 enabled auto-merge (squash) April 24, 2026 06:19
@amitksingh1490 amitksingh1490 merged commit e10b0a9 into tailcallhq:main Apr 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants