Looks MCP Server
Exposes the Look API's analytics surface as MCP tools, enabling agents to query outfit generation and analytics data with proper semantics for suppressed, sampled, or truncated results.
README
@thelooks/sdk
Official TypeScript SDK for the Look API — outfit generation for a real venue, plus an analytics surface built around what it refuses to answer. Ships the client, the Model Context Protocol tool definitions, and the OpenAPI document, all generated from the server so none of them can drift from it.
npm install @thelooks/sdk
import { LookClient } from '@thelooks/sdk';
const look = new LookClient({ apiKey: process.env.LOOK_API_KEY! });
// Generation takes 50–80s, so it is async by design: enqueue, then wait.
const { jobId } = await look.looks.create({
message: 'dinner then drinks',
department: 'mens',
place: { name: 'Balthazar', place_id: 'ChIJ...' },
});
const result = await look.looks.wait(jobId);
Look starts with where. A place carrying a name, or a generalLocation, is required — the client throws before making a request if neither is present. Every call needs Authorization: Bearer sk_live_…; keys are minted per organisation and carry scopes, so a key reaches only the endpoints its scopes allow.
Generation
- Async by default —
looks.create()returns a job handle immediately andlooks.wait()polls to completion. Generation is 50–80s, so a synchronous contract would have been a lie looks.stream()— server-sent events for progress, instead of pollinglooks.refine()— adjust a finished look without regenerating it from scratchlooks.describe()/looks.image()— natural-language description, and a rendered image of the look- Idempotency — pass
idempotencyKeyso a retried enqueue cannot double-charge - End-user attribution —
X-End-User-Idscopes a call to one of your users without minting them a key
Analytics
Behind its own scope, analytics:read, deliberately not granted by looks:read. Reporting is treated as more sensitive than transactional access, not less.
const { data, meta } = await look.analytics.items({
from: '2026-06-01',
to: '2026-07-01', // EXCLUSIVE — the range is half-open [from, to)
granularity: 'day',
groupBy: ['brand'], // at most two dimensions
});
Read meta before you read data. Three independent flags; conflating them produces confidently wrong numbers:
truncated— more rows exist, and paging withoffsetwill reach themsuppressed— cells were withheld under a k-anonymity floor, and paging will never reach themsampled— the underlying read was capped, so every figure is a floor, not a total
A withheld cell is absent from the results — never a row with zero. Do not report a missing row as "no activity"; report it as withheld.
Two more things worth knowing before building a dashboard:
surfacedandshowndiffer by roughly 10× — a generation stores ~40 SERP candidates and shows four. Useshownas the exposure denominator, or every rate lands an order of magnitude too low- Place figures are declared intent — someone told us where they were going. Not foot traffic, not visits, not inferred presence. Please don't describe them as visitation
Check a query shape before spending budget on it. compatibility runs nothing and names the limit that would refuse it:
const check = await look.analytics.compatibility({
endpoint: 'places', from: '2026-06-01', to: '2026-07-01', granularity: 'hour',
});
// { compatible: false, reason: 'A `hour` query may span at most 7 days.', … }
Bulk export
const { exportId } = await look.analytics.createExport({
endpoint: 'items', from: '2026-06-01', to: '2026-07-01', format: 'csv',
});
const done = await look.analytics.getExport(exportId); // → { url, metaUrl }
Requires analytics:export. Exports run the same queries as the sync endpoints, so suppression and venue exclusion are not bypassed. JSON carries meta inside the payload; CSV has nowhere to put an envelope, so the flags arrive as a sidecar at metaUrl — without it, a CSV of suppressed demand is indistinguishable from a CSV of zero demand.
MCP
The analytics surface is also exposed as Model Context Protocol tools at POST /api/v1/mcp, on the same credential and scopes. The definitions ship here so an agent host can register them without a round trip:
import { ANALYTICS_TOOLS, findTool } from '@thelooks/sdk/mcp';
They are generated from the same source the server answers tools/list from, so they cannot drift from what the endpoint accepts.
Pass the descriptions through intact. They carry semantics no JSON schema can express — the surfaced/shown ratio, that a withheld cell is absent rather than zero, that place demand is declared intent. An agent that sees only the schema will state those wrongly, and state them fluently.
OpenAPI
import spec from '@thelooks/sdk/openapi.json' with { type: 'json' };
37 paths, generated from the same zod schemas the routes validate with, so the document cannot describe an API that does not exist.
Errors
import { LookApiError } from '@thelooks/sdk';
try {
await look.looks.create({ /* … */ });
} catch (err) {
if (err instanceof LookApiError) {
// isClient is true for 4xx — bad request, auth, scope. Retrying will not help.
console.error(err.status, err.type, err.message, err.isClient);
}
}
API surface
| Namespace | What it covers |
|---|---|
looks |
create, wait, get, refine, stream, describe, image |
analytics |
looks, items, places, users, compatibility, createExport, getExport |
shop |
search and browse |
closet, savedItems, savedLooks, photos, cart |
everything a user owns, saved, or is considering |
items |
the garments a generation produced |
places, locations, sessions |
venue and session context |
preferences |
body, sizes, fit, style |
keys |
mint, list and revoke API keys |
Licence
MIT. This licence covers the SDK; use of the Look API itself is governed by its terms of service.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.