How can I connect Google Stitch with an MCP server in OpenCode? #8092

Open
opened 2026-02-16 18:09:09 -05:00 by yindo · 2 comments
Owner

Originally created by @cyberprophet on GitHub (Jan 30, 2026).

Originally assigned to: @jayair on GitHub.

Question

Hi,
I’m exploring ways to integrate Google Stitch with an MCP (Model Context Protocol) server in the OpenCode ecosystem, and I’d like some guidance on the recommended approach.

Context

I’m currently using OpenCode as the main interface.

I’m aware that OpenCode supports MCP servers via its plugin / server configuration.

Google Stitch appears to expose capabilities that could be useful if bridged through an MCP-compatible server.

What I’m trying to understand

Is there an official or recommended way to connect Google Stitch to OpenCode via an MCP server?

Does this require:

writing a custom MCP server that wraps Google Stitch APIs, or

using an existing MCP server / adapter?

Are there any reference implementations or examples (even minimal ones) that demonstrate:

MCP server ↔ external AI service integration

or OpenCode consuming a non-OpenAI MCP backend?

Additional details

My goal is to expose Google Stitch features as tools / context consumable by OpenCode through MCP.

I’m especially interested in best practices around:

authentication

request/response schema design

performance considerations

Any pointers to docs, examples, or architectural guidance would be very helpful.
Thanks!

Originally created by @cyberprophet on GitHub (Jan 30, 2026). Originally assigned to: @jayair on GitHub. ### Question Hi, I’m exploring ways to integrate Google Stitch with an MCP (Model Context Protocol) server in the OpenCode ecosystem, and I’d like some guidance on the recommended approach. Context I’m currently using OpenCode as the main interface. I’m aware that OpenCode supports MCP servers via its plugin / server configuration. Google Stitch appears to expose capabilities that could be useful if bridged through an MCP-compatible server. What I’m trying to understand Is there an official or recommended way to connect Google Stitch to OpenCode via an MCP server? Does this require: writing a custom MCP server that wraps Google Stitch APIs, or using an existing MCP server / adapter? Are there any reference implementations or examples (even minimal ones) that demonstrate: MCP server ↔ external AI service integration or OpenCode consuming a non-OpenAI MCP backend? Additional details My goal is to expose Google Stitch features as tools / context consumable by OpenCode through MCP. I’m especially interested in best practices around: authentication request/response schema design performance considerations Any pointers to docs, examples, or architectural guidance would be very helpful. Thanks!
yindo added the docs label 2026-02-16 18:09:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 30, 2026):

Thank you for this detailed question! While your issue appears to be unique in the repository, here are some related issues that might provide helpful context:

  • #8058: Add HTTP Streamable transport support for remote MCP servers
  • #6067: GitHub MCP OAuth authentication (for MCP auth patterns)
  • #5371: Support MCP servers that require POST-based or non-standard SSE handshake
  • #5784: MCP auth configuration for multi-tenant serve deployments

These issues discuss various MCP server integration patterns that might inform your approach to building a Google Stitch MCP wrapper. The OpenCode MCP protocol documentation and examples in the main repository should also help guide your implementation.

@github-actions[bot] commented on GitHub (Jan 30, 2026): Thank you for this detailed question! While your issue appears to be unique in the repository, here are some related issues that might provide helpful context: - #8058: Add HTTP Streamable transport support for remote MCP servers - #6067: GitHub MCP OAuth authentication (for MCP auth patterns) - #5371: Support MCP servers that require POST-based or non-standard SSE handshake - #5784: MCP auth configuration for multi-tenant `serve` deployments These issues discuss various MCP server integration patterns that might inform your approach to building a Google Stitch MCP wrapper. The OpenCode MCP protocol documentation and examples in the main repository should also help guide your implementation.
Author
Owner

@cyberprophet commented on GitHub (Jan 30, 2026):

Just to confirm my understanding — is this the intended workaround you were referring to?

Instead of connecting OpenCode directly to a remote Stitch MCP server, I’m running a local wrapper (stitch-mcp-auto) and configuring it as a type: "local" MCP in opencode.json, so that OpenCode only talks to a local process and the wrapper handles communication with Google Stitch.

For example:

 "mcp": {
   "stitch": {
     "type": "local",
     "command": [
       "npx",
       "-y",
       "stitch-mcp-auto"
     ],
     "enabled": true,
     "environment": {
       "GOOGLE_CLOUD_PROJECT": "Project Id"
     }
   }
 }
  • Is this the same approach you had in mind when mentioning the current workaround for MCP transport limitations?
@cyberprophet commented on GitHub (Jan 30, 2026): ### Just to confirm my understanding — is this the intended workaround you were referring to? Instead of connecting OpenCode directly to a remote Stitch MCP server, I’m running a local wrapper (`stitch-mcp-auto`) and configuring it as a `type: "local"` MCP in `opencode.json`, so that OpenCode only talks to a local process and the wrapper handles communication with Google Stitch. For example: ```json "mcp": { "stitch": { "type": "local", "command": [ "npx", "-y", "stitch-mcp-auto" ], "enabled": true, "environment": { "GOOGLE_CLOUD_PROJECT": "Project Id" } } } ``` - Is this the same approach you had in mind when mentioning the current workaround for MCP transport limitations?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8092