Looks MCP Server

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.

Category
访问服务器

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 License: MIT Node Dependencies MCP

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 defaultlooks.create() returns a job handle immediately and looks.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 polling
  • looks.refine() — adjust a finished look without regenerating it from scratch
  • looks.describe() / looks.image() — natural-language description, and a rendered image of the look
  • Idempotency — pass idempotencyKey so a retried enqueue cannot double-charge
  • End-user attributionX-End-User-Id scopes 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 with offset will reach them
  • suppressed — cells were withheld under a k-anonymity floor, and paging will never reach them
  • sampled — 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:

  • surfaced and shown differ by roughly 10× — a generation stores ~40 SERP candidates and shows four. Use shown as 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选