Skip to content

Outbound MCP connector needs OAuth/browser sign-in for authenticated MCP servers #258

Description

@serge-ivo

Context

We created a PAGS agent template called MCP client that exposes the generic outbound MCP tools:

  • mcp_list_tools
  • mcp_call_tool

This works for public/no-auth MCP servers. For example, an instance configured with:

  • mcp_url: https://mcp.freeagentstore.online/mcp
  • auth_mode: none

successfully listed FreeAgentStore MCP tools.

However, authenticated MCP servers cannot currently be connected cleanly from PAGS. A second instance configured for:

  • mcp_url: https://mcp.proagentstore.online/mcp
  • auth_mode: bearer

failed because PAGS had no stored mcp credential. Trying without bearer auth failed as unauthenticated/unparseable. This means an agent can be configured with a URL, but cannot perform the required sign-in/authorization flow for authenticated MCPs.

Problem

The generic outbound MCP connector currently appears to support only:

  • auth: none for public Streamable HTTP MCP endpoints
  • bearer auth via an already-stored PAGS vault/API key credential for provider mcp

There is no first-class OAuth/browser authorization flow from an agent instance settings page, chat flow, or connector UI. As a result, users cannot point an MCP client agent at authenticated MCP apps such as ProAgentStore, Figma, or other OAuth-protected MCP servers and authorize access naturally.

Codex-style MCP login can open a browser and complete OAuth, but PAGS outbound MCP does not currently provide the equivalent flow for agent instances.

Expected behavior

PAGS should support a connect flow for authenticated outbound MCP servers:

  1. User enters an MCP server URL in agent/instance settings.
  2. PAGS discovers or initiates the MCP auth flow for that endpoint.
  3. UI opens the browser/provider authorization page when required.
  4. OAuth/session credentials are stored securely for the user and MCP endpoint, ideally scoped to the instance/server rather than one global mcp bearer token.
  5. mcp_list_tools and mcp_call_tool use the stored credential automatically.
  6. Existing write-consent gates still apply before mutating calls through mcp_call_tool.
  7. Settings/connections UI shows auth state and allows reconnect/disconnect.

Acceptance criteria

  • Given an MCP-client instance with an OAuth-protected mcp_url, clicking Connect opens the correct browser authorization flow and returns to PAGS.
  • User does not need to manually paste a bearer token for normal OAuth MCP servers.
  • Stored credentials are bound to the current user and MCP endpoint, and preferably to the instance as well.
  • mcp_list_tools succeeds against https://mcp.proagentstore.online/mcp after authorization.
  • mcp_call_tool can call a read-only ProAgentStore MCP tool after authorization.
  • Mutating calls through mcp_call_tool continue to require connector write consent.
  • Expired, missing, or unsupported-auth states produce clear user-facing errors and a reconnect path.

Repro from current testing

  • Agent template: MCP client (mcp-client)
  • Agent id: 2c2f6747-1e67-4a73-9250-e99535466569
  • FAS instance: dfc1cf92-8721-46e9-a357-08af8629635c
    • mcp_list_tools with auth: none succeeded for https://mcp.freeagentstore.online/mcp
  • ProAgentStore instance: a9ee6079-d00f-4014-9c4c-9c03618c056d
    • bearer/default auth failed because no mcp credential was stored
    • no-auth did not successfully connect

Without this, the configurable MCP-client agent is only useful for public MCP endpoints or manually pre-provisioned bearer tokens, which breaks the expected “give it a URL and connect to an app” workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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