Repository navigation
feat(mcp): add OAuth2 authorization for the MCP server - #1580
Merged
Merged
Conversation
realcodesiman
force-pushed
the
realcodesiman/mcp-support-oauth2
branch
from
October 29, 2026 07:34
24bb832 to
cc5e773
Compare
Add an OAuth provider (applications, consents, access tokens) so MCP clients can authorize via the standard authorization-code flow instead of pasting a workspace API token. The MCP server introspects OAuth access tokens alongside existing workspace tokens.
realcodesiman
force-pushed
the
realcodesiman/mcp-support-oauth2
branch
from
October 29, 2026 08:28
4543916 to
7680868
Compare
hello-jackytruong
referenced
this pull request
in hello-jackytruong/ChatWorkAI
Nov 22, 2026
* feat(mcp): add OAuth2 authorization for the MCP server Add an OAuth provider (applications, consents, access tokens) so MCP clients can authorize via the standard authorization-code flow instead of pasting a workspace API token. The MCP server introspects OAuth access tokens alongside existing workspace tokens. * fix(mcp): harden OAuth2 authorization * fix(mcp): use structured token introspection logging * fix(mcp): resolve rebase conflicts * fix(database): index oauth provider foreign keys * fix(worker): remove duplicate scheduler import * fix(mcp): update OAuth test mocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
packages/database: newOauthApplication,OauthConsent,OauthAccessTokenschema, relations, repositories, and migration20260922102520_add_oauth_provider_tables(migration not applied; needs review).packages/business: newmcp-oauthservice with tests.packages/auth: OAuth provider wiring in the auth server.apps/builder:/.well-known/*discovery routes,/oauth/authorize,/oauth/sign-in, consent page and action, public-route and rate-limit updates, workspace-token auth middleware support, and i18n keys for all locales.apps/mcp-server: OAuth token introspection and server wiring, env example, README.docs/mcp-oauth.mdand workspace API token docs.Test plan
pnpm --filter @chatbotx.io/database db:migrate