Class: AIGatewayMcpServersClient
Defined in: src/ai-gateway/mcp-servers-client.ts:54
Workspace-scoped mcpServers operations on the SCM data plane.
Example
`const client = new AIGatewayClient().mcpServers;`
Constructors
Constructor
new AIGatewayMcpServersClient(options): AIGatewayMcpServersClient;
Defined in: src/ai-gateway/mcp-servers-client.ts:55
Parameters
| Parameter | Type |
|---|---|
options | AIGatewaySubClientOptions |
Returns
AIGatewayMcpServersClient
Methods
list()
list(opts?): Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
id?: string;
organisation_id?: string;
name?: string;
description?: string | null;
status?: string;
created_at?: string;
owner_id?: string;
slug?: string;
workspace_id?: string | null;
mcp_integration_id?: string;
mcp_integration_slug?: string | null;
mcp_integration_url?: string | null;
auth_type?: string;
workspace_name?: string | null;
workspace_slug?: string | null;
url?: string;
}[];
total?: number;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:61
List MCP Servers. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
opts | { workspace_id?: string; current_page?: number; page_size?: number; id?: string; search?: string; } |
opts.workspace_id? | string |
opts.current_page? | number |
opts.page_size? | number |
opts.id? | string |
opts.search? | string |
Returns
Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
id?: string;
organisation_id?: string;
name?: string;
description?: string | null;
status?: string;
created_at?: string;
owner_id?: string;
slug?: string;
workspace_id?: string | null;
mcp_integration_id?: string;
mcp_integration_slug?: string | null;
mcp_integration_url?: string | null;
auth_type?: string;
workspace_name?: string | null;
workspace_slug?: string | null;
url?: string;
}[];
total?: number;
}>
Example
`await gw.mcpServers.list({});`
create()
create(body): Promise<{
[key: string]: unknown;
id?: string;
slug?: string;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:80
Create MCP Server. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
body | { workspace_id?: string; name: string; description?: string | null; mcp_integration_id: string; slug?: string; } |
body.workspace_id? | string |
body.name | string |
body.description? | string | null |
body.mcp_integration_id | string |
body.slug? | string |
Returns
Promise<{
[key: string]: unknown;
id?: string;
slug?: string;
}>
Example
`await gw.mcpServers.create(body);`
get()
get(mcpServerId): Promise<{
[key: string]: unknown;
id?: string;
slug?: string;
name?: string;
status?: string;
description?: string | null;
created_at?: string;
mcp_integration_id?: string;
mcp_integration_details?: | {
[key: string]: unknown;
id?: string;
slug?: string;
status?: string;
configurations?: | {
[key: string]: unknown;
}
| null;
url?: string;
transport?: string;
auth_type?: string;
}
| null;
workspace_id?: string | null;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:100
Get MCP Server. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
Returns
Promise<{
[key: string]: unknown;
id?: string;
slug?: string;
name?: string;
status?: string;
description?: string | null;
created_at?: string;
mcp_integration_id?: string;
mcp_integration_details?: | {
[key: string]: unknown;
id?: string;
slug?: string;
status?: string;
configurations?: | {
[key: string]: unknown;
}
| null;
url?: string;
transport?: string;
auth_type?: string;
}
| null;
workspace_id?: string | null;
}>
Example
`await gw.mcpServers.get('resource-id');`
update()
update(mcpServerId, body): Promise<{
[key: string]: unknown;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:117
Update MCP Server. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
body | { name?: string; description?: string | null; } |
body.name? | string |
body.description? | string | null |
Returns
Promise<{
[key: string]: unknown;
}>
Example
`await gw.mcpServers.update('resource-id', body);`
delete()
delete(mcpServerId): Promise<{
[key: string]: unknown;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:139
Delete MCP Server. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
Returns
Promise<{
[key: string]: unknown;
}>
Example
`await gw.mcpServers.delete('resource-id');`
test()
test(mcpServerId): Promise<{
[key: string]: unknown;
success?: boolean;
status_code?: number | null;
response_time_ms?: number | null;
url?: string | null;
server_name?: string;
error?: string | null;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:156
Experimental
Test MCP Server Connection. SCM returned HTTP 403 on an owned server; authorization remains unverified.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
Returns
Promise<{
[key: string]: unknown;
success?: boolean;
status_code?: number | null;
response_time_ms?: number | null;
url?: string | null;
server_name?: string;
error?: string | null;
}>
Example
`await gw.mcpServers.test('resource-id');`
getCapabilities()
getCapabilities(mcpServerId, opts?): Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
name?: string;
type?: string;
title?: string | null;
description?: string | null;
icons?: unknown[] | null;
enabled?: boolean;
integration_enabled?: boolean | null;
input_schema?: | {
[key: string]: unknown;
}
| null;
output_schema?: | {
[key: string]: unknown;
}
| null;
execution?: | {
[key: string]: unknown;
}
| null;
annotations?: | {
[key: string]: unknown;
}
| null;
arguments?: unknown[] | null;
uri?: string | null;
uri_template?: string | null;
mime_type?: string | null;
size?: number | null;
}[];
counts?: {
[key: string]: unknown;
tools?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
prompts?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
resources?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
resource_templates?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
};
total?: number;
has_more?: boolean;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:173
List MCP Server Capabilities. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
opts | { page?: number; page_size?: number; type?: string; } |
opts.page? | number |
opts.page_size? | number |
opts.type? | string |
Returns
Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
name?: string;
type?: string;
title?: string | null;
description?: string | null;
icons?: unknown[] | null;
enabled?: boolean;
integration_enabled?: boolean | null;
input_schema?: | {
[key: string]: unknown;
}
| null;
output_schema?: | {
[key: string]: unknown;
}
| null;
execution?: | {
[key: string]: unknown;
}
| null;
annotations?: | {
[key: string]: unknown;
}
| null;
arguments?: unknown[] | null;
uri?: string | null;
uri_template?: string | null;
mime_type?: string | null;
size?: number | null;
}[];
counts?: {
[key: string]: unknown;
tools?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
prompts?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
resources?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
resource_templates?: {
[key: string]: unknown;
total?: number;
enabled?: number;
};
};
total?: number;
has_more?: boolean;
}>
Example
`await gw.mcpServers.getCapabilities('resource-id', {});`
updateCapabilities()
updateCapabilities(mcpServerId, body): Promise<{
[key: string]: unknown;
success?: boolean;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:196
Experimental
Bulk Update MCP Server Capabilities. Owned tool/prompt updates and eventual runtime visibility were verified on 2026-09-07. Deployed resource discovery omits required names; resource templates do not synchronize into SCM. Resource variants and authenticated upstreams remain unverified.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
body | { capabilities: { name: string; type: string; enabled: boolean; }[]; } |
body.capabilities | { name: string; type: string; enabled: boolean; }[] |
Returns
Promise<{
[key: string]: unknown;
success?: boolean;
}>
Example
`await gw.mcpServers.updateCapabilities('resource-id', body);`
getUserAccess()
getUserAccess(mcpServerId, opts?): Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
user_id?: string;
first_name?: string | null;
last_name?: string | null;
enabled?: boolean;
has_override?: boolean;
connection_status?: string;
}[];
default_user_access?: string;
total?: number;
has_more?: boolean;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:218
List MCP Server User Access. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
opts | { page?: number; page_size?: number; search?: string; } |
opts.page? | number |
opts.page_size? | number |
opts.search? | string |
Returns
Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
user_id?: string;
first_name?: string | null;
last_name?: string | null;
enabled?: boolean;
has_override?: boolean;
connection_status?: string;
}[];
default_user_access?: string;
total?: number;
has_more?: boolean;
}>
Example
`await gw.mcpServers.getUserAccess('resource-id', {});`
updateUserAccess()
updateUserAccess(mcpServerId, body): Promise<{
[key: string]: unknown;
success?: boolean;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:239
Bulk Update MCP Server User Access. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
body | { user_access?: { user_id: string; enabled: boolean; }[]; default_user_access?: string; } |
body.user_access? | { user_id: string; enabled: boolean; }[] |
body.default_user_access? | string |
Returns
Promise<{
[key: string]: unknown;
success?: boolean;
}>
Example
`await gw.mcpServers.updateUserAccess('resource-id', body);`
getConnections()
getConnections(mcpServerId, opts?): Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
user_id?: string;
connected?: boolean;
created_at?: string;
last_updated_at?: string;
}[];
total?: number;
has_more?: boolean;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:261
List MCP Server Connections. Verified on an isolated SCM fixture, 2026-09-06.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
opts | { user_id?: string; workspace_id?: string; current_page?: number; page_size?: number; } |
opts.user_id? | string |
opts.workspace_id? | string |
opts.current_page? | number |
opts.page_size? | number |
Returns
Promise<{
[key: string]: unknown;
data?: {
[key: string]: unknown;
user_id?: string;
connected?: boolean;
created_at?: string;
last_updated_at?: string;
}[];
total?: number;
has_more?: boolean;
}>
Example
`await gw.mcpServers.getConnections('resource-id', {});`
deleteConnections()
deleteConnections(mcpServerId, opts?): Promise<{
[key: string]: unknown;
success?: boolean;
}>;
Defined in: src/ai-gateway/mcp-servers-client.ts:282
Experimental
Delete MCP Server Connection. SCM returned HTTP 403 on an owned server; authorization remains unverified.
Parameters
| Parameter | Type |
|---|---|
mcpServerId | string |
opts | { user_id?: string; workspace_id?: string; } |
opts.user_id? | string |
opts.workspace_id? | string |
Returns
Promise<{
[key: string]: unknown;
success?: boolean;
}>
Example
`await gw.mcpServers.deleteConnections('resource-id', {});`