[Diagnostic] MCP tools not available despite connected server + /debug-report missing fallback #100

Closed
opened 2026-01-22 18:15:11 +00:00 by lmiranda · 1 comment
Owner

Diagnostic Report

Generated: 2026-01-22
Command Tested: /debug-report (general diagnostic)
Reporter: Claude Code via /debug-report

Project Context

Field Value
Repository personal-projects/personal-portfolio
Git Remote ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/personal-portfolio.git
Working Directory /home/lmiranda/Repositories/personal/personal-portfolio
Current Branch development

Diagnostic Results

MCP Server Status

Command: claude mcp list
Output:

plugin:projman:gitea: ✓ Connected
plugin:cmdb-assistant:netbox: ✓ Connected
plugin:pr-review:gitea: ✓ Connected

Test Results

All 5 tests BLOCKED - MCP tools not available in session function list.

Test Tool Status Reason
1 validate_repo_org BLOCKED Tool not in function list
2 get_labels BLOCKED Tool not in function list
3 list_issues BLOCKED Tool not in function list
4 list_milestones BLOCKED Tool not in function list
5 suggest_labels BLOCKED Tool not in function list

Summary

  • Total Tests: 5
  • Passed: 0
  • Failed: 5 (all blocked)

Error Category

  • Tool Availability - tools not exposed to session

Hypothesis

MCP server is running and reports "Connected" but tools are not being registered in the Claude Code session's available function list. Possible causes:

  1. Session started before MCP server fully initialized
  2. Tool registration race condition
  3. Plugin tool exposure mechanism issue

Suggested Investigation

  1. Check mcp_server/server.py - tool registration logic
  2. Check plugin manifest tool exposure configuration
  3. Review Claude Code MCP tool loading sequence

Secondary Issue: /debug-report Missing Fallback

Problem: The /debug-report skill failed to create this issue automatically because it relies on MCP tools (mcp__plugin_projman_gitea__create_issue) which were the very tools being diagnosed as unavailable.

Claude had access to:

  • Gitea API credentials at ~/.config/claude/gitea.env
  • curl command available in Bash

But the skill instructions did not include a fallback to use curl + Gitea REST API when MCP tools are unavailable.

Suggested Fix: Update /debug-report skill to:

  1. First attempt MCP tool
  2. If MCP unavailable, check for ~/.config/claude/gitea.env
  3. If credentials exist, use curl to Gitea REST API
  4. If no credentials, save to local file and inform user

Reproduction Steps

  1. Navigate to /home/lmiranda/Repositories/personal/personal-portfolio
  2. Start Claude Code session
  3. Run /debug-report
  4. Observe MCP tools are not available despite claude mcp list showing Connected

Labels: Type: Bug, Source: Diagnostic, Agent: Claude

## Diagnostic Report **Generated**: 2026-01-22 **Command Tested**: /debug-report (general diagnostic) **Reporter**: Claude Code via /debug-report ## Project Context | Field | Value | |-------|-------| | Repository | `personal-projects/personal-portfolio` | | Git Remote | `ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/personal-portfolio.git` | | Working Directory | `/home/lmiranda/Repositories/personal/personal-portfolio` | | Current Branch | `development` | ## Diagnostic Results ### MCP Server Status **Command**: `claude mcp list` **Output**: ``` plugin:projman:gitea: ✓ Connected plugin:cmdb-assistant:netbox: ✓ Connected plugin:pr-review:gitea: ✓ Connected ``` ### Test Results All 5 tests BLOCKED - MCP tools not available in session function list. | Test | Tool | Status | Reason | |------|------|--------|--------| | 1 | validate_repo_org | BLOCKED | Tool not in function list | | 2 | get_labels | BLOCKED | Tool not in function list | | 3 | list_issues | BLOCKED | Tool not in function list | | 4 | list_milestones | BLOCKED | Tool not in function list | | 5 | suggest_labels | BLOCKED | Tool not in function list | ## Summary - **Total Tests**: 5 - **Passed**: 0 - **Failed**: 5 (all blocked) ### Error Category - [x] Tool Availability - tools not exposed to session ### Hypothesis MCP server is running and reports "Connected" but tools are not being registered in the Claude Code session's available function list. Possible causes: 1. Session started before MCP server fully initialized 2. Tool registration race condition 3. Plugin tool exposure mechanism issue ### Suggested Investigation 1. Check `mcp_server/server.py` - tool registration logic 2. Check plugin manifest tool exposure configuration 3. Review Claude Code MCP tool loading sequence --- ## Secondary Issue: /debug-report Missing Fallback **Problem**: The `/debug-report` skill failed to create this issue automatically because it relies on MCP tools (`mcp__plugin_projman_gitea__create_issue`) which were the very tools being diagnosed as unavailable. Claude had access to: - Gitea API credentials at `~/.config/claude/gitea.env` - `curl` command available in Bash But the skill instructions did not include a fallback to use curl + Gitea REST API when MCP tools are unavailable. **Suggested Fix**: Update `/debug-report` skill to: 1. First attempt MCP tool 2. If MCP unavailable, check for `~/.config/claude/gitea.env` 3. If credentials exist, use curl to Gitea REST API 4. If no credentials, save to local file and inform user --- ## Reproduction Steps 1. Navigate to `/home/lmiranda/Repositories/personal/personal-portfolio` 2. Start Claude Code session 3. Run `/debug-report` 4. Observe MCP tools are not available despite `claude mcp list` showing Connected --- **Labels**: Type: Bug, Source: Diagnostic, Agent: Claude
Author
Owner

Investigation Complete

Primary Issue (MCP tools not available): This appears to be a Claude Code platform issue, not a code bug. The MCP server implementation is correct - the tools simply weren't exposed to that particular session. This is intermittent and not reproducible consistently.

Secondary Issue (Fixed): PR #103 adds a curl fallback to /debug-report so it can still create diagnostic issues when MCP tools are unavailable.

Changes in PR #103:

  • Step 6 now has Option A (MCP) and Option B (curl fallback)
  • Secure temp file handling with mktemp -m 600
  • Safe JSON construction using jq --rawfile
  • Three-tier graceful degradation: MCP → curl with credentials → local file save

Next Steps:

  1. Review and merge PR #103
  2. Test /debug-report in a new session
  3. If the curl fallback works, close this issue

Investigated via /debug-review

## Investigation Complete **Primary Issue (MCP tools not available):** This appears to be a Claude Code platform issue, not a code bug. The MCP server implementation is correct - the tools simply weren't exposed to that particular session. This is intermittent and not reproducible consistently. **Secondary Issue (Fixed):** PR #103 adds a curl fallback to `/debug-report` so it can still create diagnostic issues when MCP tools are unavailable. ### Changes in PR #103: - Step 6 now has Option A (MCP) and Option B (curl fallback) - Secure temp file handling with `mktemp -m 600` - Safe JSON construction using `jq --rawfile` - Three-tier graceful degradation: MCP → curl with credentials → local file save **Next Steps:** 1. Review and merge PR #103 2. Test `/debug-report` in a new session 3. If the curl fallback works, close this issue --- *Investigated via `/debug-review`*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#100