@aioproductoscom/mcp 0.6.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 +75 -0
- package/dist/client.js +99 -0
- package/dist/index.js +71 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AIITDEVELOPMENT DOO Novi Sad
|
|
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,75 @@
|
|
|
1
|
+
# ProductOS MCP · server
|
|
2
|
+
|
|
3
|
+
One MCP for your whole product. Manage the board, read your product brain +
|
|
4
|
+
analytics, and run the support inbox from your AI host — **Claude Code, Cursor,
|
|
5
|
+
Codex, or any MCP client** — all reasoning on **your own model subscription**
|
|
6
|
+
(BYOK; ProductOS never charges for the agent's compute). Thin and secret-free:
|
|
7
|
+
the only credential is your personal access token, which you paste into *your*
|
|
8
|
+
host's config.
|
|
9
|
+
|
|
10
|
+
## 1. Get a token
|
|
11
|
+
|
|
12
|
+
In ProductOS → **Settings → Tokens & Agents** → **Generate token**. Copy it
|
|
13
|
+
(shown once) — it looks like `pat_live_…`. The token acts as you, with your
|
|
14
|
+
access.
|
|
15
|
+
|
|
16
|
+
## 2. Connect
|
|
17
|
+
|
|
18
|
+
### Claude Code
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
claude mcp add productos -e PRODUCTOS_TOKEN=pat_live_… -- npx -y @aioproductoscom/mcp
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Cursor / Codex — `.mcp.json`
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"productos": {
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": ["-y", "@aioproductoscom/mcp"],
|
|
32
|
+
"env": { "PRODUCTOS_TOKEN": "pat_live_…" }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`PRODUCTOS_URL` defaults to `https://platform.aioproductos.com`; set it to point
|
|
39
|
+
at a self-hosted platform.
|
|
40
|
+
|
|
41
|
+
## Tools
|
|
42
|
+
|
|
43
|
+
| Tool | What it does |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `whoami` | the connected org + member |
|
|
46
|
+
| `pm_meta` | lists / statuses / members / features (resolve names → ids) |
|
|
47
|
+
| `list_tasks` | list tasks (filter by `status_id`, `list_id`) |
|
|
48
|
+
| `get_task` | one task + comments + assignees |
|
|
49
|
+
| `create_task` | new task; `feature_id` / `insight_id` link it to the spine |
|
|
50
|
+
| `update_task` | change status, priority, fields, assignees |
|
|
51
|
+
| `comment_on_task` | add a comment |
|
|
52
|
+
| `get_product_brain` | a grounded read-only snapshot of your product (revenue, accounts, web + product analytics, features, signals, open work) |
|
|
53
|
+
| `analyze_funnel` | build an ordered conversion funnel from your events (users per step, conversion, drop-off); omit steps to list available events |
|
|
54
|
+
| `get_retention` | weekly cohort retention — who comes back, week over week |
|
|
55
|
+
| `list_conversations` | the support-chat inbox (open threads, visitor, topic, status) |
|
|
56
|
+
| `get_conversation` | one support thread + its full message history |
|
|
57
|
+
| `reply_to_conversation` | reply to a visitor (**visible in their chat widget**, sent as you) |
|
|
58
|
+
| `add_note` | internal triage note on a conversation (never shown to the visitor) |
|
|
59
|
+
| `resolve_conversation` | mark a conversation resolved |
|
|
60
|
+
|
|
61
|
+
> For an assignable **coding teammate** (Backend / Frontend / Mobile / QA that
|
|
62
|
+
> opens PRs in your repo), install the separate
|
|
63
|
+
> [`@aioproductoscom/mcp-agent`](https://www.npmjs.com/package/@aioproductoscom/mcp-agent).
|
|
64
|
+
|
|
65
|
+
## Local build (until published to npm)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pnpm install
|
|
69
|
+
pnpm --filter @aioproductoscom/mcp build
|
|
70
|
+
```
|
|
71
|
+
Then point the host at the built binary instead of `npx`:
|
|
72
|
+
```json
|
|
73
|
+
{ "command": "node", "args": ["<repo>/packages/mcps/productos-pm/dist/index.js"],
|
|
74
|
+
"env": { "PRODUCTOS_TOKEN": "pat_live_…" } }
|
|
75
|
+
```
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Thin typed HTTP client over the platform's token-authed PM endpoints.
|
|
2
|
+
// Uses global fetch (Node 18+). The PAT is the only credential; nothing is stored.
|
|
3
|
+
export class PlatformClient {
|
|
4
|
+
baseUrl;
|
|
5
|
+
token;
|
|
6
|
+
constructor(baseUrl, token) {
|
|
7
|
+
this.baseUrl = baseUrl;
|
|
8
|
+
this.token = token;
|
|
9
|
+
}
|
|
10
|
+
async req(path, init) {
|
|
11
|
+
const res = await fetch(`${this.baseUrl}${path}`, {
|
|
12
|
+
...init,
|
|
13
|
+
headers: {
|
|
14
|
+
"Content-Type": "application/json",
|
|
15
|
+
Authorization: `Bearer ${this.token}`,
|
|
16
|
+
...(init?.headers ?? {}),
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const body = await res.text();
|
|
20
|
+
const json = body ? JSON.parse(body) : {};
|
|
21
|
+
if (!res.ok) {
|
|
22
|
+
const o = (json ?? {});
|
|
23
|
+
const msg = o.error ? `${o.error}${o.detail ? `: ${o.detail}` : ""}` : `HTTP ${res.status}`;
|
|
24
|
+
const e = new Error(msg);
|
|
25
|
+
e.status = res.status;
|
|
26
|
+
throw e;
|
|
27
|
+
}
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
whoami() {
|
|
31
|
+
return this.req("/api/me");
|
|
32
|
+
}
|
|
33
|
+
meta() {
|
|
34
|
+
return this.req("/api/pm/meta");
|
|
35
|
+
}
|
|
36
|
+
listTasks(q) {
|
|
37
|
+
const params = new URLSearchParams();
|
|
38
|
+
if (q.status_id)
|
|
39
|
+
params.set("status_id", q.status_id);
|
|
40
|
+
if (q.list_id)
|
|
41
|
+
params.set("list_id", q.list_id);
|
|
42
|
+
const qs = params.toString();
|
|
43
|
+
return this.req(`/api/pm/tasks${qs ? `?${qs}` : ""}`);
|
|
44
|
+
}
|
|
45
|
+
getTask(id) {
|
|
46
|
+
return this.req(`/api/pm/tasks/${encodeURIComponent(id)}`);
|
|
47
|
+
}
|
|
48
|
+
createTask(body) {
|
|
49
|
+
return this.req("/api/pm/tasks", { method: "POST", body: JSON.stringify(body) });
|
|
50
|
+
}
|
|
51
|
+
updateTask(id, body) {
|
|
52
|
+
return this.req(`/api/pm/tasks/${encodeURIComponent(id)}`, { method: "PATCH", body: JSON.stringify(body) });
|
|
53
|
+
}
|
|
54
|
+
comment(id, body) {
|
|
55
|
+
return this.req(`/api/pm/tasks/${encodeURIComponent(id)}/comments`, {
|
|
56
|
+
method: "POST",
|
|
57
|
+
body: JSON.stringify({ body }),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
brain(productId) {
|
|
61
|
+
const qs = productId ? `?product_id=${encodeURIComponent(productId)}` : "";
|
|
62
|
+
return this.req(`/api/me/brain${qs}`);
|
|
63
|
+
}
|
|
64
|
+
funnel(opts) {
|
|
65
|
+
const p = new URLSearchParams();
|
|
66
|
+
if (opts.productId)
|
|
67
|
+
p.set("product_id", opts.productId);
|
|
68
|
+
if (opts.window)
|
|
69
|
+
p.set("window", String(opts.window));
|
|
70
|
+
for (const s of opts.steps ?? [])
|
|
71
|
+
p.append("step", s);
|
|
72
|
+
const qs = p.toString();
|
|
73
|
+
return this.req(`/api/me/funnel${qs ? `?${qs}` : ""}`);
|
|
74
|
+
}
|
|
75
|
+
retention(opts) {
|
|
76
|
+
const p = new URLSearchParams();
|
|
77
|
+
if (opts.productId)
|
|
78
|
+
p.set("product_id", opts.productId);
|
|
79
|
+
if (opts.window)
|
|
80
|
+
p.set("window", String(opts.window));
|
|
81
|
+
const qs = p.toString();
|
|
82
|
+
return this.req(`/api/me/retention${qs ? `?${qs}` : ""}`);
|
|
83
|
+
}
|
|
84
|
+
listConversations(opts) {
|
|
85
|
+
const p = new URLSearchParams();
|
|
86
|
+
if (opts.productId)
|
|
87
|
+
p.set("product_id", opts.productId);
|
|
88
|
+
if (opts.status)
|
|
89
|
+
p.set("status", opts.status);
|
|
90
|
+
const qs = p.toString();
|
|
91
|
+
return this.req(`/api/me/inbox${qs ? `?${qs}` : ""}`);
|
|
92
|
+
}
|
|
93
|
+
getConversation(id) {
|
|
94
|
+
return this.req(`/api/me/inbox?conversation_id=${encodeURIComponent(id)}`);
|
|
95
|
+
}
|
|
96
|
+
inboxAction(body) {
|
|
97
|
+
return this.req("/api/me/inbox", { method: "POST", body: JSON.stringify(body) });
|
|
98
|
+
}
|
|
99
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/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 { PlatformClient } from "./client.js";
|
|
6
|
+
const token = process.env.PRODUCTOS_TOKEN;
|
|
7
|
+
const baseUrl = (process.env.PRODUCTOS_URL ?? "https://platform.aioproductos.com").replace(/\/$/, "");
|
|
8
|
+
if (!token) {
|
|
9
|
+
console.error("[productos] PRODUCTOS_TOKEN is required — generate one in ProductOS → Settings → Tokens & Agents.");
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
const client = new PlatformClient(baseUrl, token);
|
|
13
|
+
function text(data) {
|
|
14
|
+
return {
|
|
15
|
+
content: [
|
|
16
|
+
{ type: "text", text: typeof data === "string" ? data : JSON.stringify(data, null, 2) },
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const server = new McpServer({ name: "productos", version: "0.6.0" }, {
|
|
21
|
+
instructions: "You manage ProductOS PM tickets on behalf of the connected member — the board is the team's " +
|
|
22
|
+
"source of truth, so work precisely. Resolve names to ids with pm_meta before create_task / " +
|
|
23
|
+
"update_task; never guess an id. Link a task to the spine (feature_id / insight_id) whenever the " +
|
|
24
|
+
"context makes the connection real, so the work traces back to the why. Keep titles and " +
|
|
25
|
+
"descriptions concrete and scoped. Confirm what you changed in plain language, and claim only " +
|
|
26
|
+
"writes you actually made.",
|
|
27
|
+
});
|
|
28
|
+
server.tool("whoami", "Show the connected ProductOS identity (org, member).", {}, async () => text(await client.whoami()));
|
|
29
|
+
server.tool("pm_meta", "List the org's PM lists, statuses, members, and features — use to resolve names to ids before create/update.", {}, async () => text(await client.meta()));
|
|
30
|
+
server.tool("list_tasks", "List tasks in the org. Optional filters: status_id, list_id.", { status_id: z.string().optional(), list_id: z.string().optional() }, async (a) => text(await client.listTasks(a)));
|
|
31
|
+
server.tool("get_task", "Get one task with its comments and assignees.", { id: z.string() }, async (a) => text(await client.getTask(a.id)));
|
|
32
|
+
server.tool("create_task", "Create a task. Omitting list_id uses the org's first list. feature_id / insight_id link it to the ProductOS spine.", {
|
|
33
|
+
title: z.string(),
|
|
34
|
+
description: z.string().optional(),
|
|
35
|
+
priority: z.enum(["urgent", "high", "normal", "low"]).optional(),
|
|
36
|
+
list_id: z.string().optional(),
|
|
37
|
+
status_id: z.string().optional(),
|
|
38
|
+
feature_id: z.string().optional(),
|
|
39
|
+
insight_id: z.string().optional(),
|
|
40
|
+
assignee_member_ids: z.array(z.string()).optional(),
|
|
41
|
+
}, async (a) => text(await client.createTask(a)));
|
|
42
|
+
server.tool("update_task", "Update a task's fields (status, priority, title, description, feature, insight, assignees).", {
|
|
43
|
+
id: z.string(),
|
|
44
|
+
title: z.string().optional(),
|
|
45
|
+
description: z.string().nullable().optional(),
|
|
46
|
+
priority: z.enum(["urgent", "high", "normal", "low"]).nullable().optional(),
|
|
47
|
+
status_id: z.string().nullable().optional(),
|
|
48
|
+
feature_id: z.string().nullable().optional(),
|
|
49
|
+
insight_id: z.string().nullable().optional(),
|
|
50
|
+
assignee_member_ids: z.array(z.string()).optional(),
|
|
51
|
+
}, async ({ id, ...body }) => text(await client.updateTask(id, body)));
|
|
52
|
+
server.tool("comment_on_task", "Add a comment to a task.", { id: z.string(), body: z.string() }, async (a) => text(await client.comment(a.id, a.body)));
|
|
53
|
+
server.tool("get_product_brain", "Read a grounded, read-only snapshot of the org's product so YOU can reason about it on your own model: revenue + top paying accounts, web + product analytics, features, recent verbatim customer signals, and open work. Optional product_id; omit for the primary product. Returns the brain text plus the list of products you can ask about.", { product_id: z.string().optional() }, async (a) => text(await client.brain(a.product_id)));
|
|
54
|
+
server.tool("analyze_funnel", "Build a conversion funnel from the product's own events and reason over it on your model. Pass `steps` as an ordered list of event names (2+) to compute the funnel: distinct users per step, conversion, and drop-off. Omit `steps` to get the menu of available event names first. Optional product_id (defaults to the primary product) and window_days (default 30).", {
|
|
55
|
+
steps: z.array(z.string()).optional(),
|
|
56
|
+
product_id: z.string().optional(),
|
|
57
|
+
window_days: z.number().optional(),
|
|
58
|
+
}, async (a) => text(await client.funnel({ steps: a.steps, productId: a.product_id, window: a.window_days })));
|
|
59
|
+
server.tool("get_retention", "Weekly cohort retention for the product: users grouped by their first-seen week, with the share returning each week after. Optional product_id (defaults to the primary product) and window_days (default 56 = 8 weekly cohorts).", { product_id: z.string().optional(), window_days: z.number().optional() }, async (a) => text(await client.retention({ productId: a.product_id, window: a.window_days })));
|
|
60
|
+
server.tool("list_conversations", "List support-chat conversations in the inbox (open + snoozed by default; pass status='all' to include closed). Each has id, visitor, topic, status, and last activity. Optional product_id to scope to one product.", { product_id: z.string().optional(), status: z.enum(["all"]).optional() }, async (a) => text(await client.listConversations({ productId: a.product_id, status: a.status })));
|
|
61
|
+
server.tool("get_conversation", "Read one support conversation: the visitor + the full message thread (visitor, agent, and internal notes), oldest first.", { conversation_id: z.string() }, async (a) => text(await client.getConversation(a.conversation_id)));
|
|
62
|
+
server.tool("reply_to_conversation", "Send a reply into a support conversation. This message IS VISIBLE TO THE VISITOR in the chat widget — it goes out as you (the member who owns this token). Use add_note for internal triage you don't want the visitor to see.", { conversation_id: z.string(), body: z.string() }, async (a) => text(await client.inboxAction({ action: "reply", conversation_id: a.conversation_id, body: a.body })));
|
|
63
|
+
server.tool("add_note", "Add an INTERNAL note to a support conversation — visible only in the inbox, never to the visitor. Use to record triage, context, or a handoff for a human.", { conversation_id: z.string(), body: z.string() }, async (a) => text(await client.inboxAction({ action: "note", conversation_id: a.conversation_id, body: a.body })));
|
|
64
|
+
server.tool("resolve_conversation", "Mark a support conversation resolved (status='closed'). A later visitor message reopens it.", { conversation_id: z.string() }, async (a) => text(await client.inboxAction({ action: "resolve", conversation_id: a.conversation_id })));
|
|
65
|
+
async function main() {
|
|
66
|
+
await server.connect(new StdioServerTransport());
|
|
67
|
+
}
|
|
68
|
+
main().catch((err) => {
|
|
69
|
+
console.error("[productos] fatal:", err);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aioproductoscom/mcp",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "ProductOS MCP — manage tickets, read your product brain + analytics, and run the support inbox from Claude Code, Cursor, Codex, and any MCP host.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "AIITDEVELOPMENT DOO Novi Sad",
|
|
8
|
+
"homepage": "https://platform.aioproductos.com",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/businesstalksnetwork/productos.git",
|
|
12
|
+
"directory": "packages/mcps/productos-pm"
|
|
13
|
+
},
|
|
14
|
+
"bugs": { "url": "https://github.com/businesstalksnetwork/productos/issues" },
|
|
15
|
+
"keywords": [
|
|
16
|
+
"mcp",
|
|
17
|
+
"model-context-protocol",
|
|
18
|
+
"productos",
|
|
19
|
+
"claude",
|
|
20
|
+
"cursor",
|
|
21
|
+
"codex",
|
|
22
|
+
"project-management",
|
|
23
|
+
"product-management"
|
|
24
|
+
],
|
|
25
|
+
"bin": { "productos": "dist/index.js" },
|
|
26
|
+
"files": ["dist", "README.md"],
|
|
27
|
+
"engines": { "node": ">=18" },
|
|
28
|
+
"publishConfig": { "access": "public" },
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"prepublishOnly": "npm run build",
|
|
32
|
+
"start": "node dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
36
|
+
"zod": "^3.23.8"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.7.0",
|
|
40
|
+
"typescript": "^5.6.0"
|
|
41
|
+
}
|
|
42
|
+
}
|