Skip to main content
Glama

tensorart-mcp

An MCP server for the Tensor.Art TAMS API. It lets Claude (Claude Code, Claude Desktop, Cursor, any MCP client) generate images on Tensor.Art with any public checkpoint or your own private LoRA, run img2img and ComfyUI workflows, and estimate credits before spending them.

Unofficial project, not affiliated with Tensor.Art. It only uses the official, documented API (TAMS docs): no scraping of the website.

Before you start: TAMS is billed on its own

TAMS credits are separate from the tensor.art website subscription (Pro/Premium credits cannot be used through the API). TAMS gives 1,000 free credits on first login, then credits are prepaid (about $0.003 each; a 30-step image is usually 1–2 credits). Use estimate_credits to check before generating.

Related MCP server: Photo AI Studio MCP Server

Setup

  1. Sign in at tams.tensor.art and create an app. Note its endpoint and either an API key (Bearer) or the app id plus an RSA key pair:

    openssl genrsa -out private_key.pem 2048
    openssl rsa -in private_key.pem -pubout -out public_key.pem   # paste public_key.pem in the app settings
  2. Install:

    git clone https://github.com/giacomodiguida/tensorart-mcp && cd tensorart-mcp
    uv venv && uv pip install -e .
  3. Add it to your MCP client. Claude Code:

    claude mcp add tensorart --env TAMS_ENDPOINT=https://<your-app-endpoint> --env TAMS_API_KEY=<key> \
      -- /path/to/tensorart-mcp/.venv/bin/tensorart-mcp

    Claude Desktop (claude_desktop_config.json):

    {"mcpServers": {"tensorart": {
      "command": "/path/to/tensorart-mcp/.venv/bin/tensorart-mcp",
      "env": {"TAMS_ENDPOINT": "https://<your-app-endpoint>", "TAMS_APP_ID": "<app id>",
              "TAMS_PRIVATE_KEY_PATH": "/path/to/private_key.pem"}}}}

Variable

Meaning

TAMS_ENDPOINT

your app endpoint (default https://ap-east-1.tensorart.cloud)

TAMS_API_KEY

Bearer key (simple auth)

TAMS_API_KEY_FILE

path to a file containing the key (keeps it out of your MCP config)

TAMS_APP_ID + TAMS_PRIVATE_KEY_PATH

signed requests (TAMS-SHA256-RSA) instead of the key

TAMS_OUTPUT_DIR

where images are saved (default ~/Pictures/tensorart)

TAMS_DEFAULT_MODEL

checkpoint id used when a call has no model_id

Tools

Tool

What it does

generate_image

text-to-image; checkpoint + LoRAs (with access_key for private ones); waits and saves files

estimate_credits

cost of a text-to-image job without running it

image_to_image

uploads a local image and re-renders it

run_workflow

ComfyUI-style node map (classType / inputs)

run_workflow_template

a saved Tensor.Art workflow template with field values

get_job / cancel_job

status, images, cancel

get_model

info on a checkpoint or LoRA id

upload_image

upload a file, get a resource id

Model ids are the numbers in a model page URL (tensor.art/models/<id>). For a private model, copy the accessKey from its page and pass it (model_access_key, or access_key inside a LoRA item).

Example prompt for Claude: "Generate with tensorart: checkpoint 123…, LoRA 456… weight 1.0 access key …, 30 steps, CFG 4, 832×1216, prompt 'ohwx woman, mirror selfie…'".

Development

uv pip install -e ".[dev]" && .venv/bin/python -m pytest -q

MIT license.

Available Tools

9 tools
cancel_jobB

Cancel a pending or running job.

Inputs: job_id (required).

estimate_creditsA

Ask TAMS how many credits a text-to-image job would cost, without running it.

Inputs: prompt (required), count, loras, steps, +5 more.

generate_imageC

Text-to-image on Tensor.Art (TAMS).

model_id: checkpoint id (number from the model page URL). loras: list of {"id": "", "weight": 1.0, "access_key": ""}. model_access_key: for a private checkpoint. extra_diffusion: any additional DIFFUSION fields TAMS accepts (e.g. {"scheduleName": "simple", "guidance": 3.5}). With wait=True it polls until the job ends and saves the images locally.

Inputs: prompt (required), vae, seed, wait, +14 more.

get_jobC

Status of a job; with download=True saves its images locally.

Inputs: job_id (required), download.

get_modelB

Info on a model (checkpoint or LoRA) by id: type, base model, whether it can be used.

Inputs: model_id (required).

image_to_imageC

Image-to-image: uploads a local image and re-renders it with the prompt (and LoRA).

Inputs: prompt (required), image_path (required), seed, wait, +10 more.

run_workflowC

Run a ComfyUI-style workflow on TAMS. params is the node map {"": {"classType": "...", "inputs": {...}}}; private models need "access_key" in the loader inputs.

Inputs: params (required), wait, timeout_sec.

run_workflow_templateC

Run a saved Tensor.Art workflow template. fields: [{"nodeId": "27", "fieldName": "text", "fieldValue": "..."}].

Inputs: fields (required), template_id (required), wait, timeout_sec.

upload_imageA

Upload a local image to TAMS and return its resource id (for workflows or img2img).

Inputs: image_path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools target clearly distinct operations: generation (generate_image, image_to_image), workflow execution (run_workflow, run_workflow_template), and job/model management (get_job, cancel_job, get_model, upload_image, estimate_credits). The only mild overlap is run_workflow vs run_workflow_template, but descriptions distinguish raw node maps from saved templates.

    Naming Consistency4/5

    All names use snake_case and mostly follow a verb_noun pattern (get_job, generate_image, estimate_credits, run_workflow, cancel_job, get_model, upload_image). image_to_image is a noun-style domain term that slightly breaks the verb_noun convention, but it's conventional and readable.

    Tool Count5/5

    Nine tools is well within the ideal 3-15 range for an image-generation service. Each tool covers a distinct capability (generation, workflows, job control, model info, upload) without obvious redundancy.

    Completeness4/5

    The surface covers the core lifecycle: generate, img2img, workflows, job status/cancel, credit estimation, model info, and upload. The main gap is model/LoRA discovery—get_model requires a known id and there's no list/search tool—but agents can work around this with ids from the web UI.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers