Skip to content

Feature request: add MCP remote using oauth #988

Closed

Description

@benjamine

using OAuth 2.1, installing an MCP server would get much simpler and secure.

entering just a url (eg https://api.githubcopilot.com/mcp/ for github mcp), the CLI can trigger an oauth flow to complete authorization without copying secrets or putting them in config or env variables.

the process would be very similar to what you do already for authorizing a model.

VSCode has an implementation as MCP host that can be used for reference.

example server: https://github.com/github/github-mcp-server

update: Claude Code added this too (MCP server is added with a cli command, and then auth flow is done when starting the tUI, I guess it makes sense bc there it handles re-connect, disconnect too)

Activity

  1. self-assigned this
    on Jul 16, 2025
  2. bobbypiper commented on Jul 17, 2025

    @bobbypiper

    Would be ideal for access to Sentry's MCP https://docs.sentry.io/product/sentry-mcp/

  3. adrielp commented on Jul 24, 2025

    @adrielp

    ➕1 to this. Would be great for the Honeycomb MCP as well. OAuth is going to become even more common given the updates to the MCP spec. Also being able to clearly call out that the remote transport is http would be nice.

  4. idl3 commented on Aug 3, 2025

    @idl3

    This would be useful for us before we can fully swap over as we have built quite a lot of workflows that rely on OAuth MCP's like Linear + Sentry.

  5. samuelbriole commented on Aug 5, 2025

    @samuelbriole

    +1 on this feature request.

    Github and Notion now support Remote MCP servers, which simplifies a lot the setup process

  6. samholmes commented on Aug 8, 2025

    @samholmes

    This is also the official means of authenticating for Asana (https://developers.asana.com/docs/using-asanas-mcp-server)

  7. ThomasAlbrt commented on Aug 10, 2025

    @ThomasAlbrt

    That would be fantastic as the current process is quite tedious.

  8. BN-JuzzyP commented on Aug 12, 2025

    @BN-JuzzyP

    +1

  9. thdxr commented on Aug 12, 2025

    @thdxr
    Member

    yep on my list

  10. wkronmiller commented on Aug 30, 2025

    @wkronmiller

    As a temporary workaround, you can use mcp-remote, for example:

        "linear": {
          "type": "local",
          "command": ["npx", "-y", "mcp-remote", "https://mcp.linear.app/sse"]
        },
    
    

    Just run npx mcp-remote https://mcp.linear.app/sse directly from the CLI to log in, first.

  11. benjamine commented on Aug 30, 2025

    @benjamine
    Author

    As a temporary workaround, you can use mcp-remote, for example:

        "linear": {
          "type": "local",
          "command": ["npx", "-y", "mcp-remote", "https://mcp.linear.app/sse"]
        },
    
    

    Just run npx mcp-remote https://mcp.linear.app/sse directly from the CLI to log in, first.

    the feature request is not to have MCP remote (opencode already supports that well), it's to connect without creating api keys or copy-pasting secrets / putting a secret in a config file.

    reconnect also becomes much simpler, bonus point if supporting refresh tokens (although I haven't seen other coding CLIs support that)

    ps: bun recently launched secret storage, just suggesting maybe worth looking into for implementing this

  12. rekram1-node commented on Aug 30, 2025

    @rekram1-node
    Contributor

    @benjamine it isnt up to me but I do like the bun secret storage

  13. wkronmiller commented on Aug 30, 2025

    @wkronmiller

    As a temporary workaround, you can use mcp-remote, for example:

        "linear": {
          "type": "local",
          "command": ["npx", "-y", "mcp-remote", "https://mcp.linear.app/sse"]
        },
    

    Just run npx mcp-remote https://mcp.linear.app/sse directly from the CLI to log in, first.

    the feature request is not to have MCP remote (opencode already supports that well), it's to connect without creating api keys or copy-pasting secrets / putting a secret in a config file.

    reconnect also becomes much simpler, bonus point if supporting refresh tokens (although I haven't seen other coding CLIs support that)

    ps: bun recently launched secret storage, just suggesting maybe worth looking into for implementing this

    mcp-remote already supports oauth login (e.g. for Linear), and can therefore be used as a temporary work-around for the lack of secrets support in opencode

  14. benjamine commented on Aug 30, 2025

    @benjamine
    Author

    As a temporary workaround, you can use mcp-remote, for example:

        "linear": {
          "type": "local",
          "command": ["npx", "-y", "mcp-remote", "https://mcp.linear.app/sse"]
        },
    

    Just run npx mcp-remote https://mcp.linear.app/sse directly from the CLI to log in, first.

    the feature request is not to have MCP remote (opencode already supports that well), it's to connect without creating api keys or copy-pasting secrets / putting a secret in a config file.

    reconnect also becomes much simpler, bonus point if supporting refresh tokens (although I haven't seen other coding CLIs support that)

    ps: bun recently launched secret storage, just suggesting maybe worth looking into for implementing this

    mcp-remote already supports oauth login (e.g. for Linear), and can therefore be used as a temporary work-around for the lack of secrets support in opencode

    my bad sorry, didn't realize it supports oauth now, it stores secrets in a file in home dir it seems, but it makes sense as a workaround 👍 thanks

  15. clouatre commented on Sep 14, 2025

    @clouatre

    Enterprise OAuth Need Validated

    Our enterprise MCP testing confirms the critical need for native OAuth 2.1 support.

    Enterprise Use Case: Multi-tenant Atlassian deployments (Slalom, Plusgrade, PointsBU) requiring separate OAuth sessions per tenant.

    Current Limitation: Proxy solutions like mcp-remote share OAuth sessions via coordination lockfiles, preventing true instance isolation:

    Claude Code Reference: Native SSE + OAuth implementation handles this seamlessly:

    • Separate OAuth sessions per server instance
    • Built-in re-authentication flows
    • No coordination conflicts

    Impact: Without native OAuth support, OpenCode enterprise users face architectural limitations that prevent complex multi-tenant MCP workflows.

    This feature would eliminate dependency on third-party proxy solutions and enable enterprise-grade MCP deployments.

  16. 17 remaining items

  17. hanpham32 commented on Mar 4, 2026

    @hanpham32

    Still getting 403 when trying to authenticate to figma 😕.

    This works for me. At which step did you get the 403 code?

  18. hanpham32 commented on Mar 5, 2026

    @hanpham32

    Steps for connecting to Figma remote server:

    Install the repo below:

    git clone -b mcp-auth-workaround https://github.com/connorads/opencode.git opencode-mcp-auth
    cd opencode-mcp-auth
    bun install
    

    Add this to your ~/.config/opencode/opencode.json:

    {
      "mcp": {
        "figma": {
          "type": "remote",
          "url": "https://mcp.figma.com/mcp",
          "enabled": true
        }
      }
    }
    

    Go back to the repo you just cloned and run this:

    bun dev mcp auth your-mcp-server
    

    This will open your browser, go to Figma and authenticate your client. Should says something like OpenAI Codex is requesting to authenticate.

    In the terminal, it will say that auth is successful. You should be able to use Figma MCP in your client now.

  19. mosheduminer commented on Mar 5, 2026

    @mosheduminer

    @hanpham32 i wasn't referring to the workaround, I was referring to stock opencode.

  20. berenar commented on Mar 6, 2026

    @berenar
    Contributor

    Still failing

  21. pprotas commented on Mar 9, 2026

    @pprotas

    Shame on you Figma.... Here is a workaround without having to install a fork

    1. Register the client:
    curl -X POST https://api.figma.com/v1/oauth/mcp/register \
      -H "Content-Type: application/json" \
      -d '{
        "client_name": "Claude Code (figma)",
        "redirect_uris": ["http://127.0.0.1:19876/mcp/oauth/callback"],
        "grant_types": ["authorization_code", "refresh_token"],
        "response_types": ["code"],
        "token_endpoint_auth_method": "none"
      }'

    Adjust redirect_uris to match your MCP client's OAuth callback. The above is OpenCode's default.

    1. Configure the returned credentials in opencode.json:
    figma: {
      enabled: true,
      type: remote,
      url: https://mcp.figma.com/mcp,
      oauth: {
        clientId: <client_id from response>,
        clientSecret: <client_secret from response>
      }
    }
    1. Remove the figma entry from ~/.local/share/opencode/mcp-auth.json and then run opencode mcp auth figma and accept browser prompts
    Image

    Enjoy your freedom, and again: shame on you Figma!

  22. awantoch commented on Mar 10, 2026

    @awantoch

    @pprotas you're a legend

  23. ag-LD commented on Mar 12, 2026

    @ag-LD

    Seems obvious, but for those who are not familiar with figma API, use a PAT (Personnal Access Token) to generate client id / secret :

    curl -X POST https://api.figma.com/v1/oauth/mcp/register
    -H "Content-Type: application/json"
    -H "X-Figma-Token: $FIGMA_PERSONAL_ACCESS_TOKEN"
    -d '{
    "client_name": "Claude Code (figma)",
    "redirect_uris": ["http://127.0.0.1:19876/mcp/oauth/callback"],
    "grant_types": ["authorization_code", "refresh_token"],
    "response_types": ["code"],
    "token_endpoint_auth_method": "none"
    }'

    To get your PAT $FIGMA_PERSONAL_ACCESS_TOKEN see https://developers.figma.com/docs/rest-api/authentication/#use-the-personal-access-token

    TL;DR; Figma >Settings > Security > Personal access tokens, then Generate new token

    Note: if you are on a server or virtual machine with no access to 127.0.0.1, and no time / option to expose the temp auth server, just curl the last redirect:

    curl http://127.0.0.1:19876/mcp/oauth/callback?code=xxx&state=xxx

  24. timjb commented on Mar 29, 2026

    @timjb

    Here's a pure python script that takes a Figma personal access token and returns an access token that can be used in an HTTP header to authorize requests with the Figma MCP server:

    https://gist.github.com/timjb/c9b0ae4df23227647ea7944deb759ff1

    Setting the client id and secret in opencode.json and then doing the OAuth authentication using OpenCode didn't work for me because I'm running OpenCode in a sandbox.

  25. gberaudo commented on Mar 31, 2026

    @gberaudo

    Another almost no-dependency method, that creates a full mcp-auth.json file:
    https://github.com/gberaudo/opencode-mcp-figma

  26. added a commit that references this issue on Apr 7, 2026
    27d71c9
  27. rekram1-node commented on Jun 17, 2026

    @rekram1-node
    Contributor

    We have a figma client id finally so we can make this work out of the box, coming in an upcoming release

  28. abdevts commented on Jul 30, 2026

    @abdevts

    Any updates?

  29. Moimoto commented on Aug 12, 2026

    @Moimoto

    Seems like the guys at Figma are trying to get in contact with you to make Figma MCP work with OpenCode:
    https://forum.figma.com/suggest-a-feature-11/figma-s-approach-breaks-the-core-promise-of-mcp-52507?postid=209777#post209777

  30. CamJohnson26 commented on Sep 23, 2026

    @CamJohnson26

    We have a figma client id finally so we can make this work out of the box, coming in an upcoming release

    @rekram1-node Any update? Still broken as of September 23, version 1.18.32

  31. rekram1-node commented on Oct 14, 2026

    @rekram1-node
    Contributor

    We finally got figma to approve our client, it should work out of the box now, we also have an official figma plugin that works in opencode v2, see here:
    #3984 (comment)

    figma says their mcp server works best when paired with skills so they recommend using the plugin

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