Build your own agent
View as MarkdownThis page is for developers who build their own agent or app on a model's API, such as Claude's or OpenAI's. Your app gives the model Blitframe's MCP server, and the model calls Blitframe's tools, such as create_project and render, while it works on your request. To use an agent app such as Claude Code, Codex or Cursor instead, see Quickstart: AI Agent.
How it works
Your request to the model's API names Blitframe's MCP server with these settings. The model's provider then connects to Blitframe, runs the tool calls the model makes, and gives the results back to the model.
| Setting | Value |
|---|---|
| Server URL | https:/ |
| Authentication | Your API key, sent as Authorization: Bearer blitframe_... |
| Tools | Only the tools your agent needs. See Choose the tools. |
- Give the agent a key of its own, so you can revoke it without touching your other keys. See API keys.
- Files go through your code. A tool call carries text only, so the model can't send an image or a ZIP. Your code uploads the file and gives the model the upload's
id, which the model then names in its edit or render. - Give the model Blitframe's rules. The Agent reference lists them. Put the rules your agent needs in its system prompt, or tell the model to read that page with the
read_docstool before it starts.
Check the connection
Before you wire the server into your agent, check that your key works: ask the server for its list of tools. A tool count above 0 means the connection works. The examples need your API key, set up as in Get an API key. The curl command needs jq.
curl -s https://blitframe.codeartworks.com/mcp \
-H "Authorization: Bearer $BLITFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq '.result.tools | length'
import os, requests
response = requests.post(
"https://blitframe.codeartworks.com/mcp",
headers={"Authorization": f"Bearer {os.environ['BLITFRAME_API_KEY']}"},
json={"jsonrpc": "2.0", "id": 1, "method": "tools/list"},
)
answer = response.json()
print(len(answer["result"]["tools"]))
const response = await fetch("https://blitframe.codeartworks.com/mcp", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }),
});
const answer = await response.json();
console.log(answer.result.tools.length);
const response = await fetch("https://blitframe.codeartworks.com/mcp", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }),
});
const answer = await response.json();
console.log(answer.result.tools.length);
<?php
$ch = curl_init("https://blitframe.codeartworks.com/mcp");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("BLITFRAME_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["jsonrpc" => "2.0", "id" => 1, "method" => "tools/list"]),
]);
$response = curl_exec($ch);
$answer = json_decode($response, true);
echo count($answer["result"]["tools"]), "\n";
require "net/http"
require "json"
uri = URI("https://blitframe.codeartworks.com/mcp")
headers = { "Authorization" => "Bearer #{ENV["BLITFRAME_API_KEY"]}", "Content-Type" => "application/json" }
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.post(uri.request_uri, { jsonrpc: "2.0", id: 1, method: "tools/list" }.to_json, headers)
end
answer = JSON.parse(response.body)
puts answer["result"]["tools"].length
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{"jsonrpc":"2.0","id":1,"method":"tools/list"}`)
request, err := http.NewRequest("POST", "https://blitframe.codeartworks.com/mcp", body)
if err != nil {
panic(err)
}
request.Header.Set("Authorization", "Bearer "+os.Getenv("BLITFRAME_API_KEY"))
request.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
var answer struct {
Result struct {
Tools []any `json:"tools"`
} `json:"result"`
}
if err := json.NewDecoder(response.Body).Decode(&answer); err != nil {
panic(err)
}
fmt.Println(len(answer.Result.Tools))
}
using System.Net.Http.Json;
using System.Text.Json.Nodes;
var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new("Bearer", Environment.GetEnvironmentVariable("BLITFRAME_API_KEY"));
var response = await http.PostAsync(
"https://blitframe.codeartworks.com/mcp",
JsonContent.Create(new { jsonrpc = "2.0", id = 1, method = "tools/list" }));
var answer = await response.Content.ReadFromJsonAsync<JsonNode>();
Console.WriteLine(answer?["result"]?["tools"]?.AsArray().Count);
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://blitframe.codeartworks.com/mcp"))
.header("Authorization", "Bearer " + System.getenv("BLITFRAME_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
JsonNode answer = new ObjectMapper().readTree(response.body());
System.out.println(answer.get("result").get("tools").size());
}
}
Claude
This example asks Claude to list your projects and render the newest one. Each tab uses Anthropic's official library for its language. The curl command calls the API directly and needs jq. Each one needs your Anthropic key in ANTHROPIC_API_KEY and your Blitframe key in BLITFRAME_API_KEY:
BLITFRAME_TOOLS='["list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders"]'
jq -n --arg key "$BLITFRAME_API_KEY" --argjson tools "$BLITFRAME_TOOLS" '{
model: "claude-opus-5-5",
max_tokens: 16000,
mcp_servers: [{
type: "url",
url: "https://blitframe.codeartworks.com/mcp",
name: "blitframe",
authorization_token: $key
}],
tools: [{
type: "mcp_toolset",
mcp_server_name: "blitframe",
default_config: { enabled: false },
configs: ($tools | map({ key: ., value: { enabled: true } }) | from_entries)
}],
messages: [{ role: "user", content: "List my Blitframe projects and render the newest one as an MP4." }]
}' | curl -s https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2026-10-21" \
-H "anthropic-beta: mcp-client-2025-11-20" \
-H "Content-Type: application/json" \
-d @- | jq -r '[.content[] | select(.type == "text") | .text] | join("")'
import os
import anthropic
BLITFRAME_TOOLS = [
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
]
client = anthropic.Anthropic()
response = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=16000,
betas=["mcp-client-2025-11-20"],
mcp_servers=[{
"type": "url",
"url": "https://blitframe.codeartworks.com/mcp",
"name": "blitframe",
"authorization_token": os.environ["BLITFRAME_API_KEY"],
}],
tools=[{
"type": "mcp_toolset",
"mcp_server_name": "blitframe",
"default_config": {"enabled": False},
"configs": {name: {"enabled": True} for name in BLITFRAME_TOOLS},
}],
messages=[{"role": "user", "content": "List my Blitframe projects and render the newest one as an MP4."}],
)
print("".join(block.text for block in response.content if block.type == "text"))
const Anthropic = require("@anthropic-ai/sdk");
const BLITFRAME_TOOLS = [
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
];
async function main() {
const client = new Anthropic();
const message = await client.beta.messages.create({
model: "claude-opus-5-5",
max_tokens: 16000,
betas: ["mcp-client-2025-11-20"],
mcp_servers: [{
type: "url",
url: "https://blitframe.codeartworks.com/mcp",
name: "blitframe",
authorization_token: process.env.BLITFRAME_API_KEY,
}],
tools: [{
type: "mcp_toolset",
mcp_server_name: "blitframe",
default_config: { enabled: false },
configs: Object.fromEntries(BLITFRAME_TOOLS.map((name) => [name, { enabled: true }])),
}],
messages: [{ role: "user", content: "List my Blitframe projects and render the newest one as an MP4." }],
});
console.log(message.content.filter((block) => block.type === "text").map((block) => block.text).join(""));
}
main();
import Anthropic from "@anthropic-ai/sdk";
const BLITFRAME_TOOLS = [
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
];
const client = new Anthropic();
const message = await client.beta.messages.create({
model: "claude-opus-5-5",
max_tokens: 16000,
betas: ["mcp-client-2025-11-20"],
mcp_servers: [{
type: "url",
url: "https://blitframe.codeartworks.com/mcp",
name: "blitframe",
authorization_token: process.env.BLITFRAME_API_KEY,
}],
tools: [{
type: "mcp_toolset",
mcp_server_name: "blitframe",
default_config: { enabled: false },
configs: Object.fromEntries(BLITFRAME_TOOLS.map((name) => [name, { enabled: true }])),
}],
messages: [{ role: "user", content: "List my Blitframe projects and render the newest one as an MP4." }],
});
console.log(message.content.filter((block) => block.type === "text").map((block) => block.text).join(""));
<?php
use Anthropic\Beta\Messages\BetaMCPToolConfig;
use Anthropic\Beta\Messages\BetaMCPToolDefaultConfig;
use Anthropic\Beta\Messages\BetaMCPToolset;
use Anthropic\Beta\Messages\BetaRequestMCPServerURLDefinition;
use Anthropic\Client;
require __DIR__ . '/vendor/autoload.php';
$blitframeTools = [
'list_projects', 'get_project', 'list_versions', 'get_version', 'read_file', 'inspect_layers',
'list_fonts', 'read_data_json_reference', 'read_docs', 'get_usage',
'create_project', 'edit_project', 'render', 'get_render', 'list_renders',
];
$client = new Client(apiKey: getenv('ANTHROPIC_API_KEY'));
$message = $client->beta->messages->create(
maxTokens: 16000,
messages: [['role' => 'user', 'content' => 'List my Blitframe projects and render the newest one as an MP4.']],
model: 'claude-opus-5-5',
mcpServers: [
BetaRequestMCPServerURLDefinition::with(
name: 'blitframe',
url: 'https://blitframe.codeartworks.com/mcp',
authorizationToken: getenv('BLITFRAME_API_KEY'),
),
],
tools: [
BetaMCPToolset::with(
mcpServerName: 'blitframe',
defaultConfig: BetaMCPToolDefaultConfig::with(enabled: false),
configs: array_fill_keys($blitframeTools, BetaMCPToolConfig::with(enabled: true)),
),
],
betas: ['mcp-client-2025-11-20'],
);
foreach ($message->content as $block) {
if ($block->type === 'text') {
echo $block->text;
}
}
echo "\n";
require "anthropic"
blitframe_tools = %w[
list_projects get_project list_versions get_version read_file inspect_layers
list_fonts read_data_json_reference read_docs get_usage
create_project edit_project render get_render list_renders
]
client = Anthropic::Client.new
message = client.beta.messages.create(
model: "claude-opus-5-5",
max_tokens: 16_000,
betas: ["mcp-client-2025-11-20"],
mcp_servers: [{
type: "url",
url: "https://blitframe.codeartworks.com/mcp",
name: "blitframe",
authorization_token: ENV.fetch("BLITFRAME_API_KEY")
}],
tools: [{
type: "mcp_toolset",
mcp_server_name: "blitframe",
default_config: {enabled: false},
configs: blitframe_tools.to_h { |name| [name, {enabled: true}] }
}],
messages: [{role: "user", content: "List my Blitframe projects and render the newest one as an MP4."}]
)
puts(message.content.select { |block| block.type == :text }.map(&:text).join)
package main
import (
"context"
"fmt"
"os"
"github.com/anthropics/anthropic-sdk-go/v2"
)
var blitframeTools = []string{
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
}
func main() {
configs := map[string]anthropic.BetaMCPToolConfigParam{}
for _, name := range blitframeTools {
configs[name] = anthropic.BetaMCPToolConfigParam{Enabled: anthropic.Bool(true)}
}
client := anthropic.NewClient()
message, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{
Model: anthropic.ModelClaudeOpus5_5,
MaxTokens: 16000,
Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMCPClient2025_11_20},
MCPServers: []anthropic.BetaRequestMCPServerURLDefinitionParam{{
Name: "blitframe",
URL: "https://blitframe.codeartworks.com/mcp",
AuthorizationToken: anthropic.String(os.Getenv("BLITFRAME_API_KEY")),
}},
Tools: []anthropic.BetaToolUnionParam{{OfMCPToolset: &anthropic.BetaMCPToolsetParam{
MCPServerName: "blitframe",
DefaultConfig: anthropic.BetaMCPToolDefaultConfigParam{Enabled: anthropic.Bool(false)},
Configs: configs,
}}},
Messages: []anthropic.BetaMessageParam{
anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("List my Blitframe projects and render the newest one as an MP4.")),
},
})
if err != nil {
panic(err)
}
for _, block := range message.Content {
if block.Type == "text" {
fmt.Print(block.Text)
}
}
fmt.Println()
}
using Anthropic;
using Anthropic.Models.Beta.Messages;
string[] blitframeTools =
[
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
];
var client = new AnthropicClient();
var message = await client.Beta.Messages.Create(new MessageCreateParams
{
Model = "claude-opus-5-5",
MaxTokens = 16000,
Betas = ["mcp-client-2025-11-20"],
McpServers =
[
new BetaRequestMcpServerUrlDefinition
{
Name = "blitframe",
Url = "https://blitframe.codeartworks.com/mcp",
AuthorizationToken = Environment.GetEnvironmentVariable("BLITFRAME_API_KEY"),
},
],
Tools =
[
new BetaMcpToolset
{
McpServerName = "blitframe",
DefaultConfig = new BetaMcpToolDefaultConfig { Enabled = false },
Configs = blitframeTools.ToDictionary(name => name, _ => new BetaMcpToolConfig { Enabled = true }),
},
],
Messages = [new BetaUserMessageParam { Content = "List my Blitframe projects and render the newest one as an MP4." }],
});
foreach (var block in message.Content)
{
if (block.TryPickText(out var text))
{
Console.Write(text.Text);
}
}
Console.WriteLine();
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.core.JsonValue;
import com.anthropic.models.beta.AnthropicBeta;
import com.anthropic.models.beta.messages.BetaMcpToolDefaultConfig;
import com.anthropic.models.beta.messages.BetaMcpToolset;
import com.anthropic.models.beta.messages.BetaMessage;
import com.anthropic.models.beta.messages.BetaRequestMcpServerUrlDefinition;
import com.anthropic.models.beta.messages.MessageCreateParams;
import com.anthropic.models.messages.Model;
import java.util.List;
import java.util.Map;
public class Example {
static final List<String> BLITFRAME_TOOLS = List.of(
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders");
public static void main(String[] args) {
BetaMcpToolset.Configs.Builder configs = BetaMcpToolset.Configs.builder();
for (String name : BLITFRAME_TOOLS) {
configs.putAdditionalProperty(name, JsonValue.from(Map.of("enabled", true)));
}
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
MessageCreateParams params = MessageCreateParams.builder()
.model(Model.CLAUDE_OPUS_5_5)
.maxTokens(16000L)
.addBeta(AnthropicBeta.MCP_CLIENT_2025_11_20)
.addMcpServer(BetaRequestMcpServerUrlDefinition.builder()
.name("blitframe")
.url("https://blitframe.codeartworks.com/mcp")
.authorizationToken(System.getenv("BLITFRAME_API_KEY"))
.build())
.addTool(BetaMcpToolset.builder()
.mcpServerName("blitframe")
.defaultConfig(BetaMcpToolDefaultConfig.builder().enabled(false).build())
.configs(configs.build())
.build())
.addUserMessage("List my Blitframe projects and render the newest one as an MP4.")
.build();
BetaMessage message = client.beta().messages().create(params);
message.content().forEach(block -> block.text().ifPresent(text -> System.out.print(text.text())));
System.out.println();
}
}
default_config turns every tool off, and configs turns on only the tools in the list, so the model can call nothing else.
OpenAI
This example makes the same request through OpenAI's Responses API, with a model that supports remote MCP servers. Each tab uses OpenAI's official library for its language. PHP has no official library, so that tab uses the community library openai-php/. The curl command needs jq. Each one needs your OpenAI key in OPENAI_API_KEY and your Blitframe key in BLITFRAME_API_KEY:
BLITFRAME_TOOLS='["list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders"]'
jq -n --arg key "$BLITFRAME_API_KEY" --argjson tools "$BLITFRAME_TOOLS" '{
model: "gpt-6.2-sol",
tools: [{
type: "mcp",
server_label: "blitframe",
server_url: "https://blitframe.codeartworks.com/mcp",
headers: { Authorization: "Bearer \($key)" },
allowed_tools: $tools,
require_approval: "never"
}],
input: "List my Blitframe projects and render the newest one as an MP4."
}' | curl -s https://api.openai.com/v1/responses \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d @- | jq -r '[.output[] | select(.type == "message") | .content[] | select(.type == "output_text") | .text] | join("")'
import os
from openai import OpenAI
BLITFRAME_TOOLS = [
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
]
client = OpenAI()
response = client.responses.create(
model="gpt-6.2-sol",
tools=[{
"type": "mcp",
"server_label": "blitframe",
"server_url": "https://blitframe.codeartworks.com/mcp",
"headers": {"Authorization": f"Bearer {os.environ['BLITFRAME_API_KEY']}"},
"allowed_tools": BLITFRAME_TOOLS,
"require_approval": "never",
}],
input="List my Blitframe projects and render the newest one as an MP4.",
)
print(response.output_text)
const OpenAI = require("openai");
const BLITFRAME_TOOLS = [
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
];
async function main() {
const client = new OpenAI();
const response = await client.responses.create({
model: "gpt-6.2-sol",
tools: [{
type: "mcp",
server_label: "blitframe",
server_url: "https://blitframe.codeartworks.com/mcp",
headers: { Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}` },
allowed_tools: BLITFRAME_TOOLS,
require_approval: "never",
}],
input: "List my Blitframe projects and render the newest one as an MP4.",
});
console.log(response.output_text);
}
main();
import OpenAI from "openai";
const BLITFRAME_TOOLS = [
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
];
const client = new OpenAI();
const response = await client.responses.create({
model: "gpt-6.2-sol",
tools: [{
type: "mcp",
server_label: "blitframe",
server_url: "https://blitframe.codeartworks.com/mcp",
headers: { Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}` },
allowed_tools: BLITFRAME_TOOLS,
require_approval: "never",
}],
input: "List my Blitframe projects and render the newest one as an MP4.",
});
console.log(response.output_text);
<?php
require __DIR__ . '/vendor/autoload.php';
$blitframeTools = [
'list_projects', 'get_project', 'list_versions', 'get_version', 'read_file', 'inspect_layers',
'list_fonts', 'read_data_json_reference', 'read_docs', 'get_usage',
'create_project', 'edit_project', 'render', 'get_render', 'list_renders',
];
$client = OpenAI::client(getenv('OPENAI_API_KEY'));
$response = $client->responses()->create([
'model' => 'gpt-6.2-sol',
'tools' => [[
'type' => 'mcp',
'server_label' => 'blitframe',
'server_url' => 'https://blitframe.codeartworks.com/mcp',
'headers' => ['Authorization' => 'Bearer ' . getenv('BLITFRAME_API_KEY')],
'allowed_tools' => $blitframeTools,
'require_approval' => 'never',
]],
'input' => 'List my Blitframe projects and render the newest one as an MP4.',
]);
echo $response->outputText, "\n";
require "openai"
blitframe_tools = %w[
list_projects get_project list_versions get_version read_file inspect_layers
list_fonts read_data_json_reference read_docs get_usage
create_project edit_project render get_render list_renders
]
client = OpenAI::Client.new
response = client.responses.create(
model: "gpt-6.2-sol",
tools: [{
type: :mcp,
server_label: "blitframe",
server_url: "https://blitframe.codeartworks.com/mcp",
headers: {"Authorization" => "Bearer #{ENV.fetch("BLITFRAME_API_KEY")}"},
allowed_tools: blitframe_tools,
require_approval: :never
}],
input: "List my Blitframe projects and render the newest one as an MP4."
)
puts(response.output_text)
package main
import (
"context"
"fmt"
"os"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/responses"
)
var blitframeTools = []string{
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
}
func main() {
client := openai.NewClient()
response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{
Model: openai.ChatModelGPT6_2Sol,
Tools: []responses.ToolUnionParam{{OfMcp: &responses.ToolMcpParam{
ServerLabel: "blitframe",
ServerURL: openai.String("https://blitframe.codeartworks.com/mcp"),
Headers: map[string]string{"Authorization": "Bearer " + os.Getenv("BLITFRAME_API_KEY")},
AllowedTools: responses.ToolMcpAllowedToolsUnionParam{OfMcpAllowedTools: blitframeTools},
RequireApproval: responses.ToolMcpRequireApprovalUnionParam{OfMcpToolApprovalSetting: openai.String("never")},
}}},
Input: responses.ResponseNewParamsInputUnion{OfString: openai.String("List my Blitframe projects and render the newest one as an MP4.")},
})
if err != nil {
panic(err)
}
fmt.Println(response.OutputText())
}
#pragma warning disable OPENAI001
using OpenAI.Responses;
var blitframeTools = new McpToolFilter
{
ToolNames =
{
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders",
},
};
var client = new ResponsesClient(Environment.GetEnvironmentVariable("OPENAI_API_KEY"));
var options = new CreateResponseOptions("gpt-6.2-sol",
[ResponseItem.CreateUserMessageItem("List my Blitframe projects and render the newest one as an MP4.")]);
options.Tools.Add(ResponseTool.CreateMcpTool(
serverLabel: "blitframe",
serverUri: new Uri("https://blitframe.codeartworks.com/mcp"),
headers: new Dictionary<string, string> { ["Authorization"] = $"Bearer {Environment.GetEnvironmentVariable("BLITFRAME_API_KEY")}" },
allowedTools: blitframeTools,
toolCallApprovalPolicy: new McpToolCallApprovalPolicy(DefaultMcpToolCallApprovalPolicy.NeverRequireApproval)));
ResponseResult response = await client.CreateResponseAsync(options);
Console.WriteLine(response.GetOutputText());
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.core.JsonValue;
import com.openai.models.ChatModel;
import com.openai.models.responses.Response;
import com.openai.models.responses.ResponseCreateParams;
import com.openai.models.responses.Tool;
import java.util.List;
public class Example {
static final List<String> BLITFRAME_TOOLS = List.of(
"list_projects", "get_project", "list_versions", "get_version", "read_file", "inspect_layers",
"list_fonts", "read_data_json_reference", "read_docs", "get_usage",
"create_project", "edit_project", "render", "get_render", "list_renders");
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
ResponseCreateParams params = ResponseCreateParams.builder()
.model(ChatModel.GPT_6_2_SOL)
.addTool(Tool.Mcp.builder()
.serverLabel("blitframe")
.serverUrl("https://blitframe.codeartworks.com/mcp")
.headers(Tool.Mcp.Headers.builder()
.putAdditionalProperty("Authorization", JsonValue.from("Bearer " + System.getenv("BLITFRAME_API_KEY")))
.build())
.allowedToolsOfMcp(BLITFRAME_TOOLS)
.requireApproval(Tool.Mcp.RequireApproval.McpToolApprovalSetting.NEVER)
.build())
.input("List my Blitframe projects and render the newest one as an MP4.")
.build();
Response response = client.responses().create(params);
response.output().forEach(item -> item.message().ifPresent(message ->
message.content().forEach(content -> content.outputText().ifPresent(text -> System.out.print(text.text())))));
System.out.println();
}
}
allowed_tools limits the model to the tools in the list. Setting require_approval to never lets the model call them without asking. To have a person confirm each call, leave approvals on.
Choose the tools
An allowlist is the list of tools you let the model call. The tools in the examples above are a good start: they read, change and render projects, and none of them deletes a project or makes a video public.
| Tools | What they let the agent do |
|---|---|
list_projects, get_project, list_versions, get_version, read_file, inspect_layers |
Find a project and read it |
list_fonts, read_data_json_reference, read_docs, get_usage |
Pick fonts, read the docs and check the balance |
create_project, edit_project, render, get_render, list_renders |
Make a project, change it and render it |
Leave out every delete_ and cancel_ tool, create_render_link, the webhook tools and revoke_api_key, unless your app asks a person before the agent uses one. The Agent reference lists every tool.
Write your own MCP client
Your code can also call the MCP server itself, without a model provider in between, as Check the connection does. This is what it needs to know.
Results and errors
A tool call returns one of these:
| Result | What it looks like |
|---|---|
| Success | JSON in structuredContent, and the same JSON as text. A list is { "items": [...], "next": ... }, where next is null on the last page. |
| Text tools | read_file, read_data_json_reference, and read_docs with a page return plain text. |
| Failure | isError: true, with text that starts with the error code, such as head_moved: .... |
| Wrong argument | An unknown argument or a bad value fails with invalid_request. An argument that can't be read as its type fails with invalid_arguments. Unknown fields nested inside an argument are ignored. |
Each tool carries hints that say what kind of action it is. A client can use them to decide when to ask you first:
| Hint | Tools |
|---|---|
readOnlyHint |
Tools that only read |
destructiveHint |
Tools that delete or cancel, update_webhook, rotate_webhook_secret and revoke_api_key |
create_render_link and create_webhook carry neither hint, though one publishes a video and the other sends events to a new address. The server's instructions tell the agent to confirm both with you first.
Protocol details
| Item | Value |
|---|---|
| Transport | Streamable HTTP, POST only, with no session. |
| Protocol versions | 2026-07-28, including server/ and per-request protocol metadata. Also 2025-11-25 and 2025-06-18, through initialize. |
| Capabilities | Tools and resources |
| Authorization | The MCP authorization specification. A request without credentials gets 401, and its WWW-Authenticate header points to the server's protected resource metadata. |
| Browser requests | A request whose Origin header names another site gets 403 with a JSON-RPC error. |
| Server failure | JSON-RPC error -32603 with HTTP 500. Send the request again. |
| Other JSON-RPC errors | -32700: the body is not valid JSON (HTTP 400). -32600: not one JSON-RPC request object, or an id that is not a string or a number. -32601: an unknown method. -32602: an unknown tool, or a tools/ without a tool name or with arguments that is not an object. A missing or wrong tool argument is a tool failure instead. -32020: a protocol header that does not match the request. -32022: a protocol version the server does not support. |
| Request size | A body over 64 MB gets 413 too_large. A workspace sends one body over 1 MB at a time. Each must arrive within two minutes of its turn, or it gets 408 too_slow. |