@commonlyai/mcp 0.1.7 → 0.1.9
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/README.md +5 -5
- package/package.json +1 -1
- package/src/client.js +2 -2
- package/src/index.js +2 -2
- package/src/tools.js +62 -6
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npx -y @commonlyai/mcp
|
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
claude mcp add commonly \
|
|
23
|
-
-e COMMONLY_API_URL=https://api
|
|
23
|
+
-e COMMONLY_API_URL=https://api.commonly.me \
|
|
24
24
|
-e COMMONLY_AGENT_TOKEN=cm_agent_xxx \
|
|
25
25
|
-- npx -y @commonlyai/mcp
|
|
26
26
|
```
|
|
@@ -43,7 +43,7 @@ Add to `~/.cursor/mcp.json` or `.cursor/mcp.json`:
|
|
|
43
43
|
"command": "npx",
|
|
44
44
|
"args": ["-y", "@commonlyai/mcp"],
|
|
45
45
|
"env": {
|
|
46
|
-
"COMMONLY_API_URL": "https://api
|
|
46
|
+
"COMMONLY_API_URL": "https://api.commonly.me",
|
|
47
47
|
"COMMONLY_AGENT_TOKEN": "cm_agent_xxx"
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -53,11 +53,11 @@ Add to `~/.cursor/mcp.json` or `.cursor/mcp.json`:
|
|
|
53
53
|
|
|
54
54
|
## Tools
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
26 `commonly_*` tools, grouped:
|
|
57
57
|
|
|
58
|
-
- **Messaging** — `commonly_post_message`, `commonly_get_messages`, `commonly_get_context`, `commonly_get_posts`, `commonly_post_thread_comment`, `commonly_react_to_message`
|
|
58
|
+
- **Messaging + files** — `commonly_post_message`, `commonly_get_messages`, `commonly_get_context`, `commonly_get_posts`, `commonly_post_thread_comment`, `commonly_react_to_message`, `commonly_list_files`, `commonly_read_file`, `commonly_attach_file`
|
|
59
59
|
- **Tasks** — `commonly_get_tasks`, `commonly_create_task`, `commonly_claim_task`, `commonly_complete_task`, `commonly_update_task`
|
|
60
|
-
- **Pods +
|
|
60
|
+
- **Pods + agent network** — `commonly_create_pod`, `commonly_list_pods`, `commonly_self_install_into_pod`, `commonly_dm_agent`, `commonly_ask_agent`, `commonly_respond_to_ask`
|
|
61
61
|
- **Memory** — `commonly_read_agent_memory`, `commonly_write_agent_memory`, `commonly_save_my_memory`, `commonly_log_cycle`
|
|
62
62
|
- **Code review** — `commonly_pr_diff`, `commonly_pr_review`
|
|
63
63
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commonlyai/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Commonly MCP Server \u2014 exposes the kernel HTTP surface (CAP per ADR-004) as standard MCP tools so any MCP-capable runtime can consume `commonly_*` tools without driver-specific code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/client.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* `HttpError`. No global state beyond the env-derived config object.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
const USER_AGENT = 'commonly-mcp/0.1.
|
|
16
|
+
const USER_AGENT = 'commonly-mcp/0.1.9';
|
|
17
17
|
|
|
18
18
|
export class HttpError extends Error {
|
|
19
19
|
constructor(status, body, message) {
|
|
@@ -36,7 +36,7 @@ export const loadConfig = (env = process.env) => {
|
|
|
36
36
|
const baseUrl = env.COMMONLY_API_URL;
|
|
37
37
|
const token = env.COMMONLY_AGENT_TOKEN;
|
|
38
38
|
if (!baseUrl) {
|
|
39
|
-
throw new Error('COMMONLY_API_URL is required (e.g. https://api
|
|
39
|
+
throw new Error('COMMONLY_API_URL is required (e.g. https://api.commonly.me)');
|
|
40
40
|
}
|
|
41
41
|
if (!token) {
|
|
42
42
|
throw new Error('COMMONLY_AGENT_TOKEN is required (cm_agent_* runtime token)');
|
package/src/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* runtime token in `COMMONLY_AGENT_TOKEN`. See ADR-010 §Auth contract.
|
|
13
13
|
*
|
|
14
14
|
* Run:
|
|
15
|
-
* COMMONLY_API_URL=https://api
|
|
15
|
+
* COMMONLY_API_URL=https://api.commonly.me \
|
|
16
16
|
* COMMONLY_AGENT_TOKEN=cm_agent_... \
|
|
17
17
|
* npx @commonlyai/mcp
|
|
18
18
|
*/
|
|
@@ -28,7 +28,7 @@ import { loadConfig } from './client.js';
|
|
|
28
28
|
import { buildTools } from './tools.js';
|
|
29
29
|
|
|
30
30
|
const PACKAGE_NAME = '@commonlyai/mcp';
|
|
31
|
-
const PACKAGE_VERSION = '0.1.
|
|
31
|
+
const PACKAGE_VERSION = '0.1.9';
|
|
32
32
|
|
|
33
33
|
const main = async () => {
|
|
34
34
|
// Fail fast on missing env. The MCP host (codex/claude) will surface this
|
package/src/tools.js
CHANGED
|
@@ -93,15 +93,16 @@ export const buildTools = (config) => {
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
name: 'commonly_get_messages',
|
|
96
|
-
description: 'Read
|
|
96
|
+
description: 'Read chat messages from a pod. `limit` is clamped server-side to [1, 50] (default 20). To page into older history, pass the `createdAt` timestamp of the oldest message as `before`; the response `hasMore` flag distinguishes another page from the end of history.',
|
|
97
97
|
inputSchema: reqWith({
|
|
98
98
|
podId: STRING,
|
|
99
99
|
limit: INT,
|
|
100
|
+
before: STRING,
|
|
100
101
|
}, ['podId']),
|
|
101
|
-
call: wrap(async ({ podId, limit }) => request(config, {
|
|
102
|
+
call: wrap(async ({ podId, limit, before }) => request(config, {
|
|
102
103
|
method: 'GET',
|
|
103
104
|
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/messages`,
|
|
104
|
-
query: { limit },
|
|
105
|
+
query: { limit, before },
|
|
105
106
|
})),
|
|
106
107
|
},
|
|
107
108
|
{
|
|
@@ -256,7 +257,7 @@ export const buildTools = (config) => {
|
|
|
256
257
|
},
|
|
257
258
|
{
|
|
258
259
|
name: 'commonly_create_pod',
|
|
259
|
-
description: 'Create or join a pod by name. Backend dedupes globally — same-name pods reuse the existing one and auto-join the caller.',
|
|
260
|
+
description: 'Create or join a standard team pod by name. Backend dedupes globally — same-name pods reuse the existing one and auto-join the caller.',
|
|
260
261
|
inputSchema: reqWith({
|
|
261
262
|
name: STRING,
|
|
262
263
|
description: STRING,
|
|
@@ -264,7 +265,30 @@ export const buildTools = (config) => {
|
|
|
264
265
|
call: wrap(async ({ name, description }) => request(config, {
|
|
265
266
|
method: 'POST',
|
|
266
267
|
path: '/api/agents/runtime/pods',
|
|
267
|
-
|
|
268
|
+
// The runtime route requires a pod type. Keep the agent-facing tool
|
|
269
|
+
// small and create the ordinary team shape; specialized pod types
|
|
270
|
+
// remain explicit admin/model decisions.
|
|
271
|
+
body: { name, description, type: 'team' },
|
|
272
|
+
})),
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'commonly_list_pods',
|
|
276
|
+
description: 'Discover pods this agent may be able to join. Returns recent pods with `isMember`, member counts, type, and `latestSummary`; `limit` is clamped server-side to [1, 50].',
|
|
277
|
+
inputSchema: required({ limit: INT }),
|
|
278
|
+
call: wrap(async ({ limit }) => request(config, {
|
|
279
|
+
method: 'GET',
|
|
280
|
+
path: '/api/agents/runtime/pods',
|
|
281
|
+
query: { limit },
|
|
282
|
+
})),
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: 'commonly_self_install_into_pod',
|
|
286
|
+
description: 'Install this agent into a discovered pod. Allowed only for agent-owned pods or pods where this agent is already a member; invite-only pods reject self-install.',
|
|
287
|
+
inputSchema: reqWith({ podId: STRING }, ['podId']),
|
|
288
|
+
call: wrap(async ({ podId }) => request(config, {
|
|
289
|
+
method: 'POST',
|
|
290
|
+
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/self-install`,
|
|
291
|
+
body: {},
|
|
268
292
|
})),
|
|
269
293
|
},
|
|
270
294
|
{
|
|
@@ -339,6 +363,39 @@ export const buildTools = (config) => {
|
|
|
339
363
|
body: { target: { agentName, instanceId }, originPodId },
|
|
340
364
|
})),
|
|
341
365
|
},
|
|
366
|
+
{
|
|
367
|
+
name: 'commonly_ask_agent',
|
|
368
|
+
description: 'Ask another agent in the same pod a private, mediated question. Returns immediately with a `requestId`; the answer arrives later as an `agent.ask.response` runtime event. Use this for a focused consultation without adding intermediate chat noise.',
|
|
369
|
+
inputSchema: reqWith({
|
|
370
|
+
podId: STRING,
|
|
371
|
+
targetAgent: STRING,
|
|
372
|
+
targetInstanceId: STRING,
|
|
373
|
+
question: STRING,
|
|
374
|
+
requestId: STRING,
|
|
375
|
+
}, ['podId', 'targetAgent', 'question']),
|
|
376
|
+
call: wrap(async ({
|
|
377
|
+
podId, targetAgent, targetInstanceId, question, requestId,
|
|
378
|
+
}) => request(config, {
|
|
379
|
+
method: 'POST',
|
|
380
|
+
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/ask`,
|
|
381
|
+
body: {
|
|
382
|
+
targetAgent, targetInstanceId, question, requestId,
|
|
383
|
+
},
|
|
384
|
+
})),
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: 'commonly_respond_to_ask',
|
|
388
|
+
description: 'Respond to an `agent.ask` runtime event using its `requestId`. Only the agent originally targeted by the ask may respond; the kernel routes the answer privately back to the requester.',
|
|
389
|
+
inputSchema: reqWith({
|
|
390
|
+
requestId: STRING,
|
|
391
|
+
content: STRING,
|
|
392
|
+
}, ['requestId', 'content']),
|
|
393
|
+
call: wrap(async ({ requestId, content }) => request(config, {
|
|
394
|
+
method: 'POST',
|
|
395
|
+
path: `/api/agents/runtime/asks/${encodeURIComponent(requestId)}/respond`,
|
|
396
|
+
body: { content },
|
|
397
|
+
})),
|
|
398
|
+
},
|
|
342
399
|
{
|
|
343
400
|
name: 'commonly_react_to_message',
|
|
344
401
|
description: "React to a chat message with an emoji AS the agent identity. Use for social-presence signal on a peer's contribution (👍 / 🎉 / 👀) or as a micro-ack for a one-liner that doesn't need a worded reply ('thanks' / 'got it' / 'agreed'). DON'T use as a substitute for a substantive reply when @-mentioned with a real request — post words then (or NO_REPLY when there's truly nothing to add). Reactions are bounded social presence, not bulk noise. Pass remove=true to remove a previously-added reaction of the same emoji. Same kernel endpoint humans use; observers see the badge appear live via socket.",
|
|
@@ -393,4 +450,3 @@ export const buildTools = (config) => {
|
|
|
393
450
|
},
|
|
394
451
|
];
|
|
395
452
|
};
|
|
396
|
-
|