# Setup

> Connect WorkLens to ChatGPT, Claude, Cursor, VS Code, Claude Desktop or Claude Code: the studio's Connect to AI panel, a config entry, or the hosted connector.

Section: MCP · Type: guide · Last updated: 2026-09-28

Press Connect to AI in the studio and follow the steps for your assistant; or add one config entry for a desktop client; or add the hosted connector to a web assistant. Desktop clients run everything locally; the hosted connector serves the recipe tools only.

## The picture

Checkout (npm install in apps/mcp-server) → Client config (one entry, or claude mcp add) → Tools appear (restart the client)

## How it works

1. From the studio: press Connect to AI, choose your assistant, and follow its steps. ChatGPT opens with the first message typed and your recipe on the clipboard. Claude opens a blank chat with both copied, to paste once.
2. Desktop clients run WorkLens locally. Cursor and VS Code install it from one link; Claude Desktop takes the config block; Claude Code takes `claude mcp add worklens -- npx -y worklens-mcp@0.9.0`. The tools appear after a restart, and everything — generation, packs, receipts — stays on your machine.
3. Web assistants (ChatGPT, Claude.ai) can only attach a remote server. Add the hosted connector, https://mcp.theworklens.com/mcp, in the connector settings. ChatGPT: Settings → Connectors → Advanced → Developer mode. Claude: Settings → Connectors → Add custom connector. Both need a paid plan.
4. The hosted connector serves get_recipe_schema, validate_recipe and plan_packs only. A recipe holds shape and rules, never real values, and generated data never touches the connector.
5. Self-hosting the connector: WORKLENS_MCP_REMOTE=1 npm run start:http behind TLS. Any other tool is refused with the local install instructions.
6. Ask the assistant to read your schema or repository and draft a recipe. It will call get_recipe_schema first, then validate_recipe; a desktop client then runs generate_from_graph here, and a web assistant hands the recipe back for the studio or the local server to run.
7. The next chat starts where the last one stopped: the local server offers worklens://last-run (the recipe, the files by hash, the lock, the verdict — never rows) and a `resume` prompt that reads it.

## What WorkLens does not check

- The server does not upload anything. What an assistant does with the metadata it receives is governed by that assistant’s own terms.
- The hosted connector validates a recipe in memory and stores nothing; what the assistant does with the recipe it sent is governed by that assistant’s own terms and plan.

## Desktop client config

```json
{
  "mcpServers": {
    "worklens": {
      "command": "npx",
      "args": ["-y", "worklens-mcp@0.9.0"]
    }
  }
}
```

From a checkout before the package is published: "command": "node", "args": ["/absolute/path/to/apps/mcp-server/src/index.mjs"].

## Claude Code

```bash
claude mcp add worklens -- npx -y worklens-mcp@0.9.0
claude mcp list
```

The VS Code extension reads the same registry, so one registration serves both.

## Web assistants — the hosted connector

```text
https://mcp.theworklens.com/mcp
```

Recipe tools only: get_recipe_schema, validate_recipe, plan_packs. Generation stays on your machine.

## Common questions

**Does the AI see my data?**

The engine reads your files for their shape, and the agent receives structure and metadata — table names, counts, the receipt, file paths. Generated rows stay on disk; the tool responses are metadata-first by design.

**Which assistants work?**

Any MCP client. The server is exercised with Claude Desktop, Cursor, Gemini CLI, Claude Code (terminal and VS Code) and, in HTTP mode, ChatGPT and other cloud clients that cannot spawn a local process.

**Can I use it from ChatGPT or Claude on the web?**

Yes, through the hosted connector at mcp.theworklens.com, which they attach in their connector settings (paid plans). It serves the recipe tools only: the assistant drafts and validates the recipe, and the data is generated on your machine by the studio or the local server. Nothing you generate reaches the connector, and it stores nothing.

**What does the hosted connector see?**

The recipe your assistant sends and the validator's answer. A recipe describes tables, columns and rules; real values are never written into it. It never sees your files, your packs, your generated data or your receipts.

## Related

- [Tool directory](https://theworklens.com/docs/mcp/tools): All 13 tools the WorkLens MCP server exposes, grouped by the step they belong to, generated from the published contracts.
- [Usage examples](https://theworklens.com/docs/mcp/examples): A real request for each MCP tool, taken from the published contract examples rather than written for the page.
- [Installation](https://theworklens.com/docs/cli/installation): How to run the WorkLens CLI today — from a checkout, with Node.js 18 or newer and no build step — and what changes when it is published.
- [Resources & prompts](https://theworklens.com/docs/mcp/resources): The 6 guide resources and 3 prompts the server publishes beside its tools, so an agent can read before it drafts.

_← Previous: [AI + WorkLens MCP](https://theworklens.com/docs/mcp) · Next: [Tool directory](https://theworklens.com/docs/mcp/tools) →_

_Canonical: https://theworklens.com/docs/mcp/setup · This copy: https://theworklens.com/docs/mcp/setup.md_
