Skip to content

Llm.McpVault ​

Overview ​

Available Operations ​

createServer ​

Creates a user-owned MCP server configuration. Secret credentials are stored separately.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.createServer({
    createMcpServerRequest: {
      name: "Linear",
      serverLabel: "linear",
      serverUrl: "https://mcp.linear.app/mcp",
      allowedTools: [
        "issues.list",
      ],
      requireApproval: "always",
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultCreateServer } from "@meetkai/mka1/funcs/llmMcpVaultCreateServer.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultCreateServer(sdk, {
    createMcpServerRequest: {
      name: "Linear",
      serverLabel: "linear",
      serverUrl: "https://mcp.linear.app/mcp",
      allowedTools: [
        "issues.list",
      ],
      requireApproval: "always",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultCreateServer failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMcpVaultCreateServerMutation
} from "@meetkai/mka1/react-query/llmMcpVaultCreateServer.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.CreateMcpServerRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpServer>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

listServers ​

Lists MCP server configurations owned by the authenticated user context.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.listServers({});

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultListServers } from "@meetkai/mka1/funcs/llmMcpVaultListServers.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultListServers(sdk, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultListServers failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useLlmMcpVaultListServers,
  useLlmMcpVaultListServersSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchLlmMcpVaultListServers,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateLlmMcpVaultListServers,
  invalidateAllLlmMcpVaultListServers,
} from "@meetkai/mka1/react-query/llmMcpVaultListServers.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.ListMcpServersRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpServerList>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

getServer ​

Returns a user-owned MCP server configuration.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.getServer({
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultGetServer } from "@meetkai/mka1/funcs/llmMcpVaultGetServer.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultGetServer(sdk, {
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultGetServer failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useLlmMcpVaultGetServer,
  useLlmMcpVaultGetServerSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchLlmMcpVaultGetServer,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateLlmMcpVaultGetServer,
  invalidateAllLlmMcpVaultGetServer,
} from "@meetkai/mka1/react-query/llmMcpVaultGetServer.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.GetMcpServerRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpServer>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

updateServer ​

Partially updates a user-owned MCP server configuration.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.updateServer({
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
    updateMcpServerRequest: {
      allowedTools: [
        "issues.list",
        "issues.create",
      ],
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultUpdateServer } from "@meetkai/mka1/funcs/llmMcpVaultUpdateServer.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultUpdateServer(sdk, {
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
    updateMcpServerRequest: {
      allowedTools: [
        "issues.list",
        "issues.create",
      ],
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultUpdateServer failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMcpVaultUpdateServerMutation
} from "@meetkai/mka1/react-query/llmMcpVaultUpdateServer.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.UpdateMcpServerRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpServer>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

deleteServer ​

Soft-deletes a user-owned MCP server and revokes its credentials.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.deleteServer({
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultDeleteServer } from "@meetkai/mka1/funcs/llmMcpVaultDeleteServer.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultDeleteServer(sdk, {
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultDeleteServer failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMcpVaultDeleteServerMutation
} from "@meetkai/mka1/react-query/llmMcpVaultDeleteServer.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.DeleteMcpServerRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpDeleted>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

createCredential ​

Stores encrypted credentials for a user-owned MCP server. Secret values are never returned.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.createCredential({
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
    createMcpCredentialRequest: {
      name: "Personal Linear token",
      bearerToken: "lin_api_xxx",
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultCreateCredential } from "@meetkai/mka1/funcs/llmMcpVaultCreateCredential.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultCreateCredential(sdk, {
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
    createMcpCredentialRequest: {
      name: "Personal Linear token",
      bearerToken: "lin_api_xxx",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultCreateCredential failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMcpVaultCreateCredentialMutation
} from "@meetkai/mka1/react-query/llmMcpVaultCreateCredential.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.CreateMcpCredentialRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpCredential>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

listCredentials ​

Lists encrypted credential metadata for a user-owned MCP server.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.listCredentials({
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultListCredentials } from "@meetkai/mka1/funcs/llmMcpVaultListCredentials.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultListCredentials(sdk, {
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultListCredentials failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useLlmMcpVaultListCredentials,
  useLlmMcpVaultListCredentialsSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchLlmMcpVaultListCredentials,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateLlmMcpVaultListCredentials,
  invalidateAllLlmMcpVaultListCredentials,
} from "@meetkai/mka1/react-query/llmMcpVaultListCredentials.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.ListMcpCredentialsRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpCredentialList>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

deleteCredential ​

Revokes a user-owned MCP credential.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.deleteCredential({
    credentialId: "mcp_cred_bb98f3c2223b566c9dfbcef895483209",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultDeleteCredential } from "@meetkai/mka1/funcs/llmMcpVaultDeleteCredential.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultDeleteCredential(sdk, {
    credentialId: "mcp_cred_bb98f3c2223b566c9dfbcef895483209",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultDeleteCredential failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMcpVaultDeleteCredentialMutation
} from "@meetkai/mka1/react-query/llmMcpVaultDeleteCredential.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.DeleteMcpCredentialRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpDeleted>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

testServer ​

Connects to an MCP server using the authenticated user's stored credential and returns discovered tool names.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.mcpVault.testServer({
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMcpVaultTestServer } from "@meetkai/mka1/funcs/llmMcpVaultTestServer.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMcpVaultTestServer(sdk, {
    serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMcpVaultTestServer failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMcpVaultTestServerMutation
} from "@meetkai/mka1/react-query/llmMcpVaultTestServer.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.TestMcpServerRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.McpServerTest>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*