briqbriq
MCP server

MCP tools

Every tool the briq MCP server exposes, with input, output and an example call.

The server lives at https://api.briq.cloud/mcp (Streamable HTTP, Authorization: Bearer bq_…). Tools mirror the REST API. Descriptions are written for models, not humans: they say when to use a tool, what to do after, and what it costs.

Every tool result about a briq ends with one line:

cost so far €0.01 · stops at 18:42

Ids are bq_…. Where a tool takes briq, it accepts the id.

briq_run

Create and start a briq, from an image or a recipe.

Input

FieldTypeNotes
image or recipestringExactly one. recipe names a cookbook entry
paramsobjectRecipe parameters, validated against the recipe schema
namestringDNS-safe, unique in the stack. Defaults to the recipe's briq name or the image name
stackstringStack name; created if missing, default stack otherwise
envobjectString values, or { "secret": "NAME" }
cmd, portsstring[], number[]
sizenano small medium largeMust be in the key's allowedSizes
ttl_minutesnumberDefault 60, capped by maxTtlMinutes
waitbooleanBlock until the healthcheck passes (recommended)

Output: id, state, internalHost, endpoints, recipe outputs (credentials), cost line.

Example

briq_run({ recipe: "postgres", params: { version: "16" }, wait: true })
→ running bq_7kq2m9x1p4ab · postgres:16 · small · cost so far €0.01 · stops at 18:42
  DATABASE_URL=postgres://postgres:••••••••@db.s1.internal:5432/app

briq_exec

Run a command in a briq and return its output.

Input: { briq, cmd: string[], timeout_ms?, stdin? }

Output: stdout, stderr, exit_code. Output is truncated to 32 KB with a pointer to briq_logs for the rest.

briq_exec({ briq: "bq_7kq2m9x1p4ab", cmd: ["psql", "-U", "postgres", "-c", "select count(*) from orders"] })
→ exit 0
  count
  -----
  1284
  cost so far €0.02 · stops at 18:42

briq_logs

Input: { briq, since?, limit? }. Output: log lines and a next cursor.

briq_logs({ briq: "bq_7kq2m9x1p4ab", limit: 50 })

briq_files_put / briq_files_get

Write or read a single file. Content is base64, capped at 5 MB in v0.

Input: { briq, path, content_base64 } / { briq, path }. Output: ok / content_base64.

briq_files_put({ briq: "bq_7kq2m9x1p4ab", path: "/seed.sql", content_base64: "aW5zZXJ0…" })
briq_exec({ briq: "bq_7kq2m9x1p4ab", cmd: ["psql", "-U", "postgres", "-f", "/seed.sql"] })

briq_expose

Publish a port on its own hostname. Input: { briq, port, mode? } with mode in public or token (the URL carries a secret the router enforces). Output: the public URL.

briq_expose({ briq: "bq_9a2fk3m8q1zt", port: 3000, mode: "token" })
→ https://api-s1.briq.run/?t=… · cost so far €0.04 · stops at 19:10

Public mode requires a card on file from v1.

briq_stop / briq_start / briq_destroy / briq_extend

Input: { briq }, plus minutes for briq_extend. Output: the new state (and the new stopsAt for extend).

briq_extend({ briq: "bq_7kq2m9x1p4ab", minutes: 30 })
→ running · cost so far €0.03 · stops at 19:12
briq_destroy({ briq: "bq_7kq2m9x1p4ab" })
→ destroyed · cost so far €0.03 · stops at 19:12

A briq also stops on its own after idleMinutes (default 60) with nothing touching it — every tool call above counts as activity and pushes that deadline back. A stopped briq keeps its disk and is not billed, and the next call that needs it running starts it again, so an agent that goes quiet stops paying without having to do anything and without having to handle an error when it comes back.

briq_expose turns the idle auto-stop off for that briq, because traffic to a public URL never reaches briq and would look like idleness. To hold a briq open for any other reason, pass idleMinutes: 0 to briq_run or briq_extend. Destroy when you are finished; the tool descriptions tell the model to.

briq_list / briq_status

Input: { stack? } / { briq }. Output: inventory with state, size, image, cost and stopsAt for each briq; endpoints and masked env for a single one.

briq_list({})
→ bq_7kq2m9x1p4ab  running  postgres:16      small  €0.03  stops 19:12
  bq_9a2fk3m8q1zt  running  acme/api:pr-412  small  €0.04  stops 19:10

briq_quota

Input: {}. Output: remaining daily spend, remaining concurrency, allowed sizes and registries for this key. Models use it to plan instead of retrying after a policy_violation.

briq_catalog

Input: { query? }. Output: recipes with their params (types, options, defaults) and outputs, so the model can choose one without reading the docs.

briq_catalog({ query: "vector" })
→ postgres  PostgreSQL. params: version (15|16|17, default 16), extensions ([pgvector]), size
            outputs: DATABASE_URL, PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE

Resources and prompts

  • Resource briq://recipes/<name>: the cookbook page for a recipe, as Markdown.
  • Prompt briq_getting_started: tells the model how to use the tools well. Create or reuse a stack, prefer recipes over raw images, pass wait: true, read the cost line, and always destroy what it created.

Transports

  • Streamable HTTP at https://api.briq.cloud/mcp with Authorization: Bearer bq_….
  • npx @briq/mcp: a stdio shim that proxies to the HTTP endpoint using BRIQ_API_KEY, for clients without remote MCP support.