Tarsana docsDashboardMenu

MCP

Tarsana has a hosted MCP server, so an AI assistant or agent can use your Tarsana account directly. It offers one tool for every API operation, with the same name, the same arguments and the same answers.

Connect

SettingValue
Addresshttps://mcp.tarsana.io/sse
TransportHTTP with server-sent events (SSE)
HeaderX-Tarsana-Access-Token: an API access token
HeaderX-Tarsana-Tenant: your tenant ID

Create the access token with issue-access-token, as in step 5 of Build your first image. Give each client its own token, with a token_label that says which client it is, so that you can revoke one without the others.

Most MCP clients take a configuration like this one:

{
  "mcpServers": {
    "tarsana": {
      "type": "sse",
      "url": "https://mcp.tarsana.io/sse",
      "headers": {
        "X-Tarsana-Access-Token": "YOUR-ACCESS-TOKEN",
        "X-Tarsana-Tenant": "acme"
      }
    }
  }
}

Every request is checked against your access token before it reaches a tool. A request without a valid token is refused, and you get no tool list.

Call a tool

A tool takes the operation's parameters as arguments. A request body, such as a spec, is the body argument. For example:

{
  "method": "tools/call",
  "params": {
    "name": "status",
    "arguments": {
      "tenant": "acme",
      "submission": "sha256:cdff062988d4722b2ff052c97ebefb8b571858c493ce47b159df73b1c88809b1"
    }
  }
}

The answer is the same JSON the API returns. A refused call comes back as a tool result with isError set, and its text is the API's refusal, with the same error object, code and doc_url; see Errors.

Tools that only read have the read-only hint set, so your client can run them without asking you first. Tools that change something, and especially the ones marked Destructive, should be confirmed by you.

Tools

ToolWhat it does
describeReadGet the full API description as JSON
submitChangeSubmit a spec to build an image
validateReadCheck a spec without submitting it
statusReadSee the status of a submission
fetchReadDownload a record of a submission
attestationReadGet what you need to verify an image yourself
auditReadRead your audit trail
provisionChangeInstall a built image on one of your servers
create-serverChangeCreate a server from your spec
managed-serversReadList the servers Tarsana created for you
serversReadList the servers in your cloud account that Tarsana did not create
destroy-serverDestructiveDelete a server that Tarsana did not create
decommission-serverDestructiveDecommission a server that Tarsana created
install-commandChangeGet the one-line command that installs Tarsana on a server you have
request-updateChangeUpdate a server to its newest release
update-statusReadSee how a server's update went
provider-credentialReadCheck whether your provider credential is stored
set-provider-credentialChangeStore or replace your provider credential
remove-provider-credentialDestructiveRemove your provider credential
loginSessionSign in and start a session
logoutSessionEnd your session
issue-access-tokenChangeCreate an API access token
revoke-access-tokenDestructiveRevoke an API access token
list-access-tokensReadList your API access tokens
signupChangeCreate your Tarsana account (an older way to start)
complete-signupChangeFinish creating your account (an older way to start)
request-sign-in-linkSessionEmail me a sign-in link
complete-sign-in-linkSessionSign in with the link we emailed you
profileReadSee your profile
check-tenant-idReadCheck a tenant ID
create-tenantChangeCreate your tenant

Write a spec with your agent

The server also teaches your agent how to write a spec. Besides the tools, it offers these resources and one prompt. Each resource is the docs page or file at the same address, so your agent reads exactly what you read here.

ResourceAddressWhat it is
Image spec referencehttps://docs.tarsana.io/spec.mdWhat a spec is, every field it can hold, and what each problem validate reports means and how to fix it. Read this first.
Image spec JSON Schemahttps://docs.tarsana.io/schemas/image-spec/v2.schema.jsonThe JSON Schema https://schemas.tarsana.io/image-spec/v2.schema.json every spec is checked against.
Minimal spechttps://docs.tarsana.io/specs/minimal.yamlThe smallest spec Tarsana builds: a hardened Ubuntu base with nothing added. Start here for an image you install packages and files into.
Minimal bootable spechttps://docs.tarsana.io/specs/minimal-bootable.yamlThe minimal spec plus the kernel and boot packages a server needs to boot the image itself, placed on Hetzner Cloud. Start here for a server that installs and boots your image.
PromptArgumentsWhat it does
write-an-image-specgoal, tenantWalks you through writing a Tarsana image spec for a goal you describe: read the reference, start from a template, validate, repair each problem, and submit.

Ask your client for the write-an-image-spec prompt with your goal, for example "an Ubuntu server with nginx and my SSH key", and your tenant ID. Your agent then reads the reference, starts from a template, checks its spec with validate and repairs each problem from problem_details until the spec is valid. It asks you before it calls submit. See when your spec has a problem for what each problem says.

View this page as Markdown