MCP Server
MCP support is experimental as there are limited capablities in a sandbox.
How we use it currently
Publish that digram to objektGenerate an SVG diagram of XX and upload it to objektClaude generates the SVG, uploads it via upload_file with encoding: "raw" — the SVG source goes straight through as content, no base64 waste. You get back a permalink instantly.
This works for anything Claude can generate as text: SVG diagrams, HTML pages, CSS files, JSON data, Markdown docs. The content IS the payload — zero overhead.
Setup
pnpm add -g @objekt.sh/mcp-uploadClaude Desktop / Claude Code config
{
"mcpServers": {
"objekt": {
"command": "npx",
"args": ["-y", "@objekt.sh/mcp-upload"],
"env": {
"OBJEKT_API_KEY": "objekt_mcp_..."
}
}
}
}Get a free key at objekt.sh/mcp.
Node not found? (nvm / fnm users)
Claude Desktop launches MCP servers with a minimal $PATH that doesn't include version managers like nvm or fnm. If you see env: node: No such file or directory, add your node's bin directory to the PATH env:
# Run this to get your node bin directory:
echo "\"PATH\": \"$(dirname $(realpath $(which node))):/usr/local/bin:/usr/bin:/bin\""Then paste the output into your config:
{
"mcpServers": {
"objekt": {
"command": "npx",
"args": ["-y", "@objekt.sh/mcp-upload"],
"env": {
"OBJEKT_API_KEY": "objekt_mcp_...",
"PATH": "/Users/you/.../bin:/usr/local/bin:/usr/bin:/bin"
}
}
}
}Tools
| Tool | Description |
|---|---|
upload_file | Upload by host path, content (base64/raw), or generated text. |
upload_from_sandbox | Upload a file from a sandbox/container path directly. |
get_file | Get metadata for a previously uploaded file. |
get_pricing | Current storage tier pricing and limits. |
check_connection | Test egress to api.objekt.sh — diagnose sandbox network issues. |
get_version | Returns the installed MCP server version. |
upload_file
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | no | Absolute path on the host filesystem (e.g. /Users/you/photo.png). Works in Claude Code and Cursor. |
content | string | no | File content — base64 or raw UTF-8. |
content_type | string | no | MIME type (required with content). |
encoding | string | no | "base64" (default) or "raw". Use "raw" for SVG, HTML, CSS, JSON. |
name | string | no | Filename. Auto-detected from path. Required when using content. |
Provide either path or content + content_type.
upload_from_sandbox
| Parameter | Type | Required | Description |
|---|---|---|---|
sandbox_path | string | yes | Path inside the sandbox (e.g. /mnt/user-data/uploads/photo.png) |
name | string | no | Custom filename. |
Reads the file from the sandbox filesystem and uploads it directly. Requires api.objekt.sh in the domain allowlist (Settings → Capabilities → Domain Allowlist). Use check_connection to verify egress is working.
Best practices
Text formats — use raw encoding
SVG, HTML, CSS, JSON, Markdown — upload as encoding: "raw". No base64, no inflation, no wasted tokens.
{
"content": "<svg xmlns='http://www.w3.org/2000/svg'>...</svg>",
"content_type": "image/svg+xml",
"encoding": "raw",
"name": "architecture.svg"
}Binary formats — use base64
PNG, JPEG, WebP, GIF, PDF — must be base64-encoded. Inline content is capped at 500KB to avoid burning tokens. For larger files, use path mode instead.
Host files — use path
If you're in Claude Code or Cursor and the file is on your real filesystem:
{
"path": "/Users/you/Downloads/photo.png"
}Fastest option. Reads from disk, no encoding overhead.
Remote server (alternative)
For hosted agents and web-based MCP clients. Content is sent over the network via mcp-remote.
Server URL: https://mcp.objekt.sh/mcp
{
"mcpServers": {
"objekt": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://mcp.objekt.sh/mcp",
"--header", "Authorization: Bearer objekt_mcp_..."
]
}
}
}Same tools as the local server, but path mode is not available — use content + content_type only.
MCP Pricing
Due to environment contrains, The MCP interface requires an API key obtained from objekt.sh/mcp.
| Plan | Cost | Storage | Retention |
|---|---|---|---|
| Free | $0 | 25MB | 24 hours |
| Starter | $4 | 1GB | 30-day CDN cache |
| Pro | $8 | Unlimited fair use | 90-day CDN cache |
| Custom | DM @1a35e1 | Custom | Custom |
Environment variable
export OBJEKT_API_KEY=objekt_mcp_...Or pass via env in the config. For the remote server, use Authorization: Bearer header.
Check usage
curl -H "Authorization: Bearer objekt_mcp_..." \
https://keys.objekt.sh/keys/objekt_mcp_.../balanceSupported formats
JPEG, PNG, WebP, GIF, SVG, PDF — up to 5MB via path, 500KB via inline content.