Menambahkan server MCP ke aplikasi PolarClaw tertentu.
Deskripsi operasi
Description
-
The
ApplicationIdandServerNameparameters are required. -
The
ApplicationIdparameter specifies the application ID. -
The
ServerNameparameter specifies the MCP server name to add. -
A successful response returns the request ID, a message, a status code, the application ID, and the server name.
-
If the request fails, the API may return a 500 error code with a detailed error message.
Coba sekarang
Test
RAM authorization
Sintaks permintaan
POST HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ApplicationId |
string |
Yes |
ID aplikasi. |
pa-************** |
| ServerName |
string |
Yes |
Pengenal unik untuk server MCP. |
test-v1 |
| ServerConfig |
object |
No |
Objek konfigurasi untuk server MCP. |
{ "command": "node", "args": [ "-y", "@polarclaw/mcp-dev" ] } |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The data returned for a successful request. |
||
| RequestId |
string |
The request ID. |
2281C6C9-CBAB-1AFD-8400-670750CF6025_2212 |
| Message |
string |
The returned message. |
successful |
| Code |
integer |
The returned status code. |
200 |
| ApplicationId |
string |
The application ID. |
pa-************** |
| Ok |
boolean |
Indicates whether the operation was successful. |
True |
| ServerName |
string |
The name of the added or updated MCP server. |
test-v1 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "2281C6C9-CBAB-1AFD-8400-670750CF6025_2212",
"Message": "successful",
"Code": 200,
"ApplicationId": "pa-**************",
"Ok": true,
"ServerName": "test-v1"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.