[BUG] MCP Wildcards configured in subagents are not discoverable

Resolved 💬 3 comments Opened Jan 13, 2026 by Hearmeman24 Closed Feb 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Configuring MCP wildcards in the YAML frontmatter for subagents yields in No such tool available errors.

mcp__codex_delegator__* - No such tool available
mcp__codex_delegator__invoke_agent - works

Frontmatter:
---
name: nextjs-supervisor
description: Expert Next.js developer mastering Next.js 14+ with App Router and full-stack features. Specializes in server components, server actions, performance optimization, and production deployment with focus on building fast, SEO-friendly applications. Use when building Next.js applications or SSR/SSG features.
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__codex_delegator__invoke_agent, mcp__context7__*
---

What Should Happen?

Configuring wildcards in YAML frontmatter for subagents should make all MCP actions discoverable.

Error Messages/Logs

Steps to Reproduce

  1. Configure an MCP server (e.g., context7) in ~/.claude.json:

"mcpServers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}

  1. Create a custom agent in .claude/agents/test-agent.md:

name: test-agent
description: Test agent for MCP wildcard bug
tools: Read, Write, Edit, Bash, mcp__context7__*

run: You are a test agent. List your available MCP tools.

  1. Invoke the custom agent via Task tool and ask it to call mcp__context7__resolve-library-id

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.6 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗