Problem/Motivation

Opencode is an open source agent and widely used (+87k stars on github): https://github.com/anomalyco/opencode

Proposed resolution

Document how to use MCP module(s) with Opencode.

A config I tried

    "my_drupal": {
        "enabled": true,
        "type": "remote",
        "url": "https://<domain>/mcp/post",
        "oauth": false,
        "headers": {
            "Authorization": "Basic {env:<api_key_value_in_config/system/keys/<my_key>>}"
        }
    }

Comments

progzy created an issue. See original summary.

gagosha’s picture

Status: Active » Closed (won't fix)

Hey, as I checked OpenCode uses standard MCP HTTP transport. The Drupal MCP module exposes a standard HTTP endpoint at /mcp/post. Any MCP client that supports HTTP/Streamable HTTP transport can connect to it. The only difference is how each client formats its config file and I don't think it's correct to add separate documentation for every MCP client.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mtift’s picture

I apologize for commenting on a closed issue, but if there is a place to document how to use MCP module(s) with Opencode, or if someone has already figure it out, I would love to know about it.

I opened this issue in the new "AI Best Practices for Drupal" project: https://www.drupal.org/project/ai_best_practices/issues/3581977