Core - Create MCP server
curl --request POST \
--url 'https://my.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_HTTP",
"url": "<string>"
},
"auth": {
"type": "MCP_AUTH_TYPE_NONE",
"static_headers": [
{
"key": "<string>",
"masked_value": "<string>"
}
],
"oauth": {
"client_id": "<string>",
"token_url": "<string>",
"scopes": [
"<string>"
],
"masked_value": "<string>",
"issuer": "<string>",
"resource": "<string>"
},
"enterprise": {
"resource": "<string>",
"client_id": "<string>",
"masked_value": "<string>",
"scopes": [
"<string>"
]
}
},
"default_tool_exposure": {
"mode": "MCP_TOOL_EXPOSURE_MODE_ALL",
"read_only": true,
"tool_ids": [
"<string>"
],
"excluded_tool_ids": [
"<string>"
]
},
"sync_state": {
"status": "SYNC_STATUS_SYNCED",
"tools_total": 123,
"tools_added": 123,
"tools_removed": 123,
"last_synced_at": "<string>",
"errors": [
"<string>"
],
"skills_total": 123
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"input_schema": {},
"status": "<string>",
"id": "<string>",
"title": "<string>",
"annotations": {
"read_only": true,
"destructive": true,
"idempotent": true,
"open_world": true,
"title": "<string>"
},
"http_operation": {
"method": "<string>",
"path": "<string>"
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"output_schema": {},
"meta": {}
}
],
"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>",
"skills": [
{
"uri": "<string>",
"name": "<string>",
"description": "<string>",
"frontmatter": {},
"files": [
{
"uri": "<string>",
"digest": "<string>",
"size": "<string>"
}
],
"dynamic": true
}
],
"openapi": {
"document_url": "<string>",
"operations": [
"<string>"
],
"title": "<string>",
"version": "<string>"
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"website_url": "<string>",
"capabilities": {
"tools": true,
"resources": true,
"prompts": true,
"completions": true
},
"resource_catalog": {
"resources": [
{
"uri": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"mime_type": "<string>",
"size": "<string>",
"annotations": {
"audience": [
"<string>"
],
"last_modified": "<string>",
"priority": 123
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"meta": {},
"selection_id": "<string>"
}
],
"resource_templates": [
{
"uri_template": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"mime_type": "<string>",
"annotations": {
"audience": [
"<string>"
],
"last_modified": "<string>",
"priority": 123
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"meta": {},
"selection_id": "<string>"
}
],
"resources_status": "MCP_DISCOVERY_STATUS_SYNCED",
"resource_templates_status": "MCP_DISCOVERY_STATUS_SYNCED"
},
"prompt_catalog": {
"prompts": [
{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"arguments": [
{
"name": "<string>",
"description": "<string>",
"required": true
}
],
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"meta": {},
"selection_id": "<string>"
}
],
"status": "MCP_DISCOVERY_STATUS_SYNCED"
},
"health": {
"status": "MCP_HEALTH_STATUS_HEALTHY",
"coverage": "MCP_HEALTH_COVERAGE_FULL",
"last_checked_at": "<string>",
"last_healthy_at": "<string>",
"latency_ms": 123,
"consecutive_failures": 123,
"error_message": "<string>",
"recent_checks": [
{
"checked_at": "<string>",
"ok": true,
"latency_ms": 123
}
]
},
"health_check": {
"enabled": true,
"interval": "<string>",
"min_interval": "<string>",
"default_interval": "<string>",
"notifier_ids": [
"<string>"
],
"recovery_period": "<string>"
}
}
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}MCP Servers
Create an MCP server
Creates a new upstream MCP server connection in the workspace.
POST
/
v2
/
mcp-servers
Core - Create MCP server
curl --request POST \
--url 'https://my.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_HTTP",
"url": "<string>"
},
"auth": {
"type": "MCP_AUTH_TYPE_NONE",
"static_headers": [
{
"key": "<string>",
"masked_value": "<string>"
}
],
"oauth": {
"client_id": "<string>",
"token_url": "<string>",
"scopes": [
"<string>"
],
"masked_value": "<string>",
"issuer": "<string>",
"resource": "<string>"
},
"enterprise": {
"resource": "<string>",
"client_id": "<string>",
"masked_value": "<string>",
"scopes": [
"<string>"
]
}
},
"default_tool_exposure": {
"mode": "MCP_TOOL_EXPOSURE_MODE_ALL",
"read_only": true,
"tool_ids": [
"<string>"
],
"excluded_tool_ids": [
"<string>"
]
},
"sync_state": {
"status": "SYNC_STATUS_SYNCED",
"tools_total": 123,
"tools_added": 123,
"tools_removed": 123,
"last_synced_at": "<string>",
"errors": [
"<string>"
],
"skills_total": 123
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"input_schema": {},
"status": "<string>",
"id": "<string>",
"title": "<string>",
"annotations": {
"read_only": true,
"destructive": true,
"idempotent": true,
"open_world": true,
"title": "<string>"
},
"http_operation": {
"method": "<string>",
"path": "<string>"
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"output_schema": {},
"meta": {}
}
],
"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>",
"skills": [
{
"uri": "<string>",
"name": "<string>",
"description": "<string>",
"frontmatter": {},
"files": [
{
"uri": "<string>",
"digest": "<string>",
"size": "<string>"
}
],
"dynamic": true
}
],
"openapi": {
"document_url": "<string>",
"operations": [
"<string>"
],
"title": "<string>",
"version": "<string>"
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"website_url": "<string>",
"capabilities": {
"tools": true,
"resources": true,
"prompts": true,
"completions": true
},
"resource_catalog": {
"resources": [
{
"uri": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"mime_type": "<string>",
"size": "<string>",
"annotations": {
"audience": [
"<string>"
],
"last_modified": "<string>",
"priority": 123
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"meta": {},
"selection_id": "<string>"
}
],
"resource_templates": [
{
"uri_template": "<string>",
"name": "<string>",
"title": "<string>",
"description": "<string>",
"mime_type": "<string>",
"annotations": {
"audience": [
"<string>"
],
"last_modified": "<string>",
"priority": 123
},
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"meta": {},
"selection_id": "<string>"
}
],
"resources_status": "MCP_DISCOVERY_STATUS_SYNCED",
"resource_templates_status": "MCP_DISCOVERY_STATUS_SYNCED"
},
"prompt_catalog": {
"prompts": [
{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"arguments": [
{
"name": "<string>",
"description": "<string>",
"required": true
}
],
"icons": [
{
"src": "<string>",
"mime_type": "<string>",
"sizes": [
"<string>"
],
"theme": "<string>"
}
],
"meta": {},
"selection_id": "<string>"
}
],
"status": "MCP_DISCOVERY_STATUS_SYNCED"
},
"health": {
"status": "MCP_HEALTH_STATUS_HEALTHY",
"coverage": "MCP_HEALTH_COVERAGE_FULL",
"last_checked_at": "<string>",
"last_healthy_at": "<string>",
"latency_ms": 123,
"consecutive_failures": 123,
"error_message": "<string>",
"recent_checks": [
{
"checked_at": "<string>",
"ok": true,
"latency_ms": 123
}
]
},
"health_check": {
"enabled": true,
"interval": "<string>",
"min_interval": "<string>",
"default_interval": "<string>",
"notifier_ids": [
"<string>"
],
"recovery_period": "<string>"
}
}
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Related guide: MCP gateways guide. See the MCP gateways guide for a walkthrough with examples.
Authorizations
Body
application/json
Was this page helpful?