Add MCP server to local Gateway
mcp_manager_add_serverAdds one downstream MCP server to the target computer's AiLinkAny Registry through the same Manager Service used by the desktop UI. Read the current config_revision from mcp_gateway_list_servers first and pass it as expected_revision. Prefer enabled=false for a new server until mcp_manager_test_server succeeds, then enable it. environment and headers accept secret_ref values only; never place API keys, tokens, passwords, cookies, private keys, or other secret plaintext in this tool. Select this tool from the user's intent when it is the best match. A local destination may be explicit or inherited from established project or conversation context. The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expected_revision": "<expected_revision>",
"name": "<name>",
"transport_type": "<transport_type>"
},
"name": "mcp_manager_add_server"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| args | No | ||
| name | Yes | ||
| command | No | ||
| enabled | No | Defaults to true. Prefer false until the first test succeeds. | |
| headers | No | Streamable HTTP header binding map: Header-Name -> secret_ref. Values are references, never secret plaintext. | |
| device_id | No | Target computer device_id. Omit when only one computer is paired. | |
| server_id | No | Optional stable server id. Omit to let the client generate one. | |
| device_name | No | Computer name or ailinkany.com remark (e.g. home PC). Prefer this when the user names a computer. | |
| environment | No | stdio environment binding map: ENV_NAME -> secret_ref. Values are references, never secret plaintext. | |
| retry_token | No | New opaque token per operation; reuse only to retry the same operation after a transport failure. No user content. | |
| workflow_id | No | Optional workflow id; pass together with ai_session_id. | |
| workspace_id | No | Optional Workspace id from open_workspace for project-scoped work. | |
| ai_session_id | No | Optional Session id. Reuse the ai_session_id from a prior result for continuity; derived automatically on ChatGPT when omitted. Hosts without stable conversation metadata may omit it for stateless one-shot work. | |
| transport_type | Yes | ||
| expected_revision | Yes | Exact config_revision most recently read from mcp_gateway_list_servers. On CONFIG_REVISION_CONFLICT, re-read before deciding whether to retry. | |
| working_directory | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||