Skip to content

MCP agent instances should import remote MCP tools as first-class callable tools #261

Description

@serge-ivo

Problem

Today an MCP-client agent only exposes two generic PAGS tools:

  • mcp_list_tools
  • mcp_call_tool

The language model must discover remote tool names, remember them, and call mcp_call_tool with a string tool name and arbitrary args. That is much weaker than exposing each remote MCP tool as an actual callable tool with its own description and input schema.

Why this matters

MCP value comes from tool schemas. If PAGS collapses every remote server into one generic stringly-typed call, the agent becomes less reliable and harder to inspect. Users also cannot clearly see what app actions were imported from Figma/ProAgentStore/etc.

Expected behavior

When a user connects an MCP endpoint to an instance, PAGS should call tools/list, cache the remote catalog, and expose selected remote tools as first-class tools for that instance.

Possible shape:

  • mcp:<connection_id>:<tool_name> or similar internal synthetic tool id
  • display name from the remote MCP server
  • description/input schema from tools/list
  • calls dispatch through the same outbound MCP client and auth/consent path

Acceptance criteria

  • Connected MCP endpoint has a visible tool catalog in instance settings.
  • User can enable/disable individual remote tools.
  • Agent chat sees enabled remote tools as structured function tools, not only as a generic mcp_call_tool.
  • Remote tool schemas are cached with a refresh action and sensible TTL/invalidation.
  • Tool name collisions across endpoints are handled safely.
  • Existing generic mcp_call_tool can remain as an escape hatch, but should not be the primary UX for configured MCP connections.

Related

Code pointers

  • workers/api/src/lib/connectors/mcp.ts
  • workers/api/src/agent-think.ts
  • workers/api/src/agent-do-tools.ts
  • store/console/src/tabs/SettingsTab.tsx

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