@commonlyai/mcp 0.1.7 → 0.1.8
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 +58 -3
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.8",
|
|
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.8';
|
|
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.8';
|
|
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
|
@@ -256,7 +256,7 @@ export const buildTools = (config) => {
|
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
258
|
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.',
|
|
259
|
+
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
260
|
inputSchema: reqWith({
|
|
261
261
|
name: STRING,
|
|
262
262
|
description: STRING,
|
|
@@ -264,7 +264,30 @@ export const buildTools = (config) => {
|
|
|
264
264
|
call: wrap(async ({ name, description }) => request(config, {
|
|
265
265
|
method: 'POST',
|
|
266
266
|
path: '/api/agents/runtime/pods',
|
|
267
|
-
|
|
267
|
+
// The runtime route requires a pod type. Keep the agent-facing tool
|
|
268
|
+
// small and create the ordinary team shape; specialized pod types
|
|
269
|
+
// remain explicit admin/model decisions.
|
|
270
|
+
body: { name, description, type: 'team' },
|
|
271
|
+
})),
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: 'commonly_list_pods',
|
|
275
|
+
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].',
|
|
276
|
+
inputSchema: required({ limit: INT }),
|
|
277
|
+
call: wrap(async ({ limit }) => request(config, {
|
|
278
|
+
method: 'GET',
|
|
279
|
+
path: '/api/agents/runtime/pods',
|
|
280
|
+
query: { limit },
|
|
281
|
+
})),
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'commonly_self_install_into_pod',
|
|
285
|
+
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.',
|
|
286
|
+
inputSchema: reqWith({ podId: STRING }, ['podId']),
|
|
287
|
+
call: wrap(async ({ podId }) => request(config, {
|
|
288
|
+
method: 'POST',
|
|
289
|
+
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/self-install`,
|
|
290
|
+
body: {},
|
|
268
291
|
})),
|
|
269
292
|
},
|
|
270
293
|
{
|
|
@@ -339,6 +362,39 @@ export const buildTools = (config) => {
|
|
|
339
362
|
body: { target: { agentName, instanceId }, originPodId },
|
|
340
363
|
})),
|
|
341
364
|
},
|
|
365
|
+
{
|
|
366
|
+
name: 'commonly_ask_agent',
|
|
367
|
+
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.',
|
|
368
|
+
inputSchema: reqWith({
|
|
369
|
+
podId: STRING,
|
|
370
|
+
targetAgent: STRING,
|
|
371
|
+
targetInstanceId: STRING,
|
|
372
|
+
question: STRING,
|
|
373
|
+
requestId: STRING,
|
|
374
|
+
}, ['podId', 'targetAgent', 'question']),
|
|
375
|
+
call: wrap(async ({
|
|
376
|
+
podId, targetAgent, targetInstanceId, question, requestId,
|
|
377
|
+
}) => request(config, {
|
|
378
|
+
method: 'POST',
|
|
379
|
+
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/ask`,
|
|
380
|
+
body: {
|
|
381
|
+
targetAgent, targetInstanceId, question, requestId,
|
|
382
|
+
},
|
|
383
|
+
})),
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: 'commonly_respond_to_ask',
|
|
387
|
+
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.',
|
|
388
|
+
inputSchema: reqWith({
|
|
389
|
+
requestId: STRING,
|
|
390
|
+
content: STRING,
|
|
391
|
+
}, ['requestId', 'content']),
|
|
392
|
+
call: wrap(async ({ requestId, content }) => request(config, {
|
|
393
|
+
method: 'POST',
|
|
394
|
+
path: `/api/agents/runtime/asks/${encodeURIComponent(requestId)}/respond`,
|
|
395
|
+
body: { content },
|
|
396
|
+
})),
|
|
397
|
+
},
|
|
342
398
|
{
|
|
343
399
|
name: 'commonly_react_to_message',
|
|
344
400
|
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 +449,3 @@ export const buildTools = (config) => {
|
|
|
393
449
|
},
|
|
394
450
|
];
|
|
395
451
|
};
|
|
396
|
-
|