curl --request POST \
--url 'https://api.orq.ai/v2/mcp-servers' \
--header 'Authorization: Bearer $ORQ_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"key": "github",
"display_name": "GitHub",
"description": "Repository and issue tools for the platform team.",
"connection": {
"type": "MCP_CONNECTION_TYPE_HTTP",
"url": "https://api.githubcopilot.com/mcp/"
},
"auth": {
"type": "MCP_AUTH_TYPE_STATIC_HEADERS",
"static_headers": [
{ "key": "Authorization", "value": "Bearer ghp_example_token" }
]
},
"default_tool_exposure": { "mode": "MCP_TOOL_EXPOSURE_MODE_ALL" }
}'
import { Orq } from '@orq-ai/node';
const client = new Orq({
apiKey: process.env.ORQ_API_KEY,
});
const result = await client.mcpServers.create({
key: 'github',
displayName: 'GitHub',
description: 'Repository and issue tools for the platform team.',
connection: {
type: 'MCP_CONNECTION_TYPE_HTTP',
url: 'https://api.githubcopilot.com/mcp/',
},
auth: {
type: 'MCP_AUTH_TYPE_STATIC_HEADERS',
staticHeaders: [
{ key: 'Authorization', value: 'Bearer ghp_example_token' },
],
},
defaultToolExposure: { mode: 'MCP_TOOL_EXPOSURE_MODE_ALL' },
});
// A new server has no tools until it is synced.
console.log(result.mcpServer.key);
import os
from orq_ai_sdk import Orq
client = Orq(api_key=os.environ["ORQ_API_KEY"])
result = client.mcp_servers.create(
key="github",
display_name="GitHub",
description="Repository and issue tools for the platform team.",
connection={
"type": "MCP_CONNECTION_TYPE_HTTP",
"url": "https://api.githubcopilot.com/mcp/",
},
auth={
"type": "MCP_AUTH_TYPE_STATIC_HEADERS",
"static_headers": [
{"key": "Authorization", "value": "Bearer ghp_example_token"},
],
},
default_tool_exposure={"mode": "MCP_TOOL_EXPOSURE_MODE_ALL"},
)
# A new server has no tools until it is synced.
print(result.mcp_server.key)
{
"mcp_server": {
"id": "<string>",
"key": "<string>",
"display_name": "<string>",
"description": "<string>",
"connection": {
"type": "MCP_CONNECTION_TYPE_UNSPECIFIED",
"url": "<string>"
},
"auth": {
"type": "MCP_AUTH_TYPE_UNSPECIFIED",
"static_headers": [
{
"key": "<string>",
"masked_value": "<string>"
}
],
"oauth": {
"client_id": "<string>",
"token_url": "<string>",
"scopes": [
"<string>"
],
"masked_value": "<string>"
}
},
"default_tool_exposure": {
"mode": "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED",
"read_only": true,
"tool_ids": [
"<string>"
]
},
"sync_state": {
"status": "SYNC_STATUS_UNSPECIFIED",
"tools_total": 123,
"tools_added": 123,
"tools_removed": 123,
"last_synced_at": "<string>",
"errors": [
"<string>"
]
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"input_schema": {},
"status": "<string>",
"id": "<string>",
"title": "<string>",
"annotations": {
"read_only": true,
"destructive": true,
"idempotent": true,
"open_world": true
}
}
],
"created": "<string>",
"updated": "<string>",
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
},
"template_variables": [
"<string>"
],
"created_by_id": "<string>"
}
}Create an MCP server
Creates a new upstream MCP server connection in the workspace.
curl --request POST \
--url 'https://api.orq.ai/v2/mcp-servers' \
--header 'Authorization: Bearer $ORQ_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"key": "github",
"display_name": "GitHub",
"description": "Repository and issue tools for the platform team.",
"connection": {
"type": "MCP_CONNECTION_TYPE_HTTP",
"url": "https://api.githubcopilot.com/mcp/"
},
"auth": {
"type": "MCP_AUTH_TYPE_STATIC_HEADERS",
"static_headers": [
{ "key": "Authorization", "value": "Bearer ghp_example_token" }
]
},
"default_tool_exposure": { "mode": "MCP_TOOL_EXPOSURE_MODE_ALL" }
}'
import { Orq } from '@orq-ai/node';
const client = new Orq({
apiKey: process.env.ORQ_API_KEY,
});
const result = await client.mcpServers.create({
key: 'github',
displayName: 'GitHub',
description: 'Repository and issue tools for the platform team.',
connection: {
type: 'MCP_CONNECTION_TYPE_HTTP',
url: 'https://api.githubcopilot.com/mcp/',
},
auth: {
type: 'MCP_AUTH_TYPE_STATIC_HEADERS',
staticHeaders: [
{ key: 'Authorization', value: 'Bearer ghp_example_token' },
],
},
defaultToolExposure: { mode: 'MCP_TOOL_EXPOSURE_MODE_ALL' },
});
// A new server has no tools until it is synced.
console.log(result.mcpServer.key);
import os
from orq_ai_sdk import Orq
client = Orq(api_key=os.environ["ORQ_API_KEY"])
result = client.mcp_servers.create(
key="github",
display_name="GitHub",
description="Repository and issue tools for the platform team.",
connection={
"type": "MCP_CONNECTION_TYPE_HTTP",
"url": "https://api.githubcopilot.com/mcp/",
},
auth={
"type": "MCP_AUTH_TYPE_STATIC_HEADERS",
"static_headers": [
{"key": "Authorization", "value": "Bearer ghp_example_token"},
],
},
default_tool_exposure={"mode": "MCP_TOOL_EXPOSURE_MODE_ALL"},
)
# A new server has no tools until it is synced.
print(result.mcp_server.key)
{
"mcp_server": {
"id": "<string>",
"key": "<string>",
"display_name": "<string>",
"description": "<string>",
"connection": {
"type": "MCP_CONNECTION_TYPE_UNSPECIFIED",
"url": "<string>"
},
"auth": {
"type": "MCP_AUTH_TYPE_UNSPECIFIED",
"static_headers": [
{
"key": "<string>",
"masked_value": "<string>"
}
],
"oauth": {
"client_id": "<string>",
"token_url": "<string>",
"scopes": [
"<string>"
],
"masked_value": "<string>"
}
},
"default_tool_exposure": {
"mode": "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED",
"read_only": true,
"tool_ids": [
"<string>"
]
},
"sync_state": {
"status": "SYNC_STATUS_UNSPECIFIED",
"tools_total": 123,
"tools_added": 123,
"tools_removed": 123,
"last_synced_at": "<string>",
"errors": [
"<string>"
]
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"input_schema": {},
"status": "<string>",
"id": "<string>",
"title": "<string>",
"annotations": {
"read_only": true,
"destructive": true,
"idempotent": true,
"open_world": true
}
}
],
"created": "<string>",
"updated": "<string>",
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
},
"template_variables": [
"<string>"
],
"created_by_id": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Lowercase slug of letters, digits, hyphens and underscores, max 64 characters, unique per workspace; prefixes this server's tool names in gateways.
Human readable name shown in the workspace.
How the gateway dials the upstream server.
Show child attributes
Show child attributes
Credentials the gateway sends upstream; send type: NONE explicitly for public servers.
Show child attributes
Show child attributes
Fallback exposure used by any gateway link that does not set its own.
Show child attributes
Show child attributes
Free-form note about what this server is for.
Which projects in the workspace may use this server. Defaults to every project.
Show child attributes
Show child attributes
Response
OK
Show child attributes
Show child attributes
Was this page helpful?