mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 12:16:20 +00:00
Sign in to MCP presets from the connect wizard
Notion, Linear, Atlassian, Sentry, Asana and Stripe no longer open the MCP server form. The wizard shows one "Sign in to Notion" button: the pop-up opens inside the click (so browsers allow it), follows the worker's mcp.oauth events to the provider, and the tool is saved on success with its actions on the done step. Reconnecting a preset uses the same flow, as do the chat bar and the health toast. Saving an OAuth MCP server without a new handshake now uses the stored sign-in instead of failing, and the custom MCP form keeps scopes and timeout under Show advanced.
This commit is contained in:
1 parent
f6c89503d8
commit
bfcc4a9773
18 files changed
+470
-57
No files matched your search
@@ -310,8 +310,14 @@ class MCPServerSave(Resource):
|
||||
mcp_config = config.copy()
|
||||
mcp_config["auth_credentials"] = auth_credentials
|
||||
|
||||
if auth_type == "oauth":
|
||||
if not config.get("oauth_task_id"):
|
||||
if auth_type == "oauth" and not config.get("oauth_task_id"):
|
||||
# No new handshake: the caller signed in to this server
|
||||
# before, so its stored tokens answer the discovery.
|
||||
try:
|
||||
mcp_tool = MCPTool(config=mcp_config, user_id=user)
|
||||
mcp_tool.discover_tools()
|
||||
actions_metadata = mcp_tool.get_actions_metadata()
|
||||
except Exception:
|
||||
return make_response(
|
||||
jsonify(
|
||||
{
|
||||
@@ -321,6 +327,7 @@ class MCPServerSave(Resource):
|
||||
),
|
||||
400,
|
||||
)
|
||||
elif auth_type == "oauth":
|
||||
redis_client = get_redis_instance()
|
||||
manager = MCPOAuthManager(redis_client)
|
||||
result = manager.get_oauth_status(
|
||||
|
||||
Reference in new issue
Block a user