@@ -9,6 +9,7 @@ import { Agent } from './sdk/agent';
99import { Scorer } from './sdk/scorer' ;
1010import { NetworkPolicy } from './sdk/network-policy' ;
1111import { GatewayConfig } from './sdk/gateway-config' ;
12+ import { McpConfig } from './sdk/mcp-config' ;
1213import { Scenario } from './sdk/scenario' ;
1314
1415// Import types used in this file
@@ -24,6 +25,7 @@ import type { AgentCreateParams, AgentListParams } from './resources/agents';
2425import type { ScorerCreateParams , ScorerListParams } from './resources/scenarios/scorers' ;
2526import type { NetworkPolicyCreateParams , NetworkPolicyListParams } from './resources/network-policies' ;
2627import type { GatewayConfigCreateParams , GatewayConfigListParams } from './resources/gateway-configs' ;
28+ import type { McpConfigCreateParams , McpConfigListParams } from './resources/mcp-configs' ;
2729import type { ScenarioListParams } from './resources/scenarios/scenarios' ;
2830import { PollingOptions } from './lib/polling' ;
2931import * as Shared from './resources/shared' ;
@@ -200,6 +202,8 @@ type ContentType = ObjectCreateParams['content_type'];
200202 * - `agent` - {@link AgentOps}
201203 * - `scorer` - {@link ScorerOps}
202204 * - `networkPolicy` - {@link NetworkPolicyOps}
205+ * - `gatewayConfig` - {@link GatewayConfigOps}
206+ * - `mcpConfig` - {@link McpConfigOps}
203207 *
204208 * See the documentation for each Operations class for more details.
205209 *
@@ -295,6 +299,15 @@ export class RunloopSDK {
295299 */
296300 public readonly gatewayConfig : GatewayConfigOps ;
297301
302+ /**
303+ * **MCP Config Operations** - {@link McpConfigOps} for creating and accessing {@link McpConfig} class instances.
304+ *
305+ * MCP configs define how to connect to upstream MCP (Model Context Protocol) servers. They specify
306+ * the target endpoint and which tools are allowed. Use with devboxes to securely connect to
307+ * MCP servers.
308+ */
309+ public readonly mcpConfig : McpConfigOps ;
310+
298311 /**
299312 * **Scenario Operations** - {@link ScenarioOps} for accessing {@link Scenario} class instances.
300313 *
@@ -317,6 +330,7 @@ export class RunloopSDK {
317330 this . scorer = new ScorerOps ( this . api ) ;
318331 this . networkPolicy = new NetworkPolicyOps ( this . api ) ;
319332 this . gatewayConfig = new GatewayConfigOps ( this . api ) ;
333+ this . mcpConfig = new McpConfigOps ( this . api ) ;
320334 this . scenario = new ScenarioOps ( this . api ) ;
321335 }
322336}
@@ -1631,6 +1645,108 @@ export class GatewayConfigOps {
16311645 }
16321646}
16331647
1648+ /**
1649+ * MCP Config SDK interface for managing MCP configurations.
1650+ *
1651+ * @category MCP Config
1652+ *
1653+ * @remarks
1654+ * ## Overview
1655+ *
1656+ * The `McpConfigOps` class provides a high-level abstraction for managing MCP configurations,
1657+ * which define how to connect to upstream MCP (Model Context Protocol) servers. MCP configs
1658+ * specify the target endpoint and which tools are allowed.
1659+ *
1660+ * ## Usage
1661+ *
1662+ * This interface is accessed via {@link RunloopSDK.mcpConfig}. You should construct
1663+ * a {@link RunloopSDK} instance and use it from there:
1664+ *
1665+ * @example
1666+ * ```typescript
1667+ * const runloop = new RunloopSDK();
1668+ * const mcpConfig = await runloop.mcpConfig.create({
1669+ * name: 'my-mcp-server',
1670+ * endpoint: 'https://mcp.example.com',
1671+ * allowed_tools: ['*'],
1672+ * });
1673+ *
1674+ * const info = await mcpConfig.getInfo();
1675+ * console.log(`MCP Config: ${info.name}`);
1676+ * ```
1677+ */
1678+ export class McpConfigOps {
1679+ /**
1680+ * @private
1681+ */
1682+ constructor ( private client : RunloopAPI ) { }
1683+
1684+ /**
1685+ * Create a new MCP config.
1686+ *
1687+ * @example
1688+ * ```typescript
1689+ * const runloop = new RunloopSDK();
1690+ * const mcpConfig = await runloop.mcpConfig.create({
1691+ * name: 'my-mcp-server',
1692+ * endpoint: 'https://mcp.example.com',
1693+ * allowed_tools: ['*'],
1694+ * description: 'MCP server for my tools',
1695+ * });
1696+ * ```
1697+ *
1698+ * @param {McpConfigCreateParams } params - Parameters for creating the MCP config.
1699+ * @param {Core.RequestOptions } [options] - Request options.
1700+ * @returns {Promise<McpConfig> } A {@link McpConfig} instance.
1701+ */
1702+ async create ( params : McpConfigCreateParams , options ?: Core . RequestOptions ) : Promise < McpConfig > {
1703+ return McpConfig . create ( this . client , params , options ) ;
1704+ }
1705+
1706+ /**
1707+ * Get an MCP config object by its ID.
1708+ *
1709+ * @example
1710+ * ```typescript
1711+ * const runloop = new RunloopSDK();
1712+ * const mcpConfig = runloop.mcpConfig.fromId('mcp_1234567890');
1713+ * const info = await mcpConfig.getInfo();
1714+ * console.log(`MCP Config name: ${info.name}`);
1715+ * ```
1716+ *
1717+ * @param {string } id - The ID of the MCP config.
1718+ * @returns {McpConfig } A {@link McpConfig} instance.
1719+ */
1720+ fromId ( id : string ) : McpConfig {
1721+ return McpConfig . fromId ( this . client , id ) ;
1722+ }
1723+
1724+ /**
1725+ * List MCP configs with optional filters (paginated).
1726+ *
1727+ * @example
1728+ * ```typescript
1729+ * const runloop = new RunloopSDK();
1730+ * const configs = await runloop.mcpConfig.list({ limit: 10 });
1731+ * console.log(configs.map((c) => c.id));
1732+ * ```
1733+ *
1734+ * @param {McpConfigListParams } [params] - Optional filter parameters.
1735+ * @param {Core.RequestOptions } [options] - Request options.
1736+ * @returns {Promise<McpConfig[]> } An array of {@link McpConfig} instances.
1737+ */
1738+ async list ( params ?: McpConfigListParams , options ?: Core . RequestOptions ) : Promise < McpConfig [ ] > {
1739+ const result = await this . client . mcpConfigs . list ( params , options ) ;
1740+ const configs : McpConfig [ ] = [ ] ;
1741+
1742+ for await ( const config of result ) {
1743+ configs . push ( McpConfig . fromId ( this . client , config . id ) ) ;
1744+ }
1745+
1746+ return configs ;
1747+ }
1748+ }
1749+
16341750/**
16351751 * Scenario SDK interface for managing scenarios.
16361752 *
@@ -1754,6 +1870,7 @@ export declare namespace RunloopSDK {
17541870 ScorerOps as ScorerOps ,
17551871 NetworkPolicyOps as NetworkPolicyOps ,
17561872 GatewayConfigOps as GatewayConfigOps ,
1873+ McpConfigOps as McpConfigOps ,
17571874 ScenarioOps as ScenarioOps ,
17581875 Devbox as Devbox ,
17591876 Blueprint as Blueprint ,
@@ -1763,6 +1880,7 @@ export declare namespace RunloopSDK {
17631880 Scorer as Scorer ,
17641881 NetworkPolicy as NetworkPolicy ,
17651882 GatewayConfig as GatewayConfig ,
1883+ McpConfig as McpConfig ,
17661884 Scenario as Scenario ,
17671885 } ;
17681886}
@@ -1779,6 +1897,7 @@ export {
17791897 Agent ,
17801898 Scorer ,
17811899 NetworkPolicy ,
1900+ McpConfig ,
17821901 Execution ,
17831902 ExecutionResult ,
17841903 Scenario ,
0 commit comments