UseAddMcpServer
katanakit-js / useAddMcpServer
Function: useAddMcpServer()
Section titled “Function: useAddMcpServer()”function useAddMcpServer( data, entry,): { createdAt: string; keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[]; mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[]; updatedAt: string; version: 1;};Defined in: core/services/mcp.service.ts:198
Adds or replaces a server in the registry. See McpService.useAddMcpServer.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
{ createdAt: string; keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[]; mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[]; updatedAt: string; version: 1; } |
data.createdAt? |
string |
data.keys? |
{ createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[] |
data.mcpServers? |
{ command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[] |
data.updatedAt? |
string |
data.version? |
1 |
entry |
{ command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; } |
entry.command? |
string[] |
entry.disabled? |
boolean |
entry.environment? |
Record<string, string> |
entry.headers? |
Record<string, string> |
entry.name? |
string |
entry.type? |
"local" | "remote" |
entry.url? |
string |
Returns
Section titled “Returns”{ createdAt: string; keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[]; mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[]; updatedAt: string; version: 1;}createdAt
Section titled “createdAt”createdAt: string;keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string;}[];Type Declaration
Section titled “Type Declaration”mcpServers
Section titled “mcpServers”mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string;}[];Type Declaration
Section titled “Type Declaration”updatedAt
Section titled “updatedAt”updatedAt: string;version
Section titled “version”version: 1;