Skip to content

During authorization code flow, allow to add parameter "state" to "/authorize?..." request #99

@aschrei-tricentis

Description

@aschrei-tricentis

This package works great for a remote MCP server via streamable HTTP. I use it in Cursor AI via npx. However, currently, I have to use a workaround to make the authentication work. The reason is that this MCP server uses okta as identity provider and okta requires that the state parameter is included in every call to the "authorize" endpoint. It seems that this cannot be configured differently on okta side: https://devforum.okta.com/t/setting-for-requiring-state-parameter-in-request/25063

The workaround is to run a command "npx mcp-remote ..." before enabling the MCP server in cursor. Then I copy the "/authorize?.." url from the console output of "mcp-remote" and append "&state=someRandomValue". Then the login works and mcp-remote caches the access and refresh token. Then the MCP server can be enabled in cursor AI via "npx mcp-remote ..." and works perfectly fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions