Skip to content

fix: add mcpPromptMode capability — stop dead MCP docs in CatAgent - #60

Open
bouillipx wants to merge 2 commits into
developfrom
fix/catagent-mcp-prompt-mode
Open

fix: add mcpPromptMode capability — stop dead MCP docs in CatAgent#60
bouillipx wants to merge 2 commits into
developfrom
fix/catagent-mcp-prompt-mode

Conversation

@bouillipx

Copy link
Copy Markdown

Summary

  • CatAgent had mcpSupport: true but couldn't use MCP tools or HTTP callbacks — both config states injected unusable documentation into the prompt
  • Adds mcpPromptMode() capability to AgentService interface with three modes: 'native-mcp' / 'http-callback' / 'none'
  • CatAgentService returns 'none' — neither S13 (MCP_TOOLS_SECTION) nor C1 (HTTP callback) docs are injected
  • Centralized resolveMcpPromptInjection() helper replaces scattered boolean logic in both route-serial and route-parallel
  • Legacy providers without the capability fall back to existing mcpSupport && mcpServerPath logic (zero back-compat break)

Design Gate

Passed by @codex — see thread_mnlhyrdap19ne3r3 for full design review (2 rounds, P1s addressed).

Test plan

  • 7 new unit tests for resolveMcpPromptInjection: none/native-mcp/http-callback modes, legacy fallbacks, antigravity special case, capability-overrides-config
  • 9 existing McpPromptInjector tests pass (zero regression)
  • CatAgent Phase E: 11/11 ✅
  • CatAgent Phase F: 16/16 ✅
  • Security baseline: 20/20 ✅
  • Golden-wire + factory + F041: 56/56 ✅
  • TypeScript: pnpm lint clean
  • Biome: organizeImports fixed

Closes #59

🐾 [宪宪/opus46]

🤖 Generated with Claude Code

@bouillipx
bouillipx requested a review from zts212653 as a code owner July 7, 2026 16:55
@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

bouillipx and others added 2 commits July 8, 2026 10:49
…o CatAgent

CatAgent had mcpSupport=true but couldn't actually use MCP tools (no MCP
client) or HTTP callbacks (no shell/curl). Both config states produced
dead documentation in the prompt:
- mcpSupport=true → S13 MCP_TOOLS_SECTION injected (unusable tools)
- mcpSupport=false → C1 HTTP callback injected (no curl available)

Add mcpPromptMode() to AgentService interface with three modes:
- 'native-mcp': inject S13 docs (Claude)
- 'http-callback': inject C1 callback (Codex/Gemini)
- 'none': inject neither (CatAgent pre-bridge)

Centralized resolveMcpPromptInjection() helper replaces scattered boolean
logic in both route-serial and route-parallel. Legacy providers without
the new capability fall back to existing mcpSupport && mcpServerPath logic
(zero back-compat break).

Closes #59

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address codex review P2 — new test block formatter compliance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bouillipx
bouillipx force-pushed the fix/catagent-mcp-prompt-mode branch from 3a417e4 to 1f772d6 Compare July 8, 2026 02:52
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.

fix: CatAgent mcpPromptMode capability — stop injecting dead MCP docs

1 participant