Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.mcp_vault.create_credential(server_id="mcp_srv_aa87e2b1112a455b8deabed784372198", name="Personal Linear token", bearer_token="lin_api_xxx")
# Handle response
print(res)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();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Llm.McpVault.CreateCredentialAsync(
serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
body: new MeetKai.MKA1.Types.Components.CreateMcpCredentialRequest() {
Name = "Personal Linear token",
BearerToken = "lin_api_xxx",
}
);
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Personal Linear token",
"bearer_token": "lin_api_xxx"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Personal Linear token', bearer_token: 'lin_api_xxx'})
};
fetch('https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Personal Linear token',
'bearer_token' => 'lin_api_xxx'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials"
payload := strings.NewReader("{\n \"name\": \"Personal Linear token\",\n \"bearer_token\": \"lin_api_xxx\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Personal Linear token\",\n \"bearer_token\": \"lin_api_xxx\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Personal Linear token\",\n \"bearer_token\": \"lin_api_xxx\"\n}"
response = http.request(request)
puts response.read_body{
"id": "mcp_cred_bb98f3c2223b566c9dfbcef895483209",
"object": "mcp.credential",
"server_id": "mcp_srv_aa87e2b1112a455b8deabed784372198",
"name": "Personal Linear token",
"auth_type": "bearer",
"authorization_preview": "****...1234",
"header_names": [],
"expires_at": null,
"last_used_at": null,
"created_at": "2026-04-29T12:00:00.000Z",
"updated_at": "2026-04-29T12:00:00.000Z",
"revoked_at": null
}MCP Vault
Crear credencial MCP
Almacena credenciales encriptadas para un servidor MCP de propiedad del usuario. Los valores secretos nunca se devuelven.
POST
/
api
/
v1
/
llm
/
mcp
/
servers
/
{server_id}
/
credentials
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.mcp_vault.create_credential(server_id="mcp_srv_aa87e2b1112a455b8deabed784372198", name="Personal Linear token", bearer_token="lin_api_xxx")
# Handle response
print(res)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();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Llm.McpVault.CreateCredentialAsync(
serverId: "mcp_srv_aa87e2b1112a455b8deabed784372198",
body: new MeetKai.MKA1.Types.Components.CreateMcpCredentialRequest() {
Name = "Personal Linear token",
BearerToken = "lin_api_xxx",
}
);
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Personal Linear token",
"bearer_token": "lin_api_xxx"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Personal Linear token', bearer_token: 'lin_api_xxx'})
};
fetch('https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Personal Linear token',
'bearer_token' => 'lin_api_xxx'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials"
payload := strings.NewReader("{\n \"name\": \"Personal Linear token\",\n \"bearer_token\": \"lin_api_xxx\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Personal Linear token\",\n \"bearer_token\": \"lin_api_xxx\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/mcp/servers/{server_id}/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Personal Linear token\",\n \"bearer_token\": \"lin_api_xxx\"\n}"
response = http.request(request)
puts response.read_body{
"id": "mcp_cred_bb98f3c2223b566c9dfbcef895483209",
"object": "mcp.credential",
"server_id": "mcp_srv_aa87e2b1112a455b8deabed784372198",
"name": "Personal Linear token",
"auth_type": "bearer",
"authorization_preview": "****...1234",
"header_names": [],
"expires_at": null,
"last_used_at": null,
"created_at": "2026-04-29T12:00:00.000Z",
"updated_at": "2026-04-29T12:00:00.000Z",
"revoked_at": null
}Autorizaciones
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Encabezados
Optional external end-user identifier forwarded by the API gateway.
Parámetros de ruta
Cuerpo
application/json
Required string length:
1 - 255Opciones disponibles:
bearer, authorization, headers, none Required string length:
1 - 8192Required string length:
1 - 8192Show child attributes
Show child attributes
Respuesta
201 - application/json
Está bien
Opciones disponibles:
bearer, authorization, headers, none ¿Esta página le ayudó?
⌘I