Returns a paginated list of MCP servers in the workspace.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_servers.list()
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
limit |
Optional[int] |
➖ |
Page size between 1 and 200. Defaults to 25. |
starting_after |
Optional[str] |
➖ |
Cursor for the page after the given item id. Mutually exclusive with ending_before. |
ending_before |
Optional[str] |
➖ |
Cursor for the page before the given item id. Mutually exclusive with starting_after. |
search |
Optional[str] |
➖ |
Case-insensitive match against the server key and display name. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListMcpServersResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Creates a new upstream MCP server connection in the workspace.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_servers.create(key="<key>", display_name="Felton.Daugherty-Reynolds", connection={
"type": "MCP_CONNECTION_TYPE_HTTP",
"url": "https://thin-event.net/",
}, auth={
"type": "MCP_AUTH_TYPE_OAUTH_CLIENT_CREDENTIALS",
"static_headers": [
{
"key": "Authorization",
"value": "ghp_xxxxxxxxxxxx",
},
],
}, default_tool_exposure={
"mode": "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED",
})
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
Example |
key |
str |
✔️ |
Lowercase slug of letters, digits, hyphens and underscores, max 64 characters, unique per workspace; prefixes this server's tool names in gateways. |
|
display_name |
str |
✔️ |
Human readable name shown in the workspace. |
GitHub |
connection |
models.McpConnection |
✔️ |
How the gateway dials the upstream server. |
|
auth |
models.McpAuthConfig |
✔️ |
Credentials the gateway sends upstream; send type: NONE explicitly for public servers. |
|
default_tool_exposure |
models.McpToolExposure |
✔️ |
Fallback exposure used by any gateway link that does not set its own. |
|
description |
Optional[str] |
➖ |
Free-form note about what this server is for. |
|
sharing |
Optional[models.Sharing] |
➖ |
Which projects in the workspace may use this server. Defaults to every project. |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.CreateMcpServerResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Retrieves the details of an existing MCP server by its unique ID.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_servers.retrieve(id="<id>")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
id |
str |
✔️ |
Unique identifier of the MCP server. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.GetMcpServerResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Deletes an MCP server from the workspace. The response body is empty when the delete succeeds.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_servers.delete(id="<id>")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
id |
str |
✔️ |
Unique identifier of the MCP server. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.DeleteMcpServerResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Updates mutable fields of an existing MCP server. Omitted optional fields keep their current values.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_servers.update(id="<id>", connection={
"type": "MCP_CONNECTION_TYPE_HTTP",
"url": "https://api.githubcopilot.com/mcp/",
}, auth={
"type": "MCP_AUTH_TYPE_PER_USER_OAUTH",
"static_headers": [
{
"key": "Authorization",
"value": "ghp_xxxxxxxxxxxx",
},
],
}, default_tool_exposure={
"mode": "MCP_TOOL_EXPOSURE_MODE_ALL",
})
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
id |
str |
✔️ |
Unique identifier of the MCP server. |
key |
Optional[str] |
➖ |
Rejected with INVALID_ARGUMENT: the key prefixes this server's tools in every gateway that exposes it, so it is immutable after creation. Retained so callers get an error rather than a silently ignored field. |
display_name |
Optional[str] |
➖ |
Human readable name shown in the workspace. |
description |
Optional[str] |
➖ |
Free-form note about what this server is for. |
connection |
Optional[models.McpConnection] |
➖ |
How the gateway dials the upstream server. |
auth |
Optional[models.McpAuthConfig] |
➖ |
Credentials the gateway sends upstream; send type: NONE explicitly for public servers. |
default_tool_exposure |
Optional[models.McpToolExposure] |
➖ |
Fallback exposure used by any gateway link that does not set its own. |
sharing |
Optional[models.Sharing] |
➖ |
Which projects in the workspace may use this server. Defaults to every project. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.UpdateMcpServerResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Executes a single tool on an upstream MCP server for testing. Connects to the server, invokes the tool with the provided arguments, and returns the result.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_servers.test_tool(id="<id>", tool_name="<value>")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
id |
str |
✔️ |
Unique identifier of the MCP server. |
tool_name |
str |
✔️ |
Bare upstream tool name, not a gateway's namespaced exposed_name. |
arguments |
Optional[models.Arguments] |
➖ |
Arguments passed to the tool, matching its input_schema. |
discovery_variables |
Dict[str, str] |
➖ |
Values for the server's template_variables; treated as sensitive and not persisted. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.TestMcpServerToolResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Connects to an upstream MCP server, discovers tools, and persists the tool list and sync state on the server record.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_servers.sync(id="<id>")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
id |
str |
✔️ |
Unique identifier of the MCP server. |
discovery_variables |
Dict[str, str] |
➖ |
Values for the server's template_variables; treated as sensitive and not persisted. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.SyncMcpServerResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |