Skip to content

bugfix/mcp-runtime-failure#24

Merged
wcollins merged 3 commits intotorerodev:mainfrom
wcollins:bugfix/mcp-runtime-failure
Aug 29, 2025
Merged

bugfix/mcp-runtime-failure#24
wcollins merged 3 commits intotorerodev:mainfrom
wcollins:bugfix/mcp-runtime-failure

Conversation

@wcollins
Copy link
Contributor

📒 Summary

Fixes the MCP runtime failure where service listing operations were failing with "unexpected json structure: <class 'dict'>" errors. The issue was caused by mismatched JSON response format expectations between the ToreroExecutor and the actual torero CLI output format.

🔧 Changes

  • Fixed JSON parsing in ToreroExecutor methods:
    • get_services() - Now handles both "items" and "services" keys
    • get_decorators() - Now handles both "items" and "decorators" keys
    • get_secrets() - Now handles "items", "secrets", and "names" keys
    • get_registries() - Now handles both "items" and "registries" keys
  • Improved error messages - Show available keys when JSON structure is unexpected
  • Updated docker-compose port mappings - Changed SSH from port 22 to 2222 to avoid OrbStack conflicts

🧪 Testing

  • Verified torero CLI returns {"services": []} format, not {"items": []}
  • Created and ran comprehensive test script covering all affected methods
  • All MCP service listing operations now return proper responses instead of errors
  • Container builds and runs successfully with SSH accessible on port 2222

🔗 Useful Links

  • Issue reported via Claude Desktop MCP connection failures
  • Related to recent torero CLI output format changes
  • Fixes compatibility with current torero v1.5.0 CLI responses
  • Branch: bugfix/mcp-runtime-failure
  • Commit: 8e0c2cb

@wcollins wcollins added the bug Something isn't working label Aug 29, 2025
@wcollins wcollins merged commit bde7a17 into torerodev:main Aug 29, 2025
3 checks passed
@wcollins wcollins deleted the bugfix/mcp-runtime-failure branch August 29, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant