list_mcp_integrations
Retrieve paginated MCP integrations for your organization. Filter by workspace to discover integration IDs for detailed queries.
Instructions
List MCP integrations in the organization. Returns paginated integration records plus total and has_more for discovering integration IDs; use get_mcp_integration for one integration's full Portkey-side config and list_mcp_servers for the servers under an integration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| current_page | No | Page number for pagination | |
| page_size | No | Number of results per page (max 100) | |
| workspace_id | No | Filter by workspace ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |
Implementation Reference
- The tool handler for 'list_mcp_integrations' that calls the service method and formats the response (total, has_more, integrations).
server.tool( "list_mcp_integrations", "List MCP integrations in the organization. Returns paginated integration records plus total and has_more for discovering integration IDs; use get_mcp_integration for one integration's full Portkey-side config and list_mcp_servers for the servers under an integration.", MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrations, async (params) => { const result = await service.mcpIntegrations.listMcpIntegrations(params); return { content: [ { type: "text", text: JSON.stringify( { total: result.total, has_more: result.has_more, integrations: result.data.map(formatMcpIntegration), }, null, 2, ), }, ], }; }, ); - Zod input schema for list_mcp_integrations: current_page, page_size, workspace_id.
listMcpIntegrations: { current_page: z.coerce .number() .positive() .optional() .describe("Page number for pagination"), page_size: z.coerce .number() .int() .positive() .max(100) .optional() .describe("Number of results per page (max 100)"), workspace_id: z.string().optional().describe("Filter by workspace ID"), }, - src/tools/mcp-integrations.tools.ts:217-244 (registration)Registration of 'list_mcp_integrations' via server.tool() inside registerMcpIntegrationsTools, also registered in TOOL_DOMAIN_REGISTRARS at src/tools/index.ts:47.
export function registerMcpIntegrationsTools( server: McpServer, service: PortkeyService, ): void { server.tool( "list_mcp_integrations", "List MCP integrations in the organization. Returns paginated integration records plus total and has_more for discovering integration IDs; use get_mcp_integration for one integration's full Portkey-side config and list_mcp_servers for the servers under an integration.", MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrations, async (params) => { const result = await service.mcpIntegrations.listMcpIntegrations(params); return { content: [ { type: "text", text: JSON.stringify( { total: result.total, has_more: result.has_more, integrations: result.data.map(formatMcpIntegration), }, null, 2, ), }, ], }; }, ); - Service method listMcpIntegrations that makes the HTTP GET request to /mcp-integrations with pagination params.
export class McpIntegrationsService extends BaseService { async listMcpIntegrations( params?: ListMcpIntegrationsParams, ): Promise<ListMcpIntegrationsResponse> { return this.get<ListMcpIntegrationsResponse>("/mcp-integrations", { current_page: params?.current_page, page_size: params?.page_size, workspace_id: params?.workspace_id, }); } - Type definitions for ListMcpIntegrationsResponse and ListMcpIntegrationsParams.
export interface ListMcpIntegrationsResponse { object: "list"; total: number; has_more: boolean; data: McpIntegration[]; } export interface ListMcpIntegrationsParams { current_page?: number; page_size?: number; workspace_id?: string; }