Skip to content

UseAddMcpServer

katanakit-js / 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.

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
{
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: 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;