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
| Setting | Value |
|---|---|
| Address | https://mcp.tarsana.io/sse |
| Transport | HTTP with server-sent events (SSE) |
| Header | X-Tarsana-Access-Token: an API access token |
| Header | X-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
| Tool | What it does | |
|---|---|---|
describe | Read | Get the full API description as JSON |
submit | Change | Submit a spec to build an image |
validate | Read | Check a spec without submitting it |
status | Read | See the status of a submission |
fetch | Read | Download a record of a submission |
attestation | Read | Get what you need to verify an image yourself |
audit | Read | Read your audit trail |
provision | Change | Install a built image on one of your servers |
create-server | Change | Create a server from your spec |
managed-servers | Read | List the servers Tarsana created for you |
servers | Read | List the servers in your cloud account that Tarsana did not create |
destroy-server | Destructive | Delete a server that Tarsana did not create |
decommission-server | Destructive | Decommission a server that Tarsana created |
install-command | Change | Get the one-line command that installs Tarsana on a server you have |
request-update | Change | Update a server to its newest release |
update-status | Read | See how a server's update went |
provider-credential | Read | Check whether your provider credential is stored |
set-provider-credential | Change | Store or replace your provider credential |
remove-provider-credential | Destructive | Remove your provider credential |
login | Session | Sign in and start a session |
logout | Session | End your session |
issue-access-token | Change | Create an API access token |
revoke-access-token | Destructive | Revoke an API access token |
list-access-tokens | Read | List your API access tokens |
signup | Change | Create your Tarsana account (an older way to start) |
complete-signup | Change | Finish creating your account (an older way to start) |
request-sign-in-link | Session | Email me a sign-in link |
complete-sign-in-link | Session | Sign in with the link we emailed you |
profile | Read | See your profile |
check-tenant-id | Read | Check a tenant ID |
create-tenant | Change | Create 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.
| Resource | Address | What it is |
|---|---|---|
| Image spec reference | https://docs.tarsana.io/spec.md | What 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 Schema | https://docs.tarsana.io/schemas/image-spec/v2.schema.json | The JSON Schema https://schemas.tarsana.io/image-spec/v2.schema.json every spec is checked against. |
| Minimal spec | https://docs.tarsana.io/specs/minimal.yaml | The smallest spec Tarsana builds: a hardened Ubuntu base with nothing added. Start here for an image you install packages and files into. |
| Minimal bootable spec | https://docs.tarsana.io/specs/minimal-bootable.yaml | The 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. |
| Prompt | Arguments | What it does |
|---|---|---|
write-an-image-spec | goal, tenant | Walks 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.