clutter-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +70 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +215 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Clutter
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# clutter-mcp — Clutter MCP server
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) **stdio** server that lets an AI agent
|
|
4
|
+
drive the whole [Clutter](https://clutter.run) pipeline — invent a believable synthetic company,
|
|
5
|
+
mass-produce the documents, spreadsheets, emails, images and datasets it would really have, poll for
|
|
6
|
+
completion, and fetch download URLs — through Clutter's public REST API, authenticated with an API key.
|
|
7
|
+
|
|
8
|
+
Use it to fill dev/test/demo systems (SharePoint, CRMs, file shares) with realistic content, or to
|
|
9
|
+
give an agent believable data to reason over — without using real data.
|
|
10
|
+
|
|
11
|
+
It's a thin HTTPS client with **no dependency on the rest of the Clutter codebase**.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
1. Create a free account at **https://clutter.run**, open **Settings**, and mint an API key
|
|
16
|
+
(`clt_live_…`, shown once).
|
|
17
|
+
2. Add the server to your MCP client config (Claude Code, Claude Desktop, etc.):
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"clutter": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "clutter-mcp"],
|
|
25
|
+
"env": {
|
|
26
|
+
"CLUTTER_API_KEY": "clt_live_…"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
That's it — `CLUTTER_API_URL` defaults to `https://clutter.run/api`, so only the key is required.
|
|
34
|
+
|
|
35
|
+
## Configuration
|
|
36
|
+
|
|
37
|
+
| Env var | Required | Default | Notes |
|
|
38
|
+
| ----------------- | -------- | ------------------------- | ---------------------------------------------- |
|
|
39
|
+
| `CLUTTER_API_KEY` | yes | — | `clt_live_…` key (web app → **Settings**) |
|
|
40
|
+
| `CLUTTER_API_URL` | no | `https://clutter.run/api` | Override only to target another deployment |
|
|
41
|
+
|
|
42
|
+
## Run directly
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
CLUTTER_API_KEY=clt_live_… npx -y clutter-mcp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Typical agent flow
|
|
49
|
+
|
|
50
|
+
1. `build_org` — describe a company in a sentence → returns an `orgId` (omit `projectId` to
|
|
51
|
+
auto-create a project). Free.
|
|
52
|
+
2. `wait_for_org` — block until the company build is `ready`.
|
|
53
|
+
3. `create_run` — generate content against the company:
|
|
54
|
+
- `doc_generator` → a batch of documents (`docx`/`pdf`/`xlsx`/`eml`/`jpg`), folder-organised.
|
|
55
|
+
- `data_generator` → one tabular dataset (`xlsx`/`csv`/`json`) with an exact row count.
|
|
56
|
+
- `doc_metadata_gen` → one metadata record per document of a prior doc run.
|
|
57
|
+
4. `wait_for_run` — block until the run is `complete`.
|
|
58
|
+
5. `list_run_documents` + `get_document_url`, or `build_zip` + `get_zip_url` for the whole run as a
|
|
59
|
+
single ZIP (folder tree preserved — ready to drop into SharePoint or a file share).
|
|
60
|
+
|
|
61
|
+
## Tools
|
|
62
|
+
|
|
63
|
+
- **Identity / usage:** `clutter_whoami`, `get_usage`
|
|
64
|
+
- **Projects:** `list_projects`, `create_project`
|
|
65
|
+
- **Companies:** `list_orgs`, `build_org`, `get_org`, `wait_for_org`, `query_org`, `delete_org`
|
|
66
|
+
- **Runs:** `list_runs`, `create_run`, `get_run`, `wait_for_run`, `list_run_documents`,
|
|
67
|
+
`get_document_url`, `build_zip`, `get_zip_url`, `delete_run`
|
|
68
|
+
|
|
69
|
+
`build_org` and `create_run` are asynchronous (return an id immediately); use the `wait_for_*` tools
|
|
70
|
+
to block until a terminal state, or poll `get_org` / `get_run`. Each tool maps to a REST endpoint and
|
|
71
|
+
returns the raw JSON response.
|
|
72
|
+
|
|
73
|
+
## Billing
|
|
74
|
+
|
|
75
|
+
Company builds, metadata and "ask the company" are free. New accounts get 10 free documents + 100
|
|
76
|
+
free data rows, then pay-as-you-go ($0.10/document, $0.06/10 data rows). A `402` from `create_run`
|
|
77
|
+
means insufficient credit — top up at https://clutter.run/billing.
|
|
78
|
+
|
|
79
|
+
## Reference
|
|
80
|
+
|
|
81
|
+
Full REST API: **https://clutter.run/api/docs** (Swagger UI) · machine-readable guide:
|
|
82
|
+
**https://clutter.run/llms.txt**
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
MIT
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class ClutterClient {
|
|
2
|
+
private readonly base;
|
|
3
|
+
private readonly key;
|
|
4
|
+
constructor(baseUrl: string, apiKey: string);
|
|
5
|
+
static fromEnv(): ClutterClient;
|
|
6
|
+
request(method: string, path: string, body?: unknown): Promise<unknown>;
|
|
7
|
+
get(path: string): Promise<unknown>;
|
|
8
|
+
post(path: string, body?: unknown): Promise<unknown>;
|
|
9
|
+
del(path: string): Promise<unknown>;
|
|
10
|
+
}
|
|
11
|
+
export declare class ClutterApiError extends Error {
|
|
12
|
+
status: number;
|
|
13
|
+
data?: unknown | undefined;
|
|
14
|
+
constructor(status: number, message: string, data?: unknown | undefined);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AASA,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;gBAEjB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK3C,MAAM,CAAC,OAAO,IAAI,aAAa;IAOzB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAqB7E,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAGnC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAGpD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGpC;AAED,qBAAa,eAAgB,SAAQ,KAAK;IAE/B,MAAM,EAAE,MAAM;IAEd,IAAI,CAAC,EAAE,OAAO;gBAFd,MAAM,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACR,IAAI,CAAC,EAAE,OAAO,YAAA;CAIxB"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny REST client for the Clutter API, used by the MCP server. Deliberately has NO dependency on
|
|
3
|
+
* @clutter/core — the MCP server is a standalone process an AI agent runs locally, talking to the
|
|
4
|
+
* deployed API over HTTPS with an API key. Configured from env:
|
|
5
|
+
* CLUTTER_API_URL base URL including the /api prefix. Defaults to https://clutter.run/api
|
|
6
|
+
* (the public deployment); override only to target another deployment.
|
|
7
|
+
* CLUTTER_API_KEY a clt_live_… key minted in the web app (Settings) or POST /api-keys (required).
|
|
8
|
+
*/
|
|
9
|
+
const DEFAULT_API_URL = "https://clutter.run/api";
|
|
10
|
+
export class ClutterClient {
|
|
11
|
+
base;
|
|
12
|
+
key;
|
|
13
|
+
constructor(baseUrl, apiKey) {
|
|
14
|
+
this.base = baseUrl.replace(/\/+$/, "");
|
|
15
|
+
this.key = apiKey;
|
|
16
|
+
}
|
|
17
|
+
static fromEnv() {
|
|
18
|
+
const base = process.env.CLUTTER_API_URL || DEFAULT_API_URL;
|
|
19
|
+
const key = process.env.CLUTTER_API_KEY;
|
|
20
|
+
if (!key)
|
|
21
|
+
throw new Error("CLUTTER_API_KEY is not set (mint one in the web app → Settings)");
|
|
22
|
+
return new ClutterClient(base, key);
|
|
23
|
+
}
|
|
24
|
+
async request(method, path, body) {
|
|
25
|
+
const res = await fetch(`${this.base}${path}`, {
|
|
26
|
+
method,
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: `Bearer ${this.key}`,
|
|
29
|
+
...(body !== undefined ? { "Content-Type": "application/json" } : {}),
|
|
30
|
+
},
|
|
31
|
+
...(body !== undefined ? { body: JSON.stringify(body) } : {}),
|
|
32
|
+
});
|
|
33
|
+
const text = await res.text();
|
|
34
|
+
const data = text ? safeJson(text) : undefined;
|
|
35
|
+
if (!res.ok) {
|
|
36
|
+
const detail = data && typeof data === "object" && "error" in data
|
|
37
|
+
? String(data.error)
|
|
38
|
+
: res.statusText;
|
|
39
|
+
throw new ClutterApiError(res.status, detail, data);
|
|
40
|
+
}
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
get(path) {
|
|
44
|
+
return this.request("GET", path);
|
|
45
|
+
}
|
|
46
|
+
post(path, body) {
|
|
47
|
+
return this.request("POST", path, body ?? {});
|
|
48
|
+
}
|
|
49
|
+
del(path) {
|
|
50
|
+
return this.request("DELETE", path);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export class ClutterApiError extends Error {
|
|
54
|
+
status;
|
|
55
|
+
data;
|
|
56
|
+
constructor(status, message, data) {
|
|
57
|
+
super(`HTTP ${status}: ${message}`);
|
|
58
|
+
this.status = status;
|
|
59
|
+
this.data = data;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function safeJson(text) {
|
|
63
|
+
try {
|
|
64
|
+
return JSON.parse(text);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return text;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAClD,MAAM,OAAO,aAAa;IACP,IAAI,CAAS;IACb,GAAG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in/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { ClutterApiError, ClutterClient } from "./client.js";
|
|
6
|
+
/**
|
|
7
|
+
* Clutter MCP server (Phase 6). A stdio MCP server that lets an AI agent drive the whole Clutter
|
|
8
|
+
* pipeline — create a project, build a synthetic org, generate documents/data/metadata, poll for
|
|
9
|
+
* completion, and fetch download URLs — by calling the public REST API with an API key.
|
|
10
|
+
*
|
|
11
|
+
* Run it from any MCP client (Claude Desktop/Code, etc.) with:
|
|
12
|
+
* CLUTTER_API_URL=https://<host>/api CLUTTER_API_KEY=clt_live_… clutter-mcp
|
|
13
|
+
*
|
|
14
|
+
* Each tool maps 1:1 to a REST endpoint and returns the raw JSON response as text. The async
|
|
15
|
+
* contract is exposed both as raw poll tools (get_org/get_run) and as convenience waiters
|
|
16
|
+
* (wait_for_org/wait_for_run) that block until a terminal state so an agent needn't hand-roll a loop.
|
|
17
|
+
*/
|
|
18
|
+
const client = ClutterClient.fromEnv();
|
|
19
|
+
const server = new McpServer({ name: "clutter", version: "1.0.0" });
|
|
20
|
+
const ok = (data) => ({
|
|
21
|
+
content: [{ type: "text", text: typeof data === "string" ? data : JSON.stringify(data, null, 2) }],
|
|
22
|
+
});
|
|
23
|
+
const fail = (message) => ({
|
|
24
|
+
content: [{ type: "text", text: message }],
|
|
25
|
+
isError: true,
|
|
26
|
+
});
|
|
27
|
+
/** Wrap a tool body so any API/network error becomes a clean isError result the agent can read. */
|
|
28
|
+
function tool(name, config, run) {
|
|
29
|
+
server.registerTool(name, config, async (args) => {
|
|
30
|
+
try {
|
|
31
|
+
return ok(await run(args));
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
if (err instanceof ClutterApiError) {
|
|
35
|
+
return fail(`Clutter API error (${err.status}): ${err.message}`);
|
|
36
|
+
}
|
|
37
|
+
return fail(`Error: ${err.message}`);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const enc = encodeURIComponent;
|
|
42
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
43
|
+
// ---- Identity + usage ----
|
|
44
|
+
tool("clutter_whoami", {
|
|
45
|
+
title: "Who am I",
|
|
46
|
+
description: "Return the authenticated Clutter user for the configured API key.",
|
|
47
|
+
inputSchema: {},
|
|
48
|
+
}, () => client.get("/me"));
|
|
49
|
+
tool("get_usage", {
|
|
50
|
+
title: "Get API usage",
|
|
51
|
+
description: "Your Clutter API usage (request counts by route) over a rolling window + the daily quota.",
|
|
52
|
+
inputSchema: { windowHours: z.number().int().min(1).max(720).optional() },
|
|
53
|
+
}, (a) => client.get(`/usage${a.windowHours ? `?windowHours=${a.windowHours}` : ""}`));
|
|
54
|
+
// ---- Projects ----
|
|
55
|
+
tool("list_projects", {
|
|
56
|
+
title: "List projects",
|
|
57
|
+
description: "List all of your Clutter projects (top-level tenant containers).",
|
|
58
|
+
inputSchema: {},
|
|
59
|
+
}, () => client.get("/projects"));
|
|
60
|
+
tool("create_project", {
|
|
61
|
+
title: "Create project",
|
|
62
|
+
description: "Create a new Clutter project. Returns the project (with its id).",
|
|
63
|
+
inputSchema: { name: z.string().min(1).max(200) },
|
|
64
|
+
}, (a) => client.post("/projects", { name: a.name }));
|
|
65
|
+
// ---- Organisations ----
|
|
66
|
+
tool("list_orgs", {
|
|
67
|
+
title: "List organisations",
|
|
68
|
+
description: "List the synthetic organisations in a project.",
|
|
69
|
+
inputSchema: { projectId: z.string() },
|
|
70
|
+
}, (a) => client.get(`/orgs?projectId=${enc(String(a.projectId))}`));
|
|
71
|
+
tool("build_org", {
|
|
72
|
+
title: "Build organisation (async)",
|
|
73
|
+
description: "Start building a synthetic organisation from a prompt. Returns 202 with an orgId. The build " +
|
|
74
|
+
"runs in the background (minutes) — then poll get_org, or call wait_for_org to block until ready. " +
|
|
75
|
+
"Omit projectId to auto-create a project (named after the generated company) — the simplest path.",
|
|
76
|
+
inputSchema: {
|
|
77
|
+
prompt: z.string().min(1),
|
|
78
|
+
projectId: z.string().optional().describe("Existing project to build into; OMIT to auto-create one"),
|
|
79
|
+
projectName: z.string().max(200).optional().describe("Name for the auto-created project (optional)"),
|
|
80
|
+
locale_language: z.string().optional().describe("BCP-47, e.g. en-US"),
|
|
81
|
+
target_systems: z.array(z.string()).optional(),
|
|
82
|
+
ref_org_id: z.string().optional().describe("Build a variant FROM an existing org"),
|
|
83
|
+
web_search: z
|
|
84
|
+
.boolean()
|
|
85
|
+
.optional()
|
|
86
|
+
.describe("Use web search for real-world grounding (default true; set false to disable)"),
|
|
87
|
+
},
|
|
88
|
+
}, (a) => client.post("/orgs", {
|
|
89
|
+
prompt: a.prompt,
|
|
90
|
+
projectId: a.projectId,
|
|
91
|
+
projectName: a.projectName,
|
|
92
|
+
locale_language: a.locale_language,
|
|
93
|
+
target_systems: a.target_systems,
|
|
94
|
+
ref_org_id: a.ref_org_id,
|
|
95
|
+
web_search: a.web_search,
|
|
96
|
+
}));
|
|
97
|
+
tool("get_org", {
|
|
98
|
+
title: "Get organisation",
|
|
99
|
+
description: "Get an organisation including its full org.json structure. Check `org.status`.",
|
|
100
|
+
inputSchema: { orgId: z.string() },
|
|
101
|
+
}, (a) => client.get(`/orgs/${enc(String(a.orgId))}`));
|
|
102
|
+
tool("wait_for_org", {
|
|
103
|
+
title: "Wait for organisation build",
|
|
104
|
+
description: "Poll an org until its build reaches a terminal state (ready/failed) or the timeout. " +
|
|
105
|
+
"Returns the final org summary.",
|
|
106
|
+
inputSchema: {
|
|
107
|
+
orgId: z.string(),
|
|
108
|
+
timeoutSeconds: z.number().int().min(5).max(900).optional().describe("default 600"),
|
|
109
|
+
},
|
|
110
|
+
}, async (a) => {
|
|
111
|
+
const deadline = Date.now() + (Number(a.timeoutSeconds) || 600) * 1000;
|
|
112
|
+
for (;;) {
|
|
113
|
+
const res = (await client.get(`/orgs/${enc(String(a.orgId))}`));
|
|
114
|
+
const status = res?.org?.status;
|
|
115
|
+
if (status === "ready" || status === "failed")
|
|
116
|
+
return res;
|
|
117
|
+
if (Date.now() >= deadline)
|
|
118
|
+
return { timedOut: true, lastStatus: status, org: res?.org };
|
|
119
|
+
await sleep(5000);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
tool("query_org", {
|
|
123
|
+
title: "Query organisation",
|
|
124
|
+
description: "Ask a grounded natural-language question about an organisation (synchronous answer).",
|
|
125
|
+
inputSchema: {
|
|
126
|
+
orgId: z.string(),
|
|
127
|
+
message: z.string().min(1),
|
|
128
|
+
locale_language: z.string().optional(),
|
|
129
|
+
},
|
|
130
|
+
}, (a) => client.post(`/orgs/${enc(String(a.orgId))}/query`, {
|
|
131
|
+
message: a.message,
|
|
132
|
+
locale_language: a.locale_language,
|
|
133
|
+
}));
|
|
134
|
+
tool("delete_org", {
|
|
135
|
+
title: "Delete organisation",
|
|
136
|
+
description: "Delete an organisation and ALL its runs/artefacts (S3 + DB). Irreversible.",
|
|
137
|
+
inputSchema: { orgId: z.string() },
|
|
138
|
+
}, (a) => client.del(`/orgs/${enc(String(a.orgId))}`));
|
|
139
|
+
// ---- Runs ----
|
|
140
|
+
tool("list_runs", {
|
|
141
|
+
title: "List runs",
|
|
142
|
+
description: "List the generation runs under an organisation.",
|
|
143
|
+
inputSchema: { orgId: z.string() },
|
|
144
|
+
}, (a) => client.get(`/runs?orgId=${enc(String(a.orgId))}`));
|
|
145
|
+
tool("create_run", {
|
|
146
|
+
title: "Create generation run (async)",
|
|
147
|
+
description: "Launch a generation run. Returns 202 with a runId — poll get_run or call wait_for_run.\n" +
|
|
148
|
+
"kind + params:\n" +
|
|
149
|
+
"• doc_generator → { prompt, doc_number (≤300), file_types:[docx|pdf|xlsx|eml|jpg], " +
|
|
150
|
+
"structure:'flat'|'nested', target_system?, allow_underscores? }\n" +
|
|
151
|
+
"• data_generator → { prompt, row_count (≤2000), data_format:'xlsx'|'csv'|'json', data_fields?, target_system? }\n" +
|
|
152
|
+
"• doc_metadata_gen → { sourceRunId (a completed doc_generator run), data_format, data_fields?, target_system? }",
|
|
153
|
+
inputSchema: {
|
|
154
|
+
orgId: z.string(),
|
|
155
|
+
kind: z.enum(["doc_generator", "data_generator", "doc_metadata_gen"]),
|
|
156
|
+
params: z.record(z.unknown()).optional(),
|
|
157
|
+
},
|
|
158
|
+
}, (a) => client.post("/runs", { orgId: a.orgId, kind: a.kind, params: a.params ?? {} }));
|
|
159
|
+
tool("get_run", {
|
|
160
|
+
title: "Get run status",
|
|
161
|
+
description: "Get a run's status + progress counts. Poll this until status is terminal.",
|
|
162
|
+
inputSchema: { runId: z.string() },
|
|
163
|
+
}, (a) => client.get(`/runs/${enc(String(a.runId))}`));
|
|
164
|
+
tool("wait_for_run", {
|
|
165
|
+
title: "Wait for run",
|
|
166
|
+
description: "Poll a run until it reaches a terminal state (complete/partial/failed) or the timeout. " +
|
|
167
|
+
"Returns the final run status.",
|
|
168
|
+
inputSchema: {
|
|
169
|
+
runId: z.string(),
|
|
170
|
+
timeoutSeconds: z.number().int().min(5).max(900).optional().describe("default 600"),
|
|
171
|
+
},
|
|
172
|
+
}, async (a) => {
|
|
173
|
+
const deadline = Date.now() + (Number(a.timeoutSeconds) || 600) * 1000;
|
|
174
|
+
const terminal = new Set(["complete", "partial", "failed"]);
|
|
175
|
+
for (;;) {
|
|
176
|
+
const res = (await client.get(`/runs/${enc(String(a.runId))}`));
|
|
177
|
+
const status = res?.run?.status;
|
|
178
|
+
if (status && terminal.has(status))
|
|
179
|
+
return res;
|
|
180
|
+
if (Date.now() >= deadline)
|
|
181
|
+
return { timedOut: true, lastStatus: status, run: res?.run };
|
|
182
|
+
await sleep(5000);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
tool("list_run_documents", {
|
|
186
|
+
title: "List run documents",
|
|
187
|
+
description: "List the documents generated by a run (title, format, folderPath, status).",
|
|
188
|
+
inputSchema: { runId: z.string() },
|
|
189
|
+
}, (a) => client.get(`/runs/${enc(String(a.runId))}/documents`));
|
|
190
|
+
tool("get_document_url", {
|
|
191
|
+
title: "Get document download URL",
|
|
192
|
+
description: "Get a short-lived presigned download URL for a single generated document.",
|
|
193
|
+
inputSchema: { documentId: z.string() },
|
|
194
|
+
}, (a) => client.get(`/documents/${enc(String(a.documentId))}/url`));
|
|
195
|
+
tool("build_zip", {
|
|
196
|
+
title: "Build run ZIP (async)",
|
|
197
|
+
description: "Start building a single ZIP of all of a run's documents. Poll get_zip_url after.",
|
|
198
|
+
inputSchema: { runId: z.string() },
|
|
199
|
+
}, (a) => client.post(`/runs/${enc(String(a.runId))}/zip`));
|
|
200
|
+
tool("get_zip_url", {
|
|
201
|
+
title: "Get run ZIP URL",
|
|
202
|
+
description: "Get a presigned download URL for a run's ZIP (409 until the build is ready).",
|
|
203
|
+
inputSchema: { runId: z.string() },
|
|
204
|
+
}, (a) => client.get(`/runs/${enc(String(a.runId))}/zip/url`));
|
|
205
|
+
tool("delete_run", {
|
|
206
|
+
title: "Delete run",
|
|
207
|
+
description: "Delete a run and its artefacts (S3 + DB). Leaves the parent org intact. Irreversible.",
|
|
208
|
+
inputSchema: { runId: z.string() },
|
|
209
|
+
}, (a) => client.del(`/runs/${enc(String(a.runId))}`));
|
|
210
|
+
// ---- Boot ----
|
|
211
|
+
const transport = new StdioServerTransport();
|
|
212
|
+
await server.connect(transport);
|
|
213
|
+
// Stay alive on stdio; log to stderr so stdout remains a clean MCP channel.
|
|
214
|
+
process.stderr.write("clutter-mcp: connected (stdio)\n");
|
|
215
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC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,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/D,IAAI,CAAC,YAAY,EAAE;IACjB,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,uFAAuF;IACpG,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;CACnC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEvD,iBAAiB;AAEjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAChC,4EAA4E;AAC5E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "clutter-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for Clutter — let an AI agent generate believable synthetic companies, documents, data and metadata (e.g. to fill SharePoint or other test/demo systems) via the Clutter API.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"clutter",
|
|
9
|
+
"synthetic-data",
|
|
10
|
+
"test-data",
|
|
11
|
+
"dummy-data",
|
|
12
|
+
"synthetic-documents",
|
|
13
|
+
"sharepoint",
|
|
14
|
+
"ai-agent",
|
|
15
|
+
"llm"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://clutter.run",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://clutter.run"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/michaelhologram/clutter.git",
|
|
24
|
+
"directory": "packages/mcp"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"type": "module",
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"bin": {
|
|
30
|
+
"clutter-mcp": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc -b",
|
|
42
|
+
"dev": "tsx src/index.ts",
|
|
43
|
+
"start": "node dist/index.js",
|
|
44
|
+
"clean": "rm -rf dist *.tsbuildinfo",
|
|
45
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
49
|
+
"zod": "^3.23.8"
|
|
50
|
+
}
|
|
51
|
+
}
|