MCP server for your image library

Give Claude Desktop, Claude Code, or any host that speaks the Model Context Protocol one searchable home for your media. Upload or import any photo — yours or generated elsewhere — and your agent can find it again by the objects, colors, and scenes inside it, instead of hunting through folders. 31 tools — search, detections, assets, projects, generation, editing, cutouts, video, tasks — all backed by the same /v1 API documented at /docs.

Install

The quickest path is through the CLI nsp mcp downloads and runs the MCP server on first use, so this is the whole setup:

curl -fsSL https://nanostudiopro.com/cli/nsp -o /usr/local/bin/nsp && chmod +x /usr/local/bin/nsp
claude mcp add --scope user nanostudio nsp mcpbash

Or install the server as its own binary:

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. Refresh a cached copy with nsp mcp --update.

Sign in

nsp login   # optional — skip it and the first tool call signs you in from chatbash

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

Not signed in at all? Also fine — the first tool call starts a browser sign-in (RFC 8628 device flow) and hands the approval link to the agent. Approve it in the browser, tell the agent to retry, and the token is saved for next time.

Wire it up

Claude Desktop

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

{
  "mcpServers": {
    "nanostudio": {
      "command": "nsp",
      "args": ["mcp"]
    }
  }
}json

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

Claude Code

claude mcp add --scope user nanostudio 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).

Remote server — no install

The same tools are also hosted at https://nanostudiopro.com/api/mcp. Any MCP host that connects to a URL and can send an Authorization header works — nothing to download. In Claude Code:

claude mcp add --transport http --scope user nanostudio https://nanostudiopro.com/api/mcp \
  --header "Authorization: Bearer sk_sf_live_..."bash

Create the token in Settings · API Tokens or print an existing one with nsp token. The hosted server exposes the same tools minus the local-filesystem parameters (path, save_to), and project_id is always required.

OAuth hosts need no token at all: in a claude.ai or Claude Desktop custom connector, just paste https://nanostudiopro.com/api/mcp as the server URL — the host discovers the OAuth endpoints automatically, a browser window opens, and you approve the connection (choosing permissions and an optional daily credit cap) exactly like authorizing a device. Revoke it any time from Settings · Connected Apps.

Tools

Find

Every image — generated here or uploaded from anywhere — is scanned on the way in, so the agent can look things up by the objects, colors, and textures inside them rather than guessing at filenames.

ToolWrapsCostWhat it does
searchGET /v1/searchfreeFull-text + detection-aware search across assets and generations.
get_detectionsGET /v1/detections/{id}freeWhat the detection engine sees: items, colors, textures, bounding boxes, scene narrative.
list_generationsGET /v1/generationsfreeGenerations in a project.
list_assetsGET /v1/assetsfreeUploads and reference images.
list_favoritesGET /v1/generations?favoritefreeFavorited (hearted) photos in a project, newest first — the shots the user marked as best.
get_assetGET /v1/assets/{id}freeFetch asset metadata.

Add to the library

Not just images made here. Any local file or URL can come in, and the scan that makes it searchable runs on the way through.

ToolWrapsCostWhat it does
upload_assetPOST /v1/assets3 cr + storageUpload from local path or remote URL. The scan that makes it searchable is the 3 credits.
import_imagePOST /v1/generations/upload3 cr + storageImport a local or remote image into a project timeline (no generation). The 3 credits are the scan that makes it searchable.
scan_imagePOST /v1/scans3 crRun the detection scan on an image that was never scanned.
delete_assetDELETE /v1/assets/{id}free (destructive)Permanently delete. Description warns the model to confirm with the user.

Organize

One project per folder, resolved by name — so a repo's imagery stays separate and searchable on its own.

ToolWrapsCostWhat it does
resolve_projectGET+POST /v1/projectsfreeFind a project by name or create it — idempotent. Backs the one-project-per-folder convention.
list_projectsGET /v1/projectsfreeProjects, newest first.
create_projectPOST /v1/projectsfreeCreate a new project.
get_projectGET /v1/projects/{id}freeFetch one project.

Create and edit

The generation surface, filing straight into the library above.

ToolWrapsCostWhat it does
generate_imagePOST /v1/generations4–16 crGenerate. Returns the image inline so the model can see it.
restylePOST /v1/restylecreditsAI-edit an image: one-click product placement, item recolor/remove/add, merge, style transfer, plain-text edits.
cutoutPOST /v1/cutoutscreditsSubject cutout: transparent PNG, matte, and clean background plate.
get_cutoutGET /v1/cutouts/{id}freeFresh signed URLs for an existing cutout.
expand_imagePOST /v1/expandcreditsOutpaint to a bigger canvas / new aspect ratio.
upscale_imagePOST /v1/upscalecreditsRe-render at a higher resolution.
generate_videoPOST /v1/videos600+ crAnimate an image into a 5s/10s video (Kling). The priciest operation; deducted on completion.
get_videoGET /v1/videos/{task_id}freePoll a video job; returns signed video + preview URLs when done.

Account and tasks

Feature detection, budgeting, and the background-job surface.

ToolWrapsCostWhat it does
whoamiGET /v1/mefreeAuthenticated user, plan, credit balance.
get_metaGET /v1/metafreeServer version + capability flags for feature detection.
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_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.
retry_taskPOST /v1/tasks/{id}/retryfreeRetry a failed task.

search — the tool that makes the rest worth keeping

Most image tooling ends the moment a file is written. A week later the picture you need is in a downloads folder, a chat thread, or a repo nobody remembers, and remaking it is faster than finding it. That is the problem this server exists to remove.

Everything that enters the library — generated here, uploaded from disk, or pulled from a URL — runs through the same detection scan. The scan records the objects, colors, textures, and a scene narrative for each image, and search queries all of it. So an agent can ask for “the navy sneaker on concrete” and get the photo, without anyone having named the file well.

get_detections shows the same data for a single image — useful when you want the exact item names to pass to restyle, and free to call.

Searching your images from Claude Code covers the arguments, what to ask for, and why a search misses when it misses.

generate_image — the model sees what it made

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, cutout, and import_image resolve project_id when the model omits it: first from the nearest .nsp.json (walking up from the working directory), then from default_project_id in your credentials file. Set the global fallback with nsp use <id>.

To pin a repo to its own project, drop {"default_project_id":"prj_..."} in a .nsp.json at its root — or skip the file entirely and let the agent call resolve_project with the folder name to find-or-create one. One project per folder keeps every repo's imagery separate and searchable on its own.

Bring your whole library

The tools are not only for images generated here. import_image and upload_asset accept any local file or URL — drop in existing product shots, artwork, or brand imagery. Every import runs through the same detection scan that powers search: detected objects, colors, and textures become instantly searchable, and any imported image can be cut out, used as a generation reference, or organized into projects like everything else.

Importing your existing images covers which tool to use for what, where imports land, and what the scan costs.

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