MCP server

Drive Nano Studio Pro from Claude Desktop, Claude Code, or any host that speaks the Model Context Protocol. 17 tools — projects, generations, assets, tasks, search — all backed by the same /v1 API documented at /docs.

Install

curl -fsSL https://nanostudiopro.com/cli/mcp -o /usr/local/bin/nsp-mcp \
  && sudo chmod +x /usr/local/bin/nsp-mcpbash

Pure Node.js, zero dependencies, single file. Requires Node 18+. Inspect the source at https://nanostudiopro.com/cli/mcp before installing if you like.

Sign in

nsp login   # if you don't already have the CLI, install it from /docs/cli firstbash

The MCP server reads the same ~/.config/nsp/credentials.json the CLI writes — so one nsp login covers both. For headless use, set NANO_API_TOKEN:

NANO_API_TOKEN=sk_sf_live_... /usr/local/bin/nsp-mcpbash

Wire it up

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) and add:

{
  "mcpServers": {
    "nanostudio": {
      "command": "/usr/local/bin/nsp-mcp"
    }
  }
}json

Quit Claude Desktop fully and reopen. The nanostudio server appears in the MCP panel.

Claude Code

claude mcp add --scope user nanostudio /usr/local/bin/nsp-mcpbash

--scope user makes the server available in every project. Use --scope project to scope it to a single repo (writes a .mcp.json).

Tools

ToolWrapsCostWhat it does
whoamiGET /v1/mefreeAuthenticated user, plan, credit balance.
get_creditsGET /v1/account/creditsfreeWallet balance + token daily-cap status.
get_pricingGET /v1/pricingfreeCredit cost of every operation.
get_storageGET /v1/storagefreeStorage usage and quota.
list_projectsGET /v1/projectsfreeProjects, newest first.
create_projectPOST /v1/projectsfreeCreate a new project.
get_projectGET /v1/projects/{id}freeFetch one project.
generate_imagePOST /v1/generations4–16 crGenerate. Returns the image inline so the model can see it.
list_generationsGET /v1/generationsfreeGenerations in a project.
list_assetsGET /v1/assetsfreeUploads and reference images.
upload_assetPOST /v1/assetsstorageUpload from local path or remote URL.
get_assetGET /v1/assets/{id}freeFetch asset metadata.
delete_assetDELETE /v1/assets/{id}free (destructive)Permanently delete. Description warns the model to confirm with the user.
list_tasksGET /v1/tasksfreeBackground tasks (generations, scans, exports).
get_taskGET /v1/tasks/{id}freeStatus of a single task.
cancel_taskPOST /v1/tasks/{id}/cancelfreeStop a running task. Description warns to confirm.
searchGET /v1/searchfreeSemantic search across assets and generations.

generate_image — the headline tool

The biggest reason to use the MCP server over the CLI is that generate_image returns the rendered PNG as an inline MCP image content block. Your LLM literally sees what it generated and can critique, refine, or call the tool again with adjustments — without the user having to copy a file path back into chat.

If you also want the file on disk, pass save_to: "./gen.png" — the file is written and the image still streams back to the model.

Costs are surfaced in the tool description so the model can budget. After every call the response includes credits_remaining so the model knows when to back off.

Default project

generate_image and list_generations both resolve project_id from default_project_id in your credentials file if the model doesn't pass one. Set it from the CLI with nsp use <id> (or just run nsp gen once and pick interactively).

Prefer the terminal? The CLI has the same operations. Need the raw HTTP surface? The full API reference is one click away.