Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

MCP Server

MCP support is experimental as there are limited capablities in a sandbox.

How we use it currently

Publish that digram to objekt
Generate an SVG diagram of XX and upload it to objekt

Claude 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-upload

Claude 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

ToolDescription
upload_fileUpload by host path, content (base64/raw), or generated text.
upload_from_sandboxUpload a file from a sandbox/container path directly.
get_fileGet metadata for a previously uploaded file.
get_pricingCurrent storage tier pricing and limits.
check_connectionTest egress to api.objekt.sh — diagnose sandbox network issues.
get_versionReturns the installed MCP server version.

upload_file

ParameterTypeRequiredDescription
pathstringnoAbsolute path on the host filesystem (e.g. /Users/you/photo.png). Works in Claude Code and Cursor.
contentstringnoFile content — base64 or raw UTF-8.
content_typestringnoMIME type (required with content).
encodingstringno"base64" (default) or "raw". Use "raw" for SVG, HTML, CSS, JSON.
namestringnoFilename. Auto-detected from path. Required when using content.

Provide either path or content + content_type.

upload_from_sandbox

ParameterTypeRequiredDescription
sandbox_pathstringyesPath inside the sandbox (e.g. /mnt/user-data/uploads/photo.png)
namestringnoCustom 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.

PlanCostStorageRetention
Free$025MB24 hours
Starter$41GB30-day CDN cache
Pro$8Unlimited fair use90-day CDN cache
CustomDM @1a35e1CustomCustom

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_.../balance

Supported formats

JPEG, PNG, WebP, GIF, SVG, PDF — up to 5MB via path, 500KB via inline content.