Skip to content

🐛 MCP Tools Failing: TypeError on output.output.toLowerCase() in v1.1.50 #13091

Closed

Description

@roshitx

Bug Description

All MCP (Model Context Protocol) tool calls are failing with a TypeError in OpenCode v1.1.50. This affects all MCP servers including Laravel Boost, Exa, Context7, and other MCP integrations.

Error Message:

TypeError: undefined is not an object (evaluating 'output.output.toLowerCase')

Environment

  • OpenCode Version: 1.1.50 (latest stable)
  • Platform: macOS (darwin-arm64)
  • Installation Method: Homebrew
  • Node Version: v24.1.0

Steps to Reproduce

  1. Install OpenCode v1.1.50 via Homebrew
  2. Configure any MCP server (e.g., Laravel Boost MCP)
  3. Attempt to call any MCP tool

Example with Laravel Boost:

laravel-boost_search-docs({
  queries: ["migration", "database migration"]
})

Example with Exa:

exa_web_search_exa({
  query: "OpenCode documentation",
  numResults: 5
})

Expected Behavior

MCP tools should execute successfully and return results.

Actual Behavior

All MCP tool calls fail immediately with:

TypeError: undefined is not an object (evaluating 'output.output.toLowerCase')

Root Cause Analysis

The client-side MCP response parser expects a nested structure:

response.output.output.toLowerCase()

However, MCP servers are returning a flat structure:

response.output  // No nested .output property

This is confirmed by direct tool execution working correctly:

# Direct execution works (bypasses OpenCode client parser)
php artisan boost:execute-tool 'Laravel\Boost\Mcp\Tools\SearchDocs' 'base64params'
# Returns: {"isError":false,"content":[{"type":"text","text":"..."}]}

The backend MCP server responses are correct - the bug is in OpenCode's client-side parsing layer.

Affected Components

  • ✅ Laravel Boost MCP - All tools fail
  • ✅ Exa MCP - All tools fail
  • ✅ Context7 MCP - All tools fail
  • ✅ grep.app MCP - All tools fail
  • ✅ All other MCP integrations - Likely affected

Workaround

For Laravel Boost users, direct tool execution via bash:

php artisan boost:execute-tool 'ToolClassName' 'base64_encoded_params'

Additional Context

  • MCP server logs show successful tool execution
  • Error occurs during response parsing in OpenCode client
  • Binary is compiled (Mach-O), cannot patch directly
  • Logs location: ~/.local/share/opencode/log/

Verification

Confirmed with:

opencode --version  # 1.1.50
opencode debug config  # Shows MCP servers configured correctly

MCP servers initialize successfully but all tool invocations fail at the response parsing stage.

Suggested Fix

Update MCP response parser to handle flat output structure:

// Current (broken)
output.output.toLowerCase()

// Suggested fix
(output?.output || output)?.toLowerCase?.()

Or properly validate MCP response schema before accessing nested properties.

Activity

  1. roshitx commented on Feb 11, 2026

    @roshitx
    Author

    Note: Duplicate of #12987 (Kubernetes MCP issue)

    This bug affects ALL MCP servers, not just specific integrations. See my comment on #12987 for comprehensive details.

    Keeping this issue open for additional Laravel Boost workaround documentation.

  2. github-actions commented on Feb 11, 2026

    @github-actions
    Contributor

    This issue appears to be a duplicate of #12987, which reports the identical TypeError with MCP tool calls. Both issues involve the same root cause: OpenCode's client-side MCP response parser expecting a nested output.output structure when the MCP servers are correctly returning a flat output structure.

    Please check #12987 and consider consolidating these reports if you're experiencing the same error across different MCP servers.

  3. roshitx commented on Feb 11, 2026

    @roshitx
    Author

    🎯 Root Cause Found!

    The bug is NOT in OpenCode core - it's in Oh-My-OpenCode (OMO) plugin v3.5.0.

    Evidence

    User on Windows 11 confirmed:

    rollback to [email protected] fixed this issue for me
    

    Release: https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.5.0

    Fix

    For users with OMO plugin:

    # Rollback to v3.4.0
    npm install -g [email protected]
    # or
    bun install -g [email protected]

    For users without OMO:
    The bug is OMO-specific. If you're not using Oh-My-OpenCode plugin, this issue doesn't apply.

    Action Items

    1. ✅ Bug is in OMO v3.5.0, not OpenCode core
    2. ⏳ Should report to: https://github.com/code-yeongyu/oh-my-opencode/issues
    3. ✅ Workaround: Rollback to OMO v3.4.0

    Closing this issue as it's not an OpenCode bug. Will report to OMO repo.

  4. roshitx commented on Feb 11, 2026

    @roshitx
    Author

    Closing - Bug is in Oh-My-OpenCode plugin v3.5.0, not OpenCode core. Will report to https://github.com/code-yeongyu/oh-my-opencode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions