MCP Vault
Create MCP server
Creates a user-owned MCP server configuration, optionally shared with the end users the owner calls on behalf of and with the OAuth client they connect through. Secret credentials are stored separately; the OAuth client secret is write-only.
POST
/
api
/
v1
/
llm
/
mcp
/
servers
CSharp (SDK)
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Llm.McpVault.CreateServerAsync(body: new MeetKai.MKA1.Types.Components.CreateMcpServerRequest() {
Name = "Linear",
ServerLabel = "linear",
ServerUrl = "https://mcp.linear.app/mcp",
AllowedTools = MCPAllowedToolsUnion.CreateArrayOfStr(
new List<string>() {
"issues.list",
}
),
RequireApproval = MCPRequireApproval.Always,
SharedWithEndUsers = true,
Oauth = new McpServerOAuthConfigRequest() {
AuthorizationUrl = "https://linear.app/oauth/authorize",
TokenUrl = "https://api.linear.app/oauth/token",
ClientId = "linear-oauth-client",
ClientSecret = "lin_oauth_xxx",
Scopes = new List<string>() {
"read",
"write",
},
RedirectUris = new List<string>() {
"https://app.example.com/oauth/callback",
},
},
});
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.mcp_vault.create_server(name="Linear", server_label="linear", server_url_="https://mcp.linear.app/mcp", allowed_tools=[
"issues.list",
], require_approval="always", shared_with_end_users=True, oauth={
"authorization_url": "https://linear.app/oauth/authorize",
"token_url": "https://api.linear.app/oauth/token",
"client_id": "linear-oauth-client",
"client_secret": "lin_oauth_xxx",
"scopes": [
"read",
"write",
],
"redirect_uris": [
"https://app.example.com/oauth/callback",
],
})
# 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.createServer({
createMcpServerRequest: {
name: "Linear",
serverLabel: "linear",
serverUrl: "https://mcp.linear.app/mcp",
allowedTools: [
"issues.list",
],
requireApproval: "always",
sharedWithEndUsers: true,
oauth: {
authorizationUrl: "https://linear.app/oauth/authorize",
tokenUrl: "https://api.linear.app/oauth/token",
clientId: "linear-oauth-client",
clientSecret: "lin_oauth_xxx",
scopes: [
"read",
"write",
],
redirectUris: [
"https://app.example.com/oauth/callback",
],
},
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/components"
"github.com/MeetKai/mka1-sdks/go/optionalnullable"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.McpVault.CreateServer(ctx, components.CreateMcpServerRequest{
Name: "Linear",
ServerLabel: "linear",
ServerURL: "https://mcp.linear.app/mcp",
AllowedTools: optionalnullable.From(mka1.Pointer(components.CreateMCPAllowedToolsUnionArrayOfStr(
[]string{
"issues.list",
},
))),
RequireApproval: components.MCPRequireApprovalAlways.ToPointer(),
SharedWithEndUsers: mka1.Pointer(true),
Oauth: optionalnullable.From(&components.McpServerOAuthConfigRequest{
AuthorizationURL: "https://linear.app/oauth/authorize",
TokenURL: "https://api.linear.app/oauth/token",
ClientID: "linear-oauth-client",
ClientSecret: optionalnullable.From(mka1.Pointer("lin_oauth_xxx")),
Scopes: []string{
"read",
"write",
},
RedirectUris: []string{
"https://app.example.com/oauth/callback",
},
}),
}, nil)
if err != nil {
log.Fatal(err)
}
if res.McpServer != nil {
switch res.McpServer.AllowedTools.Type {
case components.MCPAllowedToolsUnionTypeArrayOfStr:
// res.McpServer.AllowedTools.ArrayOfStr is populated
case components.MCPAllowedToolsUnionTypeMCPAllowedTools:
// res.McpServer.AllowedTools.MCPAllowedTools is populated
default:
// Unknown type - use res.McpServer.AllowedTools.GetUnknownRaw() for raw JSON
}
}
}curl --request POST \
--url https://apigw.mka1.com/api/v1/llm/mcp/servers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Linear",
"server_label": "linear",
"server_url": "https://mcp.linear.app/mcp",
"allowed_tools": [
"issues.list"
],
"require_approval": "always",
"shared_with_end_users": true,
"oauth": {
"authorization_url": "https://linear.app/oauth/authorize",
"token_url": "https://api.linear.app/oauth/token",
"client_id": "linear-oauth-client",
"client_secret": "lin_oauth_xxx",
"scopes": [
"read",
"write"
],
"redirect_uris": [
"https://app.example.com/oauth/callback"
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Linear',
server_label: 'linear',
server_url: 'https://mcp.linear.app/mcp',
allowed_tools: ['issues.list'],
require_approval: 'always',
shared_with_end_users: true,
oauth: {
authorization_url: 'https://linear.app/oauth/authorize',
token_url: 'https://api.linear.app/oauth/token',
client_id: 'linear-oauth-client',
client_secret: 'lin_oauth_xxx',
scopes: ['read', 'write'],
redirect_uris: ['https://app.example.com/oauth/callback']
}
})
};
fetch('https://apigw.mka1.com/api/v1/llm/mcp/servers', 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",
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' => 'Linear',
'server_label' => 'linear',
'server_url' => 'https://mcp.linear.app/mcp',
'allowed_tools' => [
'issues.list'
],
'require_approval' => 'always',
'shared_with_end_users' => true,
'oauth' => [
'authorization_url' => 'https://linear.app/oauth/authorize',
'token_url' => 'https://api.linear.app/oauth/token',
'client_id' => 'linear-oauth-client',
'client_secret' => 'lin_oauth_xxx',
'scopes' => [
'read',
'write'
],
'redirect_uris' => [
'https://app.example.com/oauth/callback'
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/llm/mcp/servers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Linear\",\n \"server_label\": \"linear\",\n \"server_url\": \"https://mcp.linear.app/mcp\",\n \"allowed_tools\": [\n \"issues.list\"\n ],\n \"require_approval\": \"always\",\n \"shared_with_end_users\": true,\n \"oauth\": {\n \"authorization_url\": \"https://linear.app/oauth/authorize\",\n \"token_url\": \"https://api.linear.app/oauth/token\",\n \"client_id\": \"linear-oauth-client\",\n \"client_secret\": \"lin_oauth_xxx\",\n \"scopes\": [\n \"read\",\n \"write\"\n ],\n \"redirect_uris\": [\n \"https://app.example.com/oauth/callback\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/mcp/servers")
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\": \"Linear\",\n \"server_label\": \"linear\",\n \"server_url\": \"https://mcp.linear.app/mcp\",\n \"allowed_tools\": [\n \"issues.list\"\n ],\n \"require_approval\": \"always\",\n \"shared_with_end_users\": true,\n \"oauth\": {\n \"authorization_url\": \"https://linear.app/oauth/authorize\",\n \"token_url\": \"https://api.linear.app/oauth/token\",\n \"client_id\": \"linear-oauth-client\",\n \"client_secret\": \"lin_oauth_xxx\",\n \"scopes\": [\n \"read\",\n \"write\"\n ],\n \"redirect_uris\": [\n \"https://app.example.com/oauth/callback\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "mcp_srv_aa87e2b1112a455b8deabed784372198",
"object": "mcp.server",
"name": "Linear",
"server_label": "linear",
"server_url": "https://mcp.linear.app/mcp",
"server_description": "Linear MCP server",
"allowed_tools": [
"issues.list"
],
"require_approval": "always",
"metadata": {},
"shared_with_end_users": true,
"oauth": {
"authorization_url": "https://linear.app/oauth/authorize",
"token_url": "https://api.linear.app/oauth/token",
"client_id": "linear-oauth-client",
"has_client_secret": true,
"scopes": [
"read",
"write"
],
"token_endpoint_auth_method": "client_secret_basic",
"redirect_uris": [
"https://app.example.com/oauth/callback"
]
},
"created_at": "2026-04-29T12:00:00.000Z",
"updated_at": "2026-04-29T12:00:00.000Z"
}Authorizations
Body
application/json
Response
201 - application/json
OK
Was this page helpful?
⌘I
CSharp (SDK)
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Llm.McpVault.CreateServerAsync(body: new MeetKai.MKA1.Types.Components.CreateMcpServerRequest() {
Name = "Linear",
ServerLabel = "linear",
ServerUrl = "https://mcp.linear.app/mcp",
AllowedTools = MCPAllowedToolsUnion.CreateArrayOfStr(
new List<string>() {
"issues.list",
}
),
RequireApproval = MCPRequireApproval.Always,
SharedWithEndUsers = true,
Oauth = new McpServerOAuthConfigRequest() {
AuthorizationUrl = "https://linear.app/oauth/authorize",
TokenUrl = "https://api.linear.app/oauth/token",
ClientId = "linear-oauth-client",
ClientSecret = "lin_oauth_xxx",
Scopes = new List<string>() {
"read",
"write",
},
RedirectUris = new List<string>() {
"https://app.example.com/oauth/callback",
},
},
});
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.mcp_vault.create_server(name="Linear", server_label="linear", server_url_="https://mcp.linear.app/mcp", allowed_tools=[
"issues.list",
], require_approval="always", shared_with_end_users=True, oauth={
"authorization_url": "https://linear.app/oauth/authorize",
"token_url": "https://api.linear.app/oauth/token",
"client_id": "linear-oauth-client",
"client_secret": "lin_oauth_xxx",
"scopes": [
"read",
"write",
],
"redirect_uris": [
"https://app.example.com/oauth/callback",
],
})
# 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.createServer({
createMcpServerRequest: {
name: "Linear",
serverLabel: "linear",
serverUrl: "https://mcp.linear.app/mcp",
allowedTools: [
"issues.list",
],
requireApproval: "always",
sharedWithEndUsers: true,
oauth: {
authorizationUrl: "https://linear.app/oauth/authorize",
tokenUrl: "https://api.linear.app/oauth/token",
clientId: "linear-oauth-client",
clientSecret: "lin_oauth_xxx",
scopes: [
"read",
"write",
],
redirectUris: [
"https://app.example.com/oauth/callback",
],
},
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/components"
"github.com/MeetKai/mka1-sdks/go/optionalnullable"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.McpVault.CreateServer(ctx, components.CreateMcpServerRequest{
Name: "Linear",
ServerLabel: "linear",
ServerURL: "https://mcp.linear.app/mcp",
AllowedTools: optionalnullable.From(mka1.Pointer(components.CreateMCPAllowedToolsUnionArrayOfStr(
[]string{
"issues.list",
},
))),
RequireApproval: components.MCPRequireApprovalAlways.ToPointer(),
SharedWithEndUsers: mka1.Pointer(true),
Oauth: optionalnullable.From(&components.McpServerOAuthConfigRequest{
AuthorizationURL: "https://linear.app/oauth/authorize",
TokenURL: "https://api.linear.app/oauth/token",
ClientID: "linear-oauth-client",
ClientSecret: optionalnullable.From(mka1.Pointer("lin_oauth_xxx")),
Scopes: []string{
"read",
"write",
},
RedirectUris: []string{
"https://app.example.com/oauth/callback",
},
}),
}, nil)
if err != nil {
log.Fatal(err)
}
if res.McpServer != nil {
switch res.McpServer.AllowedTools.Type {
case components.MCPAllowedToolsUnionTypeArrayOfStr:
// res.McpServer.AllowedTools.ArrayOfStr is populated
case components.MCPAllowedToolsUnionTypeMCPAllowedTools:
// res.McpServer.AllowedTools.MCPAllowedTools is populated
default:
// Unknown type - use res.McpServer.AllowedTools.GetUnknownRaw() for raw JSON
}
}
}curl --request POST \
--url https://apigw.mka1.com/api/v1/llm/mcp/servers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Linear",
"server_label": "linear",
"server_url": "https://mcp.linear.app/mcp",
"allowed_tools": [
"issues.list"
],
"require_approval": "always",
"shared_with_end_users": true,
"oauth": {
"authorization_url": "https://linear.app/oauth/authorize",
"token_url": "https://api.linear.app/oauth/token",
"client_id": "linear-oauth-client",
"client_secret": "lin_oauth_xxx",
"scopes": [
"read",
"write"
],
"redirect_uris": [
"https://app.example.com/oauth/callback"
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Linear',
server_label: 'linear',
server_url: 'https://mcp.linear.app/mcp',
allowed_tools: ['issues.list'],
require_approval: 'always',
shared_with_end_users: true,
oauth: {
authorization_url: 'https://linear.app/oauth/authorize',
token_url: 'https://api.linear.app/oauth/token',
client_id: 'linear-oauth-client',
client_secret: 'lin_oauth_xxx',
scopes: ['read', 'write'],
redirect_uris: ['https://app.example.com/oauth/callback']
}
})
};
fetch('https://apigw.mka1.com/api/v1/llm/mcp/servers', 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",
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' => 'Linear',
'server_label' => 'linear',
'server_url' => 'https://mcp.linear.app/mcp',
'allowed_tools' => [
'issues.list'
],
'require_approval' => 'always',
'shared_with_end_users' => true,
'oauth' => [
'authorization_url' => 'https://linear.app/oauth/authorize',
'token_url' => 'https://api.linear.app/oauth/token',
'client_id' => 'linear-oauth-client',
'client_secret' => 'lin_oauth_xxx',
'scopes' => [
'read',
'write'
],
'redirect_uris' => [
'https://app.example.com/oauth/callback'
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/llm/mcp/servers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Linear\",\n \"server_label\": \"linear\",\n \"server_url\": \"https://mcp.linear.app/mcp\",\n \"allowed_tools\": [\n \"issues.list\"\n ],\n \"require_approval\": \"always\",\n \"shared_with_end_users\": true,\n \"oauth\": {\n \"authorization_url\": \"https://linear.app/oauth/authorize\",\n \"token_url\": \"https://api.linear.app/oauth/token\",\n \"client_id\": \"linear-oauth-client\",\n \"client_secret\": \"lin_oauth_xxx\",\n \"scopes\": [\n \"read\",\n \"write\"\n ],\n \"redirect_uris\": [\n \"https://app.example.com/oauth/callback\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/mcp/servers")
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\": \"Linear\",\n \"server_label\": \"linear\",\n \"server_url\": \"https://mcp.linear.app/mcp\",\n \"allowed_tools\": [\n \"issues.list\"\n ],\n \"require_approval\": \"always\",\n \"shared_with_end_users\": true,\n \"oauth\": {\n \"authorization_url\": \"https://linear.app/oauth/authorize\",\n \"token_url\": \"https://api.linear.app/oauth/token\",\n \"client_id\": \"linear-oauth-client\",\n \"client_secret\": \"lin_oauth_xxx\",\n \"scopes\": [\n \"read\",\n \"write\"\n ],\n \"redirect_uris\": [\n \"https://app.example.com/oauth/callback\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "mcp_srv_aa87e2b1112a455b8deabed784372198",
"object": "mcp.server",
"name": "Linear",
"server_label": "linear",
"server_url": "https://mcp.linear.app/mcp",
"server_description": "Linear MCP server",
"allowed_tools": [
"issues.list"
],
"require_approval": "always",
"metadata": {},
"shared_with_end_users": true,
"oauth": {
"authorization_url": "https://linear.app/oauth/authorize",
"token_url": "https://api.linear.app/oauth/token",
"client_id": "linear-oauth-client",
"has_client_secret": true,
"scopes": [
"read",
"write"
],
"token_endpoint_auth_method": "client_secret_basic",
"redirect_uris": [
"https://app.example.com/oauth/callback"
]
},
"created_at": "2026-04-29T12:00:00.000Z",
"updated_at": "2026-04-29T12:00:00.000Z"
}