myaiforone 1.0.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/README.md +113 -0
- package/agents/_template/CLAUDE.md +18 -0
- package/agents/_template/agent.json +7 -0
- package/agents/platform/agentcreator/CLAUDE.md +300 -0
- package/agents/platform/appcreator/CLAUDE.md +158 -0
- package/agents/platform/gym/CLAUDE.md +486 -0
- package/agents/platform/gym/agent.json +40 -0
- package/agents/platform/gym/programs/agent-building/program.json +160 -0
- package/agents/platform/gym/programs/automations-mastery/program.json +129 -0
- package/agents/platform/gym/programs/getting-started/program.json +124 -0
- package/agents/platform/gym/programs/mcp-integrations/program.json +116 -0
- package/agents/platform/gym/programs/multi-model-strategy/program.json +115 -0
- package/agents/platform/gym/programs/prompt-engineering/program.json +136 -0
- package/agents/platform/gym/souls/alex.md +12 -0
- package/agents/platform/gym/souls/jordan.md +12 -0
- package/agents/platform/gym/souls/morgan.md +12 -0
- package/agents/platform/gym/souls/riley.md +12 -0
- package/agents/platform/gym/souls/sam.md +12 -0
- package/agents/platform/hub/CLAUDE.md +372 -0
- package/agents/platform/promptcreator/CLAUDE.md +130 -0
- package/agents/platform/skillcreator/CLAUDE.md +163 -0
- package/bin/cli.js +566 -0
- package/config.example.json +310 -0
- package/dist/agent-registry.d.ts +32 -0
- package/dist/agent-registry.d.ts.map +1 -0
- package/dist/agent-registry.js +144 -0
- package/dist/agent-registry.js.map +1 -0
- package/dist/channels/discord.d.ts +17 -0
- package/dist/channels/discord.d.ts.map +1 -0
- package/dist/channels/discord.js +114 -0
- package/dist/channels/discord.js.map +1 -0
- package/dist/channels/imessage.d.ts +23 -0
- package/dist/channels/imessage.d.ts.map +1 -0
- package/dist/channels/imessage.js +214 -0
- package/dist/channels/imessage.js.map +1 -0
- package/dist/channels/slack.d.ts +19 -0
- package/dist/channels/slack.d.ts.map +1 -0
- package/dist/channels/slack.js +167 -0
- package/dist/channels/slack.js.map +1 -0
- package/dist/channels/telegram.d.ts +19 -0
- package/dist/channels/telegram.d.ts.map +1 -0
- package/dist/channels/telegram.js +274 -0
- package/dist/channels/telegram.js.map +1 -0
- package/dist/channels/types.d.ts +44 -0
- package/dist/channels/types.d.ts.map +1 -0
- package/dist/channels/types.js +18 -0
- package/dist/channels/types.js.map +1 -0
- package/dist/channels/whatsapp.d.ts +23 -0
- package/dist/channels/whatsapp.d.ts.map +1 -0
- package/dist/channels/whatsapp.js +189 -0
- package/dist/channels/whatsapp.js.map +1 -0
- package/dist/config.d.ts +134 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +127 -0
- package/dist/config.js.map +1 -0
- package/dist/cron.d.ts +8 -0
- package/dist/cron.d.ts.map +1 -0
- package/dist/cron.js +35 -0
- package/dist/cron.js.map +1 -0
- package/dist/decrypt-keys.d.ts +7 -0
- package/dist/decrypt-keys.d.ts.map +1 -0
- package/dist/decrypt-keys.js +53 -0
- package/dist/decrypt-keys.js.map +1 -0
- package/dist/encrypt-keys.d.ts +8 -0
- package/dist/encrypt-keys.d.ts.map +1 -0
- package/dist/encrypt-keys.js +62 -0
- package/dist/encrypt-keys.js.map +1 -0
- package/dist/executor.d.ts +31 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +2009 -0
- package/dist/executor.js.map +1 -0
- package/dist/gemini-executor.d.ts +27 -0
- package/dist/gemini-executor.d.ts.map +1 -0
- package/dist/gemini-executor.js +160 -0
- package/dist/gemini-executor.js.map +1 -0
- package/dist/goals.d.ts +24 -0
- package/dist/goals.d.ts.map +1 -0
- package/dist/goals.js +189 -0
- package/dist/goals.js.map +1 -0
- package/dist/gym/activity-digest.d.ts +30 -0
- package/dist/gym/activity-digest.d.ts.map +1 -0
- package/dist/gym/activity-digest.js +506 -0
- package/dist/gym/activity-digest.js.map +1 -0
- package/dist/gym/dimension-scorer.d.ts +76 -0
- package/dist/gym/dimension-scorer.d.ts.map +1 -0
- package/dist/gym/dimension-scorer.js +236 -0
- package/dist/gym/dimension-scorer.js.map +1 -0
- package/dist/gym/gym-router.d.ts +7 -0
- package/dist/gym/gym-router.d.ts.map +1 -0
- package/dist/gym/gym-router.js +718 -0
- package/dist/gym/gym-router.js.map +1 -0
- package/dist/gym/index.d.ts +11 -0
- package/dist/gym/index.d.ts.map +1 -0
- package/dist/gym/index.js +11 -0
- package/dist/gym/index.js.map +1 -0
- package/dist/heartbeat.d.ts +21 -0
- package/dist/heartbeat.d.ts.map +1 -0
- package/dist/heartbeat.js +163 -0
- package/dist/heartbeat.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +254 -0
- package/dist/index.js.map +1 -0
- package/dist/keystore.d.ts +22 -0
- package/dist/keystore.d.ts.map +1 -0
- package/dist/keystore.js +178 -0
- package/dist/keystore.js.map +1 -0
- package/dist/logger.d.ts +9 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +45 -0
- package/dist/logger.js.map +1 -0
- package/dist/memory/daily.d.ts +22 -0
- package/dist/memory/daily.d.ts.map +1 -0
- package/dist/memory/daily.js +82 -0
- package/dist/memory/daily.js.map +1 -0
- package/dist/memory/embeddings.d.ts +15 -0
- package/dist/memory/embeddings.d.ts.map +1 -0
- package/dist/memory/embeddings.js +154 -0
- package/dist/memory/embeddings.js.map +1 -0
- package/dist/memory/index.d.ts +32 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +159 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/search.d.ts +21 -0
- package/dist/memory/search.d.ts.map +1 -0
- package/dist/memory/search.js +77 -0
- package/dist/memory/search.js.map +1 -0
- package/dist/memory/store.d.ts +23 -0
- package/dist/memory/store.d.ts.map +1 -0
- package/dist/memory/store.js +144 -0
- package/dist/memory/store.js.map +1 -0
- package/dist/ollama-executor.d.ts +17 -0
- package/dist/ollama-executor.d.ts.map +1 -0
- package/dist/ollama-executor.js +112 -0
- package/dist/ollama-executor.js.map +1 -0
- package/dist/openai-executor.d.ts +38 -0
- package/dist/openai-executor.d.ts.map +1 -0
- package/dist/openai-executor.js +197 -0
- package/dist/openai-executor.js.map +1 -0
- package/dist/router.d.ts +11 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +185 -0
- package/dist/router.js.map +1 -0
- package/dist/test-message.d.ts +2 -0
- package/dist/test-message.d.ts.map +1 -0
- package/dist/test-message.js +60 -0
- package/dist/test-message.js.map +1 -0
- package/dist/utils/imsg-db-reader.d.ts +24 -0
- package/dist/utils/imsg-db-reader.d.ts.map +1 -0
- package/dist/utils/imsg-db-reader.js +92 -0
- package/dist/utils/imsg-db-reader.js.map +1 -0
- package/dist/utils/imsg-rpc.d.ts +25 -0
- package/dist/utils/imsg-rpc.d.ts.map +1 -0
- package/dist/utils/imsg-rpc.js +149 -0
- package/dist/utils/imsg-rpc.js.map +1 -0
- package/dist/utils/message-formatter.d.ts +3 -0
- package/dist/utils/message-formatter.d.ts.map +1 -0
- package/dist/utils/message-formatter.js +69 -0
- package/dist/utils/message-formatter.js.map +1 -0
- package/dist/web-ui.d.ts +12 -0
- package/dist/web-ui.d.ts.map +1 -0
- package/dist/web-ui.js +5784 -0
- package/dist/web-ui.js.map +1 -0
- package/dist/whatsapp-chats.d.ts +2 -0
- package/dist/whatsapp-chats.d.ts.map +1 -0
- package/dist/whatsapp-chats.js +76 -0
- package/dist/whatsapp-chats.js.map +1 -0
- package/dist/whatsapp-login.d.ts +2 -0
- package/dist/whatsapp-login.d.ts.map +1 -0
- package/dist/whatsapp-login.js +90 -0
- package/dist/whatsapp-login.js.map +1 -0
- package/dist/wiki-sync.d.ts +21 -0
- package/dist/wiki-sync.d.ts.map +1 -0
- package/dist/wiki-sync.js +147 -0
- package/dist/wiki-sync.js.map +1 -0
- package/docs/AddNewAgentGuide.md +100 -0
- package/docs/AddNewMcpGuide.md +72 -0
- package/docs/Architecture.md +795 -0
- package/docs/CLAUDE-AI-SETUP.md +166 -0
- package/docs/Setup.md +297 -0
- package/docs/ai-gym-architecture.md +1040 -0
- package/docs/ai-gym-build-plan.md +343 -0
- package/docs/ai-gym-onboarding.md +122 -0
- package/docs/appcreator_plan.md +348 -0
- package/docs/platform-mcp-audit.md +320 -0
- package/docs/server-deployment-plan.md +503 -0
- package/docs/superpowers/plans/2026-03-25-marketplace.md +1281 -0
- package/docs/superpowers/specs/2026-03-25-marketplace-design.md +287 -0
- package/docs/user-guide.md +2016 -0
- package/mcp-catalog.json +628 -0
- package/package.json +63 -0
- package/public/MyAIforOne-logomark-512.svg +16 -0
- package/public/MyAIforOne-logomark-transparent.svg +15 -0
- package/public/activity.html +314 -0
- package/public/admin.html +1674 -0
- package/public/agent-dashboard.html +670 -0
- package/public/api-docs.html +1106 -0
- package/public/automations.html +722 -0
- package/public/canvas.css +223 -0
- package/public/canvas.js +588 -0
- package/public/changelog.html +231 -0
- package/public/gym.html +2766 -0
- package/public/home.html +1930 -0
- package/public/index.html +2809 -0
- package/public/lab.html +1643 -0
- package/public/library.html +1442 -0
- package/public/marketplace.html +1101 -0
- package/public/mcp-docs.html +441 -0
- package/public/mini.html +390 -0
- package/public/monitor.html +584 -0
- package/public/org.html +4304 -0
- package/public/projects.html +734 -0
- package/public/settings.html +645 -0
- package/public/tasks.html +932 -0
- package/public/trainers/alex.svg +12 -0
- package/public/trainers/jordan.svg +12 -0
- package/public/trainers/morgan.svg +12 -0
- package/public/trainers/riley.svg +12 -0
- package/public/trainers/sam.svg +12 -0
- package/public/user-guide.html +218 -0
- package/registry/agents.json +3 -0
- package/registry/apps.json +20 -0
- package/registry/installed-drafts.json +3 -0
- package/registry/mcps.json +1084 -0
- package/registry/prompts/personal/mcp-test-prompt.md +6 -0
- package/registry/prompts/personal/memory-recall.md +6 -0
- package/registry/prompts/platform/brainstorm.md +15 -0
- package/registry/prompts/platform/code-review.md +16 -0
- package/registry/prompts/platform/explain.md +16 -0
- package/registry/prompts.json +58 -0
- package/registry/skills/external/brainstorming.md +5 -0
- package/registry/skills/external/code-review.md +40 -0
- package/registry/skills/external/frontend-patterns.md +642 -0
- package/registry/skills/external/frontend-slides.md +184 -0
- package/registry/skills/external/systematic-debugging.md +5 -0
- package/registry/skills/external/tdd.md +328 -0
- package/registry/skills/external/verification-before-completion.md +5 -0
- package/registry/skills/external/writing-plans.md +5 -0
- package/registry/skills/platform/ai41_app_build.md +930 -0
- package/registry/skills/platform/ai41_app_deploy.md +168 -0
- package/registry/skills/platform/ai41_app_orchestrator.md +239 -0
- package/registry/skills/platform/ai41_app_patterns.md +359 -0
- package/registry/skills/platform/ai41_app_register.md +85 -0
- package/registry/skills/platform/ai41_app_scaffold.md +421 -0
- package/registry/skills/platform/ai41_app_verify.md +107 -0
- package/registry/skills/platform/opProjectCreate.md +239 -0
- package/registry/skills/platform/op_devbrowser.md +136 -0
- package/registry/skills/platform/sop_brandguidelines.md +103 -0
- package/registry/skills/platform/sop_docx.md +117 -0
- package/registry/skills/platform/sop_frontenddesign.md +44 -0
- package/registry/skills/platform/sop_frontenddesign_v2.md +659 -0
- package/registry/skills/platform/sop_mcpbuilder.md +133 -0
- package/registry/skills/platform/sop_pdf.md +172 -0
- package/registry/skills/platform/sop_pptx.md +133 -0
- package/registry/skills/platform/sop_skillcreator.md +104 -0
- package/registry/skills/platform/sop_themefactory.md +128 -0
- package/registry/skills/platform/sop_webapptesting.md +75 -0
- package/registry/skills/platform/sop_webartifactsbuilder.md +97 -0
- package/registry/skills/platform/sop_xlsx.md +134 -0
- package/registry/skills.json +1055 -0
- package/scripts/discover-chats.sh +11 -0
- package/scripts/install-service-windows.ps1 +87 -0
- package/scripts/install-service.sh +52 -0
- package/scripts/seed-registry.ts +195 -0
- package/scripts/test-send.sh +5 -0
- package/scripts/tray-indicator.ps1 +35 -0
- package/scripts/uninstall-service-windows.ps1 +23 -0
- package/scripts/uninstall-service.sh +15 -0
- package/scripts/xbar-myagent.5s.sh +32 -0
- package/server/mcp-server/dist/index.d.ts +11 -0
- package/server/mcp-server/dist/index.js +1332 -0
- package/server/mcp-server/dist/lib/api-client.d.ts +165 -0
- package/server/mcp-server/dist/lib/api-client.js +241 -0
- package/server/mcp-server/index.ts +1545 -0
- package/server/mcp-server/lib/api-client.ts +366 -0
- package/server/mcp-server/tsconfig.json +14 -0
- package/src/agent-registry.ts +180 -0
- package/src/channels/discord.ts +129 -0
- package/src/channels/imessage.ts +261 -0
- package/src/channels/slack.ts +208 -0
- package/src/channels/telegram.ts +307 -0
- package/src/channels/types.ts +62 -0
- package/src/channels/whatsapp.ts +227 -0
- package/src/config.ts +281 -0
- package/src/cron.ts +43 -0
- package/src/decrypt-keys.ts +60 -0
- package/src/encrypt-keys.ts +70 -0
- package/src/executor.ts +2190 -0
- package/src/gemini-executor.ts +212 -0
- package/src/goals.ts +240 -0
- package/src/gym/activity-digest.ts +546 -0
- package/src/gym/dimension-scorer.ts +297 -0
- package/src/gym/gym-router.ts +801 -0
- package/src/gym/index.ts +19 -0
- package/src/heartbeat.ts +220 -0
- package/src/index.ts +275 -0
- package/src/keystore.ts +190 -0
- package/src/logger.ts +51 -0
- package/src/memory/daily.ts +101 -0
- package/src/memory/embeddings.ts +185 -0
- package/src/memory/index.ts +218 -0
- package/src/memory/search.ts +124 -0
- package/src/memory/store.ts +189 -0
- package/src/ollama-executor.ts +126 -0
- package/src/openai-executor.ts +259 -0
- package/src/router.ts +230 -0
- package/src/test-message.ts +72 -0
- package/src/utils/imsg-db-reader.ts +109 -0
- package/src/utils/imsg-rpc.ts +178 -0
- package/src/utils/message-formatter.ts +90 -0
- package/src/web-ui.ts +5778 -0
- package/src/whatsapp-chats.ts +91 -0
- package/src/whatsapp-login.ts +110 -0
- package/src/wiki-sync.ts +199 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,1545 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* MyAIforOne MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Exposes the MyAgent gateway's API as MCP tools for Claude Code,
|
|
6
|
+
* Claude Desktop, and other MCP-compatible clients.
|
|
7
|
+
*
|
|
8
|
+
* Usage (stdio): node server/mcp-server/index.js
|
|
9
|
+
* Usage (HTTP): MYAGENT_MCP_PORT=3100 node server/mcp-server/index.js --http
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
13
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
import * as api from "./lib/api-client.js";
|
|
16
|
+
|
|
17
|
+
const server = new McpServer({
|
|
18
|
+
name: "myaiforone",
|
|
19
|
+
version: "1.0.0",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
23
|
+
// DASHBOARD & HEALTH
|
|
24
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
25
|
+
|
|
26
|
+
server.tool("health_check", "Check if the MyAgent gateway is running", {}, async () => {
|
|
27
|
+
const r = await api.health();
|
|
28
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
server.tool("get_dashboard", "Get full dashboard: all agents, channels, accounts, uptime", {}, async () => {
|
|
32
|
+
const r = await api.dashboard();
|
|
33
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
37
|
+
// AGENTS
|
|
38
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
39
|
+
|
|
40
|
+
server.tool("list_agents", "List all agents, optionally filtered by organization", {
|
|
41
|
+
org: z.string().optional().describe("Filter by organization name"),
|
|
42
|
+
}, async ({ org }) => {
|
|
43
|
+
const r = await api.listAgents(org);
|
|
44
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
server.tool("get_agent", "Get detailed info about a specific agent", {
|
|
48
|
+
agentId: z.string().describe("Agent ID"),
|
|
49
|
+
}, async ({ agentId }) => {
|
|
50
|
+
const r = await api.getAgent(agentId);
|
|
51
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
server.tool("get_agent_instructions", "Get an agent's CLAUDE.md system prompt", {
|
|
55
|
+
agentId: z.string().describe("Agent ID"),
|
|
56
|
+
}, async ({ agentId }) => {
|
|
57
|
+
const r = await api.getAgentInstructions(agentId);
|
|
58
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
server.tool("create_agent", "Create a new agent with full configuration", {
|
|
62
|
+
agentId: z.string().describe("Unique agent ID (lowercase, hyphens)"),
|
|
63
|
+
name: z.string().describe("Display name"),
|
|
64
|
+
alias: z.string().describe("Mention alias (e.g. @myagent)"),
|
|
65
|
+
description: z.string().optional().describe("Agent description"),
|
|
66
|
+
workspace: z.string().optional().describe("Working directory path"),
|
|
67
|
+
organization: z.string().optional().describe("Organization name"),
|
|
68
|
+
function: z.string().optional().describe("Org function/department"),
|
|
69
|
+
title: z.string().optional().describe("Org title/role"),
|
|
70
|
+
reportsTo: z.string().optional().describe("Alias of the agent this one reports to (e.g. @pricingstrat)"),
|
|
71
|
+
persistent: z.boolean().optional().describe("Keep conversation history"),
|
|
72
|
+
streaming: z.boolean().optional().describe("Enable streaming responses"),
|
|
73
|
+
advancedMemory: z.boolean().optional().describe("Enable semantic memory"),
|
|
74
|
+
autonomousCapable: z.boolean().optional().describe("Can run autonomous goals"),
|
|
75
|
+
tools: z.array(z.string()).optional().describe("Allowed tools list"),
|
|
76
|
+
skills: z.array(z.string()).optional().describe("Shared skill names"),
|
|
77
|
+
mcps: z.array(z.string()).optional().describe("MCP server names"),
|
|
78
|
+
prompts: z.array(z.string()).optional().describe("Prompt template names"),
|
|
79
|
+
subAgents: z.union([z.array(z.string()), z.literal("*")]).optional().describe("Sub-agents for group agent"),
|
|
80
|
+
claudeAccount: z.string().optional().describe("Claude account name"),
|
|
81
|
+
timeout: z.number().optional().describe("Timeout in ms"),
|
|
82
|
+
heartbeatInstructions: z.string().optional().describe("Custom heartbeat instructions — saved to heartbeat.md. Defines what the agent does during a heartbeat check."),
|
|
83
|
+
agentClass: z.enum(["standard", "platform", "builder"]).optional().describe("Agent class: standard (default), platform (Lab creators), builder (app developer agents)"),
|
|
84
|
+
executor: z.string().optional().describe("Executor override: 'claude' (default) or 'ollama:<model>' (e.g. 'ollama:gemma2'). Requires multiModelEnabled in service config."),
|
|
85
|
+
wiki: z.boolean().optional().describe("Enable wiki knowledge base for this agent"),
|
|
86
|
+
wikiSync: z.object({ enabled: z.boolean().optional(), schedule: z.string().optional() }).optional().describe("Wiki sync config: { enabled, schedule (cron expression, default '0 0 * * *') }"),
|
|
87
|
+
}, async (args) => {
|
|
88
|
+
const body: any = { ...args };
|
|
89
|
+
if (args.organization) {
|
|
90
|
+
body.org = [{ organization: args.organization, function: args.function || "", title: args.title || "", reportsTo: args.reportsTo || "" }];
|
|
91
|
+
delete body.organization; delete body.function; delete body.title; delete body.reportsTo;
|
|
92
|
+
}
|
|
93
|
+
const r = await api.createAgent(body);
|
|
94
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
server.tool("update_agent", "Update an existing agent's configuration", {
|
|
98
|
+
agentId: z.string().describe("Agent ID to update"),
|
|
99
|
+
name: z.string().optional(),
|
|
100
|
+
alias: z.string().optional(),
|
|
101
|
+
description: z.string().optional(),
|
|
102
|
+
workspace: z.string().optional(),
|
|
103
|
+
organization: z.string().optional().describe("Organization name"),
|
|
104
|
+
function: z.string().optional().describe("Org function/department"),
|
|
105
|
+
title: z.string().optional().describe("Org title/role"),
|
|
106
|
+
reportsTo: z.string().optional().describe("Alias of the agent this one reports to (e.g. @pricingstrat)"),
|
|
107
|
+
persistent: z.boolean().optional(),
|
|
108
|
+
streaming: z.boolean().optional(),
|
|
109
|
+
advancedMemory: z.boolean().optional(),
|
|
110
|
+
autonomousCapable: z.boolean().optional().describe("Can run autonomous goals"),
|
|
111
|
+
timeout: z.number().optional(),
|
|
112
|
+
tools: z.array(z.string()).optional(),
|
|
113
|
+
skills: z.array(z.string()).optional(),
|
|
114
|
+
mcps: z.array(z.string()).optional(),
|
|
115
|
+
prompts: z.array(z.string()).optional(),
|
|
116
|
+
subAgents: z.union([z.array(z.string()), z.literal("*")]).optional().describe("Sub-agents for group agent"),
|
|
117
|
+
claudeAccount: z.string().optional(),
|
|
118
|
+
instructions: z.string().optional().describe("Update CLAUDE.md content"),
|
|
119
|
+
heartbeatInstructions: z.string().optional().describe("Custom heartbeat instructions — saved to heartbeat.md. Defines what the agent does during a heartbeat check."),
|
|
120
|
+
agentClass: z.enum(["standard", "platform", "builder"]).optional().describe("Agent class: standard (default), platform (Lab creators), builder (app developer agents)"),
|
|
121
|
+
executor: z.string().optional().describe("Executor override: 'claude' (default) or 'ollama:<model>' (e.g. 'ollama:gemma2'). Requires multiModelEnabled in service config."),
|
|
122
|
+
wiki: z.boolean().optional().describe("Enable wiki knowledge base for this agent"),
|
|
123
|
+
wikiSync: z.object({ enabled: z.boolean().optional(), schedule: z.string().optional() }).optional().describe("Wiki sync config: { enabled, schedule (cron expression, default '0 0 * * *') }"),
|
|
124
|
+
}, async ({ agentId, ...body }) => {
|
|
125
|
+
const payload: any = { ...body };
|
|
126
|
+
if (body.organization !== undefined) {
|
|
127
|
+
payload.org = [{ organization: body.organization, function: body.function || "", title: body.title || "", reportsTo: body.reportsTo || "" }];
|
|
128
|
+
delete payload.organization; delete payload.function; delete payload.title; delete payload.reportsTo;
|
|
129
|
+
}
|
|
130
|
+
const r = await api.updateAgent(agentId, payload);
|
|
131
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
server.tool("delete_agent", "Delete an agent (auto-resolves confirmation alias)", {
|
|
135
|
+
agentId: z.string().describe("Agent ID to delete"),
|
|
136
|
+
}, async ({ agentId }) => {
|
|
137
|
+
// Server requires confirmAlias — fetch it from the agent's config first
|
|
138
|
+
const agent = await api.getAgent(agentId);
|
|
139
|
+
const alias = agent?.config?.aliases?.[0] || agent?.config?.mentionAliases?.[0] || agentId;
|
|
140
|
+
const r = await api.deleteAgent(agentId, alias);
|
|
141
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
145
|
+
// CHAT
|
|
146
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
147
|
+
|
|
148
|
+
server.tool("send_message", "Send a message to an agent and get the response", {
|
|
149
|
+
agentId: z.string().describe("Agent ID"),
|
|
150
|
+
text: z.string().describe("Message text"),
|
|
151
|
+
accountOverride: z.string().optional().describe("Use a different Claude account"),
|
|
152
|
+
}, async ({ agentId, text, accountOverride }) => {
|
|
153
|
+
const r = await api.sendMessage(agentId, text, accountOverride);
|
|
154
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
server.tool("delegate_message", "Send a message between agents (inter-agent delegation)", {
|
|
158
|
+
agentId: z.string().describe("Target agent ID"),
|
|
159
|
+
text: z.string().describe("Message text"),
|
|
160
|
+
}, async ({ agentId, text }) => {
|
|
161
|
+
const r = await api.delegate(agentId, text);
|
|
162
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
166
|
+
// SESSIONS
|
|
167
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
168
|
+
|
|
169
|
+
server.tool("list_sessions", "List active conversation sessions for an agent", {
|
|
170
|
+
agentId: z.string().describe("Agent ID"),
|
|
171
|
+
}, async ({ agentId }) => {
|
|
172
|
+
const r = await api.listSessions(agentId);
|
|
173
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
server.tool("reset_session", "Reset an agent's conversation session", {
|
|
177
|
+
agentId: z.string().describe("Agent ID"),
|
|
178
|
+
senderId: z.string().optional().describe("Specific sender to reset"),
|
|
179
|
+
}, async ({ agentId, senderId }) => {
|
|
180
|
+
const r = await api.resetSession(agentId, senderId);
|
|
181
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
185
|
+
// MODEL OVERRIDES
|
|
186
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
187
|
+
|
|
188
|
+
server.tool("get_model", "Get the current model override for an agent", {
|
|
189
|
+
agentId: z.string().describe("Agent ID"),
|
|
190
|
+
}, async ({ agentId }) => {
|
|
191
|
+
const r = await api.getModel(agentId);
|
|
192
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
server.tool("set_model", "Set a model override for an agent (opus, sonnet, haiku, or full model ID)", {
|
|
196
|
+
agentId: z.string().describe("Agent ID"),
|
|
197
|
+
model: z.string().describe("Model: opus, sonnet, haiku, or full ID"),
|
|
198
|
+
}, async ({ agentId, model }) => {
|
|
199
|
+
const r = await api.setModel(agentId, model);
|
|
200
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
server.tool("clear_model", "Clear model override, use agent default", {
|
|
204
|
+
agentId: z.string().describe("Agent ID"),
|
|
205
|
+
}, async ({ agentId }) => {
|
|
206
|
+
const r = await api.clearModel(agentId);
|
|
207
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
211
|
+
// COST
|
|
212
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
213
|
+
|
|
214
|
+
server.tool("get_agent_cost", "Get cost breakdown for an agent (today, week, all-time, by day)", {
|
|
215
|
+
agentId: z.string().describe("Agent ID"),
|
|
216
|
+
}, async ({ agentId }) => {
|
|
217
|
+
const r = await api.getAgentCost(agentId);
|
|
218
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
server.tool("get_all_costs", "Get cost summary across ALL agents", {}, async () => {
|
|
222
|
+
const r = await api.getAllCosts();
|
|
223
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
227
|
+
// SKILLS
|
|
228
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
229
|
+
|
|
230
|
+
server.tool("get_agent_skills", "List all skills available to an agent (shared + org + agent-specific)", {
|
|
231
|
+
agentId: z.string().describe("Agent ID"),
|
|
232
|
+
}, async ({ agentId }) => {
|
|
233
|
+
const r = await api.getAgentSkills(agentId);
|
|
234
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
server.tool("get_org_skills", "List all skills in an organization", {
|
|
238
|
+
orgName: z.string().describe("Organization name"),
|
|
239
|
+
}, async ({ orgName }) => {
|
|
240
|
+
const r = await api.getOrgSkills(orgName);
|
|
241
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
245
|
+
// TASKS
|
|
246
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
247
|
+
|
|
248
|
+
server.tool("list_tasks", "List tasks assigned to an agent", {
|
|
249
|
+
agentId: z.string().describe("Agent ID"),
|
|
250
|
+
}, async ({ agentId }) => {
|
|
251
|
+
const r = await api.listTasks(agentId);
|
|
252
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
server.tool("create_task", "Create a task for an agent", {
|
|
256
|
+
agentId: z.string().describe("Agent ID"),
|
|
257
|
+
title: z.string().describe("Task title"),
|
|
258
|
+
description: z.string().optional(),
|
|
259
|
+
priority: z.enum(["low", "medium", "high", "critical"]).optional(),
|
|
260
|
+
project: z.string().optional(),
|
|
261
|
+
}, async ({ agentId, ...body }) => {
|
|
262
|
+
const r = await api.createTask(agentId, body);
|
|
263
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
server.tool("update_task", "Update a task status or details", {
|
|
267
|
+
agentId: z.string().describe("Agent ID"),
|
|
268
|
+
taskId: z.string().describe("Task ID"),
|
|
269
|
+
status: z.string().optional(),
|
|
270
|
+
title: z.string().optional(),
|
|
271
|
+
}, async ({ agentId, taskId, ...body }) => {
|
|
272
|
+
const r = await api.updateTask(agentId, taskId, body);
|
|
273
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
server.tool("delete_task", "Delete a task", {
|
|
277
|
+
agentId: z.string().describe("Agent ID"),
|
|
278
|
+
taskId: z.string().describe("Task ID"),
|
|
279
|
+
}, async ({ agentId, taskId }) => {
|
|
280
|
+
const r = await api.deleteTask(agentId, taskId);
|
|
281
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
server.tool("get_all_tasks", "Get all tasks across all agents", {}, async () => {
|
|
285
|
+
const r = await api.allTasks();
|
|
286
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
290
|
+
// AUTOMATIONS
|
|
291
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
292
|
+
|
|
293
|
+
server.tool("list_automations", "List all goals and crons across all agents", {}, async () => {
|
|
294
|
+
const r = await api.listAutomations();
|
|
295
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
server.tool("create_goal", "Create an autonomous goal for an agent", {
|
|
299
|
+
agentId: z.string().describe("Agent ID"),
|
|
300
|
+
id: z.string().describe("Goal ID"),
|
|
301
|
+
description: z.string().describe("What the goal does"),
|
|
302
|
+
heartbeat: z.string().describe("Cron expression for schedule"),
|
|
303
|
+
successCriteria: z.string().optional(),
|
|
304
|
+
instructions: z.string().optional(),
|
|
305
|
+
}, async ({ agentId, ...body }) => {
|
|
306
|
+
const r = await api.createGoal(agentId, body);
|
|
307
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
server.tool("toggle_goal", "Enable or disable a goal", {
|
|
311
|
+
agentId: z.string(), goalId: z.string(),
|
|
312
|
+
}, async ({ agentId, goalId }) => {
|
|
313
|
+
const r = await api.toggleGoal(agentId, goalId);
|
|
314
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
server.tool("trigger_goal", "Manually trigger a goal run", {
|
|
318
|
+
agentId: z.string(), goalId: z.string(),
|
|
319
|
+
}, async ({ agentId, goalId }) => {
|
|
320
|
+
const r = await api.triggerGoal(agentId, goalId);
|
|
321
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
server.tool("create_cron", "Create a scheduled cron job for an agent", {
|
|
325
|
+
agentId: z.string().describe("Agent ID"),
|
|
326
|
+
schedule: z.string().describe("Cron expression"),
|
|
327
|
+
message: z.string().describe("Message to send on trigger"),
|
|
328
|
+
channel: z.string().describe("Channel name"),
|
|
329
|
+
chatId: z.string().describe("Chat ID"),
|
|
330
|
+
enabled: z.boolean().optional().describe("Start enabled (default true)"),
|
|
331
|
+
}, async ({ agentId, ...body }) => {
|
|
332
|
+
const r = await api.createCron(agentId, body);
|
|
333
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
337
|
+
// MCPs
|
|
338
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
339
|
+
|
|
340
|
+
server.tool("list_mcps", "List registered MCP servers", {}, async () => {
|
|
341
|
+
const r = await api.listMcps();
|
|
342
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
server.tool("get_mcp_catalog", "Get the pre-hosted MCP catalog", {}, async () => {
|
|
346
|
+
const r = await api.mcpCatalog();
|
|
347
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
351
|
+
// CHANNELS
|
|
352
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
353
|
+
|
|
354
|
+
server.tool("list_channels", "List all messaging channels with config and agent routes", {}, async () => {
|
|
355
|
+
const r = await api.listChannels();
|
|
356
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
server.tool("update_channel", "Update channel settings (sticky routing, enabled)", {
|
|
360
|
+
channelName: z.string().describe("Channel name (slack, telegram, imessage, discord, whatsapp)"),
|
|
361
|
+
enabled: z.boolean().optional(),
|
|
362
|
+
stickyRouting: z.enum(["none", "sticky", "prefix"]).optional(),
|
|
363
|
+
stickyPrefix: z.string().optional(),
|
|
364
|
+
stickyTimeoutMs: z.number().optional(),
|
|
365
|
+
}, async ({ channelName, ...body }) => {
|
|
366
|
+
const r = await api.updateChannel(channelName, body);
|
|
367
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
server.tool("add_agent_route", "Add an agent route to a channel", {
|
|
371
|
+
channelName: z.string().describe("Channel name"),
|
|
372
|
+
agentId: z.string().describe("Agent ID"),
|
|
373
|
+
chatId: z.string().describe("Chat/channel ID"),
|
|
374
|
+
requireMention: z.boolean().optional().describe("Require @mention (default true)"),
|
|
375
|
+
allowFrom: z.array(z.string()).optional().describe("Allowed sender patterns"),
|
|
376
|
+
}, async ({ channelName, ...body }) => {
|
|
377
|
+
const r = await api.addAgentRoute(channelName, body);
|
|
378
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
382
|
+
// ACTIVITY & LOGS
|
|
383
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
384
|
+
|
|
385
|
+
server.tool("get_activity", "Get recent activity feed across all agents", {
|
|
386
|
+
limit: z.number().optional().describe("Max entries (default 100)"),
|
|
387
|
+
}, async ({ limit }) => {
|
|
388
|
+
const r = await api.activity(limit);
|
|
389
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
server.tool("get_agent_logs", "Get paginated conversation logs for an agent", {
|
|
393
|
+
agentId: z.string().describe("Agent ID"),
|
|
394
|
+
limit: z.number().optional().describe("Max entries (default 50)"),
|
|
395
|
+
offset: z.number().optional(),
|
|
396
|
+
search: z.string().optional().describe("Keyword filter"),
|
|
397
|
+
}, async ({ agentId, limit, offset, search }) => {
|
|
398
|
+
const r = await api.agentLogs(agentId, limit, offset, search);
|
|
399
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
403
|
+
// MEMORY
|
|
404
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
405
|
+
|
|
406
|
+
server.tool("get_agent_memory", "List memory entries for an agent", {
|
|
407
|
+
agentId: z.string().describe("Agent ID"),
|
|
408
|
+
limit: z.number().optional().describe("Max daily files"),
|
|
409
|
+
}, async ({ agentId, limit }) => {
|
|
410
|
+
const r = await api.agentMemory(agentId, limit);
|
|
411
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
server.tool("search_memory", "Search an agent's memory by keyword", {
|
|
415
|
+
agentId: z.string().describe("Agent ID"),
|
|
416
|
+
query: z.string().describe("Search keyword"),
|
|
417
|
+
}, async ({ agentId, query }) => {
|
|
418
|
+
const r = await api.searchMemory(agentId, query);
|
|
419
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
server.tool("clear_memory_context", "Clear an agent's context.md file", {
|
|
423
|
+
agentId: z.string().describe("Agent ID"),
|
|
424
|
+
}, async ({ agentId }) => {
|
|
425
|
+
const r = await api.clearMemoryContext(agentId);
|
|
426
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
430
|
+
// PAIRING
|
|
431
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
432
|
+
|
|
433
|
+
server.tool("list_paired_senders", "List paired/authorized senders", {}, async () => {
|
|
434
|
+
const r = await api.listPairing();
|
|
435
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
server.tool("pair_sender", "Manually authorize a sender", {
|
|
439
|
+
senderKey: z.string().describe("Format: channel:senderId"),
|
|
440
|
+
}, async ({ senderKey }) => {
|
|
441
|
+
const r = await api.pairSender(senderKey);
|
|
442
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
446
|
+
// CONFIG / ACCOUNTS
|
|
447
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
448
|
+
|
|
449
|
+
server.tool("list_accounts", "List Claude accounts (name → config directory)", {}, async () => {
|
|
450
|
+
const r = await api.listAccounts();
|
|
451
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
server.tool("get_service_config", "Get service settings (personalAgentsDir, personalRegistryDir, port, logLevel)", {}, async () => {
|
|
455
|
+
const r = await api.getServiceConfig();
|
|
456
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
server.tool("update_service_config", "Update service settings (restart required)", {
|
|
460
|
+
personalAgentsDir: z.string().optional(),
|
|
461
|
+
personalRegistryDir: z.string().optional(),
|
|
462
|
+
webUIPort: z.number().optional(),
|
|
463
|
+
logLevel: z.string().optional(),
|
|
464
|
+
logFile: z.string().optional(),
|
|
465
|
+
pairingCode: z.string().optional(),
|
|
466
|
+
webhookSecret: z.string().optional(),
|
|
467
|
+
multiModelEnabled: z.boolean().optional().describe("Enable/disable multi-model support via Ollama"),
|
|
468
|
+
platformDefaultExecutor: z.string().optional().describe("Default executor for all agents (e.g. 'claude' or 'ollama:gemma2')"),
|
|
469
|
+
ollamaBaseUrl: z.string().optional().describe("Ollama API base URL (default: http://localhost:11434)"),
|
|
470
|
+
}, async (body) => {
|
|
471
|
+
const r = await api.updateServiceConfig(body);
|
|
472
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
server.tool("test_provider", "Test an API key for a cloud provider (OpenAI, Grok, Gemini, Groq, Together, Mistral)", {
|
|
476
|
+
provider: z.string().describe("Provider name: openai, grok, gemini, groq, together, or mistral"),
|
|
477
|
+
}, async ({ provider }) => {
|
|
478
|
+
const r = await api.testProvider(provider);
|
|
479
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
483
|
+
// PROFILE
|
|
484
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
485
|
+
|
|
486
|
+
server.tool("get_profile", "Get the user's profile (name, role, industry, AI experience, interests)", {}, async () => {
|
|
487
|
+
const r = await api.getProfile();
|
|
488
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
server.tool("update_profile", "Update the user's profile", {
|
|
492
|
+
name: z.string().optional().describe("User's name"),
|
|
493
|
+
role: z.string().optional().describe("Role / job title"),
|
|
494
|
+
industry: z.string().optional().describe("Industry or domain"),
|
|
495
|
+
aiExperience: z.enum(["beginner", "intermediate", "advanced"]).optional().describe("AI experience level"),
|
|
496
|
+
interests: z.array(z.string()).optional().describe("List of interests or focus areas"),
|
|
497
|
+
}, async (body) => {
|
|
498
|
+
const r = await api.updateProfile(body);
|
|
499
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
503
|
+
// APPS
|
|
504
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
505
|
+
|
|
506
|
+
server.tool("list_apps", "List all registered apps", {}, async () => {
|
|
507
|
+
const r = await api.listApps();
|
|
508
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
server.tool("create_app", "Register a new app", {
|
|
512
|
+
name: z.string().describe("App name"),
|
|
513
|
+
url: z.string().optional(),
|
|
514
|
+
provider: z.string().optional(),
|
|
515
|
+
category: z.string().optional(),
|
|
516
|
+
githubRepo: z.string().optional(),
|
|
517
|
+
}, async (body) => {
|
|
518
|
+
const r = await api.createApp(body);
|
|
519
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
523
|
+
// FILES
|
|
524
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
525
|
+
|
|
526
|
+
server.tool("list_agent_files", "List files in an agent's FileStorage", {
|
|
527
|
+
agentId: z.string().describe("Agent ID"),
|
|
528
|
+
}, async ({ agentId }) => {
|
|
529
|
+
const r = await api.listFiles(agentId);
|
|
530
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
534
|
+
// REGISTRY
|
|
535
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
536
|
+
|
|
537
|
+
server.tool("browse_registry", "Browse the marketplace/registry by type", {
|
|
538
|
+
type: z.enum(["skills", "agents", "mcps", "prompts", "apps"]).describe("Registry type"),
|
|
539
|
+
}, async ({ type }) => {
|
|
540
|
+
const r = await api.marketplace(type);
|
|
541
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
545
|
+
// ADDITIONAL AGENTS
|
|
546
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
547
|
+
|
|
548
|
+
server.tool("recover_agent", "Recover agent from session corruption", {
|
|
549
|
+
agentId: z.string().describe("Agent ID"),
|
|
550
|
+
}, async ({ agentId }) => {
|
|
551
|
+
const r = await api.recoverAgent(agentId);
|
|
552
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
556
|
+
// ADDITIONAL SESSIONS
|
|
557
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
558
|
+
|
|
559
|
+
server.tool("delete_session", "Delete a specific sender's session", {
|
|
560
|
+
agentId: z.string().describe("Agent ID"),
|
|
561
|
+
senderId: z.string().describe("Sender ID (or 'default')"),
|
|
562
|
+
}, async ({ agentId, senderId }) => {
|
|
563
|
+
const r = await api.deleteSession(agentId, senderId);
|
|
564
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
568
|
+
// NAMED SESSION TABS
|
|
569
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
570
|
+
|
|
571
|
+
server.tool("create_session_tab", "Create a named session tab on an agent's chat page, optionally routing messages to a different agent. Use targetAgentId to make this tab talk directly to another agent (e.g. create an 'agentcreator' tab on hub that routes to agentcreator). Returns the tab object including the tabId to use as senderId.", {
|
|
572
|
+
agentId: z.string().describe("Agent ID whose chat page will host the tab (e.g. 'hub')"),
|
|
573
|
+
tabId: z.string().describe("Unique tab ID — use a short slug like 'agentcreator-1' or 'project-alpha'"),
|
|
574
|
+
label: z.string().describe("Human-readable tab label shown in the UI"),
|
|
575
|
+
targetAgentId: z.string().optional().describe("If set, messages sent in this tab route to this agent instead of agentId. Use this to create a dedicated channel to a specialist agent."),
|
|
576
|
+
}, async ({ agentId, tabId, label, targetAgentId }) => {
|
|
577
|
+
const r = await api.createSessionTab(agentId, tabId, label, targetAgentId);
|
|
578
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
server.tool("list_session_tabs", "List all named session tabs for an agent (includes closed/archived sessions with last message preview)", {
|
|
582
|
+
agentId: z.string().describe("Agent ID"),
|
|
583
|
+
}, async ({ agentId }) => {
|
|
584
|
+
const r = await api.listSessionTabs(agentId);
|
|
585
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
server.tool("get_session_tab_history", "Get the full conversation history for a specific named session tab", {
|
|
589
|
+
agentId: z.string().describe("Agent ID"),
|
|
590
|
+
tabId: z.string().describe("Tab ID (from list_session_tabs)"),
|
|
591
|
+
}, async ({ agentId, tabId }) => {
|
|
592
|
+
const r = await api.getSessionTabHistory(agentId, tabId);
|
|
593
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
server.tool("rename_session_tab", "Rename a named session tab", {
|
|
597
|
+
agentId: z.string().describe("Agent ID"),
|
|
598
|
+
tabId: z.string().describe("Tab ID (from list_session_tabs)"),
|
|
599
|
+
label: z.string().describe("New name for the session"),
|
|
600
|
+
}, async ({ agentId, tabId, label }) => {
|
|
601
|
+
const r = await api.renameSessionTab(agentId, tabId, label);
|
|
602
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
603
|
+
});
|
|
604
|
+
|
|
605
|
+
server.tool("delete_session_tab", "Permanently delete a named session tab and its Claude session state", {
|
|
606
|
+
agentId: z.string().describe("Agent ID"),
|
|
607
|
+
tabId: z.string().describe("Tab ID (from list_session_tabs)"),
|
|
608
|
+
}, async ({ agentId, tabId }) => {
|
|
609
|
+
const r = await api.deleteSessionTab(agentId, tabId);
|
|
610
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
614
|
+
// ADDITIONAL TASKS
|
|
615
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
616
|
+
|
|
617
|
+
server.tool("get_task_stats", "Get task statistics (counts by status) for an agent", {
|
|
618
|
+
agentId: z.string().describe("Agent ID"),
|
|
619
|
+
}, async ({ agentId }) => {
|
|
620
|
+
const r = await api.taskStats(agentId);
|
|
621
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
server.tool("create_project", "Create a project for organizing tasks", {
|
|
625
|
+
agentId: z.string().describe("Agent ID"),
|
|
626
|
+
name: z.string().describe("Project name"),
|
|
627
|
+
}, async ({ agentId, name }) => {
|
|
628
|
+
const r = await api.createProject(agentId, name);
|
|
629
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
633
|
+
// PROJECTS (cross-agent initiatives)
|
|
634
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
635
|
+
|
|
636
|
+
server.tool("list_projects", "List all projects (cross-agent initiatives)", {}, async () => {
|
|
637
|
+
const r = await api.listProjects();
|
|
638
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
server.tool("get_project", "Get a project's full details and task rollup", {
|
|
642
|
+
projectId: z.string().describe("Project ID"),
|
|
643
|
+
}, async ({ projectId }) => {
|
|
644
|
+
const r = await api.getProject(projectId);
|
|
645
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
server.tool("create_initiative", "Create a new cross-agent project/initiative", {
|
|
649
|
+
name: z.string().describe("Project name"),
|
|
650
|
+
description: z.string().optional().describe("What this project is about"),
|
|
651
|
+
owner: z.string().optional().describe("Agent ID that owns the project (defaults to caller)"),
|
|
652
|
+
teamMembers: z.array(z.string()).optional().describe("Agent IDs participating in the project"),
|
|
653
|
+
plan: z.string().optional().describe("Markdown plan for the project"),
|
|
654
|
+
notes: z.string().optional().describe("Additional notes"),
|
|
655
|
+
}, async ({ name, description, owner, teamMembers, plan, notes }) => {
|
|
656
|
+
const r = await api.createInitiative({ name, description, owner, teamMembers, plan, notes });
|
|
657
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
server.tool("update_project", "Update a project's details, plan, status, or notes", {
|
|
661
|
+
projectId: z.string().describe("Project ID"),
|
|
662
|
+
name: z.string().optional(),
|
|
663
|
+
description: z.string().optional(),
|
|
664
|
+
status: z.enum(["active", "paused", "completed", "archived"]).optional(),
|
|
665
|
+
owner: z.string().optional(),
|
|
666
|
+
teamMembers: z.array(z.string()).optional(),
|
|
667
|
+
plan: z.string().optional(),
|
|
668
|
+
notes: z.string().optional(),
|
|
669
|
+
}, async ({ projectId, ...body }) => {
|
|
670
|
+
const r = await api.updateProject(projectId, body);
|
|
671
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
server.tool("delete_project", "Delete a project", {
|
|
675
|
+
projectId: z.string().describe("Project ID"),
|
|
676
|
+
}, async ({ projectId }) => {
|
|
677
|
+
const r = await api.deleteProject(projectId);
|
|
678
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
server.tool("link_to_project", "Link an entity (task, agent, org, app, artifact) to a project", {
|
|
682
|
+
projectId: z.string().describe("Project ID"),
|
|
683
|
+
type: z.enum(["task", "agent", "org", "app", "artifact"]).describe("Entity type to link"),
|
|
684
|
+
value: z.any().describe("Entity value — for task: {agentId, taskId}; for agent/org/app: string ID; for artifact: {name, path?, url?, type?}"),
|
|
685
|
+
}, async ({ projectId, type, value }) => {
|
|
686
|
+
const r = await api.linkToProject(projectId, type, value);
|
|
687
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
688
|
+
});
|
|
689
|
+
|
|
690
|
+
server.tool("unlink_from_project", "Remove a linked entity from a project", {
|
|
691
|
+
projectId: z.string().describe("Project ID"),
|
|
692
|
+
type: z.enum(["task", "agent", "org", "app", "artifact"]).describe("Entity type to unlink"),
|
|
693
|
+
value: z.any().describe("Entity value to unlink"),
|
|
694
|
+
}, async ({ projectId, type, value }) => {
|
|
695
|
+
const r = await api.unlinkFromProject(projectId, type, value);
|
|
696
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
server.tool("get_project_status", "Get a formatted status report for a project with progress and task details", {
|
|
700
|
+
projectId: z.string().describe("Project ID"),
|
|
701
|
+
}, async ({ projectId }) => {
|
|
702
|
+
const r = await api.getProjectStatus(projectId);
|
|
703
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
server.tool("execute_project", "Start autonomous execution of a project — creates a scheduled goal that works through tasks", {
|
|
707
|
+
projectId: z.string().describe("Project ID"),
|
|
708
|
+
schedule: z.string().optional().describe("Cron schedule for execution checks (default: every 15 min)"),
|
|
709
|
+
reportTo: z.string().optional().describe("Channel:chatId for notifications (e.g. slack:C0ALHTDD6JF)"),
|
|
710
|
+
}, async ({ projectId, schedule, reportTo }) => {
|
|
711
|
+
const r = await api.executeProject(projectId, { schedule, reportTo });
|
|
712
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
server.tool("pause_project", "Pause autonomous execution of a project", {
|
|
716
|
+
projectId: z.string().describe("Project ID"),
|
|
717
|
+
}, async ({ projectId }) => {
|
|
718
|
+
const r = await api.pauseProject(projectId);
|
|
719
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
720
|
+
});
|
|
721
|
+
|
|
722
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
723
|
+
// ADDITIONAL AUTOMATIONS
|
|
724
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
725
|
+
|
|
726
|
+
server.tool("delete_goal", "Delete a goal from an agent", {
|
|
727
|
+
agentId: z.string(), goalId: z.string(),
|
|
728
|
+
}, async ({ agentId, goalId }) => {
|
|
729
|
+
const r = await api.deleteGoal(agentId, goalId);
|
|
730
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
731
|
+
});
|
|
732
|
+
|
|
733
|
+
server.tool("get_goal_history", "Get run history for a goal", {
|
|
734
|
+
agentId: z.string(), goalId: z.string(),
|
|
735
|
+
}, async ({ agentId, goalId }) => {
|
|
736
|
+
const r = await api.goalHistory(agentId, goalId);
|
|
737
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
738
|
+
});
|
|
739
|
+
|
|
740
|
+
server.tool("toggle_cron", "Enable or disable a cron job", {
|
|
741
|
+
agentId: z.string(), index: z.number().describe("Cron job index"),
|
|
742
|
+
}, async ({ agentId, index }) => {
|
|
743
|
+
const r = await api.toggleCron(agentId, index);
|
|
744
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
server.tool("trigger_cron", "Manually trigger a cron job run", {
|
|
748
|
+
agentId: z.string(), index: z.number().describe("Cron job index"),
|
|
749
|
+
}, async ({ agentId, index }) => {
|
|
750
|
+
const r = await api.triggerCron(agentId, index);
|
|
751
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
server.tool("get_cron_history", "Get run history for a cron job", {
|
|
755
|
+
agentId: z.string(), index: z.number().describe("Cron job index"),
|
|
756
|
+
}, async ({ agentId, index }) => {
|
|
757
|
+
const r = await api.cronHistory(agentId, index);
|
|
758
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
server.tool("delete_cron", "Delete a cron job", {
|
|
762
|
+
agentId: z.string(), index: z.number().describe("Cron job index"),
|
|
763
|
+
}, async ({ agentId, index }) => {
|
|
764
|
+
const r = await api.deleteCron(agentId, index);
|
|
765
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
769
|
+
// MCP KEYS & CONNECTIONS
|
|
770
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
771
|
+
|
|
772
|
+
server.tool("list_mcp_keys", "List MCP API keys for an agent", {
|
|
773
|
+
agentId: z.string().describe("Agent ID"),
|
|
774
|
+
}, async ({ agentId }) => {
|
|
775
|
+
const r = await api.listMcpKeys(agentId);
|
|
776
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
777
|
+
});
|
|
778
|
+
|
|
779
|
+
server.tool("save_mcp_key", "Save an MCP API key for an agent", {
|
|
780
|
+
agentId: z.string(), mcpName: z.string(), envVar: z.string().describe("Environment variable name (e.g. GMAIL_ACCESS_TOKEN)"), value: z.string().describe("Secret value"),
|
|
781
|
+
}, async ({ agentId, mcpName, envVar, value }) => {
|
|
782
|
+
const r = await api.saveMcpKey(agentId, mcpName, envVar, value);
|
|
783
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
server.tool("delete_mcp_key", "Delete an MCP API key", {
|
|
787
|
+
agentId: z.string(), mcpName: z.string(),
|
|
788
|
+
}, async ({ agentId, mcpName }) => {
|
|
789
|
+
const r = await api.deleteMcpKey(agentId, mcpName);
|
|
790
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
server.tool("list_mcp_connections", "List MCP connections for an agent", {
|
|
794
|
+
agentId: z.string().describe("Agent ID"),
|
|
795
|
+
}, async ({ agentId }) => {
|
|
796
|
+
const r = await api.listMcpConnections(agentId);
|
|
797
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
798
|
+
});
|
|
799
|
+
|
|
800
|
+
server.tool("create_mcp_connection", "Create an MCP connection instance for an agent", {
|
|
801
|
+
agentId: z.string(), baseMcp: z.string().describe("Base MCP server name from registry"), label: z.string().describe("Human-readable label"), envVar: z.string().describe("Environment variable name"), value: z.string().describe("Secret value"), description: z.string().optional(),
|
|
802
|
+
}, async ({ agentId, ...body }) => {
|
|
803
|
+
const r = await api.createMcpConnection(agentId, body);
|
|
804
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
server.tool("delete_mcp_connection", "Delete an MCP connection", {
|
|
808
|
+
agentId: z.string(), instanceName: z.string(),
|
|
809
|
+
}, async ({ agentId, instanceName }) => {
|
|
810
|
+
const r = await api.deleteMcpConnection(agentId, instanceName);
|
|
811
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
815
|
+
// ADDITIONAL CHANNELS
|
|
816
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
817
|
+
|
|
818
|
+
server.tool("remove_agent_route", "Remove an agent's route from a channel", {
|
|
819
|
+
channelName: z.string(), agentId: z.string(),
|
|
820
|
+
}, async ({ channelName, agentId }) => {
|
|
821
|
+
const r = await api.removeAgentRoute(channelName, agentId);
|
|
822
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
server.tool("add_monitored_chat", "Add a monitored chat ID to a channel", {
|
|
826
|
+
channelName: z.string(), chatId: z.string(),
|
|
827
|
+
}, async ({ channelName, chatId }) => {
|
|
828
|
+
const r = await api.addMonitoredChat(channelName, chatId);
|
|
829
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
server.tool("remove_monitored_chat", "Remove a monitored chat from a channel", {
|
|
833
|
+
channelName: z.string(), chatId: z.string(),
|
|
834
|
+
}, async ({ channelName, chatId }) => {
|
|
835
|
+
const r = await api.removeMonitoredChat(channelName, chatId);
|
|
836
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
837
|
+
});
|
|
838
|
+
|
|
839
|
+
server.tool("get_sticky_routing", "Get sticky routing config for all channels", {}, async () => {
|
|
840
|
+
const r = await api.stickyRouting();
|
|
841
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
845
|
+
// ADDITIONAL REGISTRY
|
|
846
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
847
|
+
|
|
848
|
+
server.tool("install_registry_item", "Install a skill/MCP/agent from the registry", {
|
|
849
|
+
id: z.string().describe("Registry item ID"),
|
|
850
|
+
type: z.string().describe("Item type: skill, mcp, agent, prompt"),
|
|
851
|
+
}, async ({ id, type }) => {
|
|
852
|
+
const r = await api.installMarketplace(id, type);
|
|
853
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
server.tool("assign_to_agent", "Assign a skill or MCP to an agent", {
|
|
857
|
+
agentId: z.string(), itemId: z.string(), type: z.string().describe("skill or mcp"),
|
|
858
|
+
}, async ({ agentId, itemId, type }) => {
|
|
859
|
+
const r = await api.assignToAgent(agentId, itemId, type);
|
|
860
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
861
|
+
});
|
|
862
|
+
|
|
863
|
+
server.tool("scan_skills", "Scan a directory for unregistered skills", {
|
|
864
|
+
dir: z.string().optional().describe("Directory to scan (default: ~/.claude/commands)"),
|
|
865
|
+
}, async ({ dir }) => {
|
|
866
|
+
const r = await api.scanSkills(dir);
|
|
867
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
server.tool("create_prompt", "Create a new prompt template in the registry", {
|
|
871
|
+
id: z.string(), name: z.string(), content: z.string(),
|
|
872
|
+
}, async ({ id, name, content }) => {
|
|
873
|
+
const r = await api.createPrompt(id, name, content);
|
|
874
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
server.tool("create_skill", "Create a skill file and register it. Writes the .md file to the correct location based on scope and adds a registry entry.", {
|
|
878
|
+
id: z.string().describe("Skill ID (snake_case, matches filename)"),
|
|
879
|
+
name: z.string().describe("Human-readable skill name"),
|
|
880
|
+
description: z.string().describe("One-line description of what the skill does and when to use it"),
|
|
881
|
+
content: z.string().describe("The skill body (markdown instructions, everything below the frontmatter)"),
|
|
882
|
+
scope: z.enum(["global", "personal", "org", "agent"]).describe("Where to place the skill: global (~/.claude/commands), personal (MyAIforOne Drive/PersonalAgents/skills), org (MyAIforOne Drive/PersonalAgents/{orgName}/skills), agent ({agentHome}/skills)"),
|
|
883
|
+
orgName: z.string().optional().describe("Required when scope is 'org' — the organization name"),
|
|
884
|
+
agentId: z.string().optional().describe("Required when scope is 'agent' — the agent ID"),
|
|
885
|
+
}, async ({ id, name, description, content, scope, orgName, agentId }) => {
|
|
886
|
+
const r = await api.createSkill(id, name, description, content, scope, orgName, agentId);
|
|
887
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
server.tool("add_mcp_to_registry", "Add an MCP server to the registry", {
|
|
891
|
+
id: z.string(), name: z.string(), mcpType: z.string().describe("'stdio' or 'http'"), url: z.string().optional(), command: z.string().optional(), args: z.array(z.string()).optional(), description: z.string().optional(),
|
|
892
|
+
}, async (body) => {
|
|
893
|
+
const r = await api.addMcpToRegistry(body);
|
|
894
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
898
|
+
// ADDITIONAL APPS
|
|
899
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
900
|
+
|
|
901
|
+
server.tool("update_app", "Update an existing app", {
|
|
902
|
+
id: z.string().describe("App ID"),
|
|
903
|
+
name: z.string().optional(), url: z.string().optional(),
|
|
904
|
+
category: z.string().optional(), status: z.string().optional(),
|
|
905
|
+
}, async ({ id, ...body }) => {
|
|
906
|
+
const r = await api.updateApp(id, body);
|
|
907
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
908
|
+
});
|
|
909
|
+
|
|
910
|
+
server.tool("delete_app", "Delete an app", {
|
|
911
|
+
id: z.string().describe("App ID"),
|
|
912
|
+
}, async ({ id }) => {
|
|
913
|
+
const r = await api.deleteApp(id);
|
|
914
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
server.tool("check_app_health", "Check an app's health/status", {
|
|
918
|
+
id: z.string().describe("App ID"),
|
|
919
|
+
}, async ({ id }) => {
|
|
920
|
+
const r = await api.checkAppHealth(id);
|
|
921
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
922
|
+
});
|
|
923
|
+
|
|
924
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
925
|
+
// ADDITIONAL CONFIG
|
|
926
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
927
|
+
|
|
928
|
+
server.tool("add_account", "Add a Claude account (name + config directory path)", {
|
|
929
|
+
name: z.string().describe("Account name"),
|
|
930
|
+
path: z.string().describe("Config directory path (e.g. ~/.claude)"),
|
|
931
|
+
}, async ({ name, path }) => {
|
|
932
|
+
const r = await api.addAccount(name, path);
|
|
933
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
934
|
+
});
|
|
935
|
+
|
|
936
|
+
server.tool("delete_account", "Remove a Claude account", {
|
|
937
|
+
name: z.string().describe("Account name"),
|
|
938
|
+
}, async ({ name }) => {
|
|
939
|
+
const r = await api.deleteAccount(name);
|
|
940
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
server.tool("check_account_status", "Check if a Claude account is authenticated", {
|
|
944
|
+
name: z.string().describe("Account name"),
|
|
945
|
+
}, async ({ name }) => {
|
|
946
|
+
const r = await api.accountStatus(name);
|
|
947
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
server.tool("start_account_login", "Start OAuth login flow for a Claude account — returns URL to open", {
|
|
951
|
+
name: z.string().describe("Account name"),
|
|
952
|
+
path: z.string().describe("Config directory path"),
|
|
953
|
+
}, async ({ name, path }) => {
|
|
954
|
+
const r = await api.startLogin(name, path);
|
|
955
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
959
|
+
// ADDITIONAL PAIRING
|
|
960
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
961
|
+
|
|
962
|
+
server.tool("unpair_sender", "Remove an authorized sender", {
|
|
963
|
+
senderKey: z.string().describe("Format: channel:senderId"),
|
|
964
|
+
}, async ({ senderKey }) => {
|
|
965
|
+
const r = await api.unpairSender(senderKey);
|
|
966
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
967
|
+
});
|
|
968
|
+
|
|
969
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
970
|
+
// LAB / PLATFORM AGENTS
|
|
971
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
972
|
+
|
|
973
|
+
server.tool("get_platform_agents", "List platform-managed creator agents (used by Lab for creating agents, skills, apps, and prompts)", {}, async () => {
|
|
974
|
+
const r = await api.getPlatformAgents();
|
|
975
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
976
|
+
});
|
|
977
|
+
|
|
978
|
+
server.tool("browse_dirs", "Browse subdirectories of a given path (for Lab directory picker)", {
|
|
979
|
+
path: z.string().optional().describe("Directory path to list (defaults to home directory, supports ~ prefix)"),
|
|
980
|
+
}, async ({ path }) => {
|
|
981
|
+
const r = await api.browseDirs(path);
|
|
982
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
986
|
+
// ADDITIONAL CONFIG — LOGIN
|
|
987
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
988
|
+
|
|
989
|
+
server.tool("submit_login_code", "Submit authentication code for account login", {
|
|
990
|
+
accountName: z.string().describe("Account name"),
|
|
991
|
+
code: z.string().describe("Authentication code from OAuth flow"),
|
|
992
|
+
}, async ({ accountName, code }) => {
|
|
993
|
+
const r = await api.submitLoginCode(accountName, code);
|
|
994
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
995
|
+
});
|
|
996
|
+
|
|
997
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
998
|
+
// MARKETPLACE EXTRAS
|
|
999
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1000
|
+
|
|
1001
|
+
server.tool("set_platform_default", "Set a marketplace item as the platform default", {
|
|
1002
|
+
type: z.string().describe("Item type (e.g. skill, mcp, prompt)"),
|
|
1003
|
+
id: z.string().describe("Item ID to set as default"),
|
|
1004
|
+
}, async ({ type, id }) => {
|
|
1005
|
+
const r = await api.setPlatformDefault(type, id);
|
|
1006
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1007
|
+
});
|
|
1008
|
+
|
|
1009
|
+
server.tool("import_skills", "Import scanned skills into an agent", {
|
|
1010
|
+
agentId: z.string().describe("Agent ID"),
|
|
1011
|
+
skills: z.array(z.string()).describe("Array of skill names to import"),
|
|
1012
|
+
}, async ({ agentId, skills }) => {
|
|
1013
|
+
const r = await api.importSkills(agentId, skills);
|
|
1014
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1015
|
+
});
|
|
1016
|
+
|
|
1017
|
+
server.tool("get_prompt_trigger", "Get the current prompt trigger character", {}, async () => {
|
|
1018
|
+
const r = await api.getPromptTrigger();
|
|
1019
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1020
|
+
});
|
|
1021
|
+
|
|
1022
|
+
server.tool("set_prompt_trigger", "Set the prompt trigger character", {
|
|
1023
|
+
trigger: z.string().describe("Trigger character (e.g. / or !)"),
|
|
1024
|
+
}, async ({ trigger }) => {
|
|
1025
|
+
const r = await api.setPromptTrigger(trigger);
|
|
1026
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1027
|
+
});
|
|
1028
|
+
|
|
1029
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1030
|
+
// CHAT STREAMING
|
|
1031
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1032
|
+
|
|
1033
|
+
server.tool("get_chat_job_raw", "Get raw output lines from a streaming chat job", {
|
|
1034
|
+
jobId: z.string().describe("Job ID from startStream"),
|
|
1035
|
+
after: z.number().optional().describe("Line index to start from (for polling)"),
|
|
1036
|
+
}, async ({ jobId, after }) => {
|
|
1037
|
+
const r = await api.getChatJobRaw(jobId, after);
|
|
1038
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1042
|
+
// ADDITIONAL FILES
|
|
1043
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1044
|
+
|
|
1045
|
+
server.tool("download_agent_file", "Download a file from an agent's file storage", {
|
|
1046
|
+
agentId: z.string().describe("Agent ID"),
|
|
1047
|
+
path: z.string().describe("File path within agent storage"),
|
|
1048
|
+
}, async ({ agentId, path }) => {
|
|
1049
|
+
const r = await api.downloadFile(agentId, path);
|
|
1050
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1051
|
+
});
|
|
1052
|
+
|
|
1053
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1054
|
+
// ADDITIONAL DASHBOARD
|
|
1055
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1056
|
+
|
|
1057
|
+
server.tool("get_agent_registry", "Get the agent registry with delegation keywords", {}, async () => {
|
|
1058
|
+
const r = await api.agentRegistry();
|
|
1059
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1060
|
+
});
|
|
1061
|
+
|
|
1062
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1063
|
+
// HEARTBEAT
|
|
1064
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1065
|
+
|
|
1066
|
+
server.tool("trigger_heartbeat", "Trigger a heartbeat check for an agent (runs async, returns immediately)", {
|
|
1067
|
+
agentId: z.string().describe("Agent ID"),
|
|
1068
|
+
triggeredBy: z.string().optional().describe("Label for trigger source (default: manual)"),
|
|
1069
|
+
}, async ({ agentId, triggeredBy }) => {
|
|
1070
|
+
const r = await api.triggerHeartbeat(agentId, triggeredBy);
|
|
1071
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1072
|
+
});
|
|
1073
|
+
|
|
1074
|
+
server.tool("get_heartbeat_history", "Get recent heartbeat run history for an agent", {
|
|
1075
|
+
agentId: z.string().describe("Agent ID"),
|
|
1076
|
+
limit: z.number().optional().describe("Max entries (default 20)"),
|
|
1077
|
+
}, async ({ agentId, limit }) => {
|
|
1078
|
+
const r = await api.heartbeatHistory(agentId, limit);
|
|
1079
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1080
|
+
});
|
|
1081
|
+
|
|
1082
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1083
|
+
// WIKI SYNC
|
|
1084
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1085
|
+
|
|
1086
|
+
server.tool("trigger_wiki_sync", "Trigger a wiki sync for an agent (runs async, returns immediately)", {
|
|
1087
|
+
agentId: z.string().describe("Agent ID"),
|
|
1088
|
+
triggeredBy: z.string().optional().describe("Label for trigger source (default: manual)"),
|
|
1089
|
+
}, async ({ agentId, triggeredBy }) => {
|
|
1090
|
+
const r = await api.triggerWikiSync(agentId, triggeredBy);
|
|
1091
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1092
|
+
});
|
|
1093
|
+
|
|
1094
|
+
server.tool("get_wiki_sync_history", "Get recent wiki sync run history for an agent", {
|
|
1095
|
+
agentId: z.string().describe("Agent ID"),
|
|
1096
|
+
limit: z.number().optional().describe("Max entries (default 20)"),
|
|
1097
|
+
}, async ({ agentId, limit }) => {
|
|
1098
|
+
const r = await api.wikiSyncHistory(agentId, limit);
|
|
1099
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1100
|
+
});
|
|
1101
|
+
|
|
1102
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1103
|
+
// WHOAMI
|
|
1104
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1105
|
+
|
|
1106
|
+
server.tool("whoami", "Get Claude auth status for the account an agent uses", {
|
|
1107
|
+
agentId: z.string().describe("Agent ID"),
|
|
1108
|
+
}, async ({ agentId }) => {
|
|
1109
|
+
const r = await api.whoami(agentId);
|
|
1110
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1111
|
+
});
|
|
1112
|
+
|
|
1113
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1114
|
+
// CHANGELOG
|
|
1115
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1116
|
+
|
|
1117
|
+
server.tool("get_changelog", "Get recent changelog (parsed from git log)", {}, async () => {
|
|
1118
|
+
const r = await api.changelog();
|
|
1119
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1120
|
+
});
|
|
1121
|
+
|
|
1122
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1123
|
+
// INSTALL XBAR (macOS only)
|
|
1124
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1125
|
+
|
|
1126
|
+
server.tool("install_xbar", "Install xbar status bar plugin (macOS only)", {}, async () => {
|
|
1127
|
+
const r = await api.installXbar();
|
|
1128
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1129
|
+
});
|
|
1130
|
+
|
|
1131
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1132
|
+
// CHAT STREAMING
|
|
1133
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1134
|
+
|
|
1135
|
+
server.tool("start_stream", "Start a streaming chat with an agent — returns a jobId to poll with get_chat_job_raw", {
|
|
1136
|
+
agentId: z.string().describe("Agent ID"),
|
|
1137
|
+
text: z.string().describe("Message text"),
|
|
1138
|
+
accountOverride: z.string().optional().describe("Use a different Claude account"),
|
|
1139
|
+
}, async ({ agentId, text, accountOverride }) => {
|
|
1140
|
+
const r = await api.startStream(agentId, text, accountOverride);
|
|
1141
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1142
|
+
});
|
|
1143
|
+
|
|
1144
|
+
server.tool("stop_chat_job", "Stop a running chat job", {
|
|
1145
|
+
jobId: z.string().describe("Job ID from start_stream"),
|
|
1146
|
+
}, async ({ jobId }) => {
|
|
1147
|
+
const r = await api.stopJob(jobId);
|
|
1148
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1149
|
+
});
|
|
1150
|
+
|
|
1151
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1152
|
+
// WEBHOOK
|
|
1153
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1154
|
+
|
|
1155
|
+
server.tool("send_webhook", "Send a message to an agent via webhook (external trigger)", {
|
|
1156
|
+
agentId: z.string().describe("Agent ID"),
|
|
1157
|
+
text: z.string().describe("Message text"),
|
|
1158
|
+
secret: z.string().optional().describe("Webhook secret (x-webhook-secret header)"),
|
|
1159
|
+
channel: z.string().optional().describe("Override reply channel"),
|
|
1160
|
+
chatId: z.string().optional().describe("Override reply chat ID"),
|
|
1161
|
+
}, async ({ agentId, text, secret, channel, chatId }) => {
|
|
1162
|
+
const r = await api.sendWebhook(agentId, text, secret, channel, chatId);
|
|
1163
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1164
|
+
});
|
|
1165
|
+
|
|
1166
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1167
|
+
// SAAS INTEGRATION
|
|
1168
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1169
|
+
|
|
1170
|
+
server.tool("get_saas_config", "Get SaaS connection configuration (base URL, connection status)", {}, async () => {
|
|
1171
|
+
const r = await api.getSaasConfig();
|
|
1172
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1173
|
+
});
|
|
1174
|
+
|
|
1175
|
+
server.tool("update_saas_config", "Configure SaaS connection (base URL and API key)", {
|
|
1176
|
+
baseUrl: z.string().optional().describe("SaaS platform base URL"),
|
|
1177
|
+
apiKey: z.string().optional().describe("SaaS API key"),
|
|
1178
|
+
}, async ({ baseUrl, apiKey }) => {
|
|
1179
|
+
const r = await api.updateSaasConfig(baseUrl, apiKey);
|
|
1180
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1183
|
+
server.tool("test_saas_connection", "Test SaaS connection with current or provided credentials", {
|
|
1184
|
+
baseUrl: z.string().optional().describe("Override base URL (uses saved if omitted)"),
|
|
1185
|
+
apiKey: z.string().optional().describe("Override API key (uses saved if omitted)"),
|
|
1186
|
+
}, async ({ baseUrl, apiKey }) => {
|
|
1187
|
+
const r = await api.testSaasConnection(baseUrl, apiKey);
|
|
1188
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1189
|
+
});
|
|
1190
|
+
|
|
1191
|
+
server.tool("publish_to_saas", "Publish a skill, prompt, agent, or app to the connected SaaS platform", {
|
|
1192
|
+
type: z.enum(["skill", "prompt", "agent", "app"]).describe("Type of resource to publish"),
|
|
1193
|
+
id: z.string().describe("ID of the resource to publish"),
|
|
1194
|
+
destination: z.enum(["library", "marketplace"]).optional().describe("Publish to library or marketplace (default: library)"),
|
|
1195
|
+
}, async ({ type, id, destination }) => {
|
|
1196
|
+
const r = await api.publishToSaas(type, id, destination);
|
|
1197
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1198
|
+
});
|
|
1199
|
+
|
|
1200
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1201
|
+
// FILE UPLOAD
|
|
1202
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1203
|
+
|
|
1204
|
+
server.tool("upload_file", "Upload a file to an agent's FileStorage (send base64-encoded content)", {
|
|
1205
|
+
agentId: z.string().describe("Agent ID"),
|
|
1206
|
+
fileName: z.string().describe("File name (e.g. report.pdf)"),
|
|
1207
|
+
base64Content: z.string().describe("File content encoded as base64"),
|
|
1208
|
+
mode: z.enum(["temp", "permanent"]).optional().describe("Storage mode (default: temp)"),
|
|
1209
|
+
}, async ({ agentId, fileName, base64Content, mode }) => {
|
|
1210
|
+
const r = await api.uploadFile(agentId, fileName, base64Content, mode);
|
|
1211
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1212
|
+
});
|
|
1213
|
+
|
|
1214
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1215
|
+
// USER GUIDE
|
|
1216
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1217
|
+
|
|
1218
|
+
server.tool("get_user_guide", "Get the full platform user guide — every page, button, action, API endpoint, and MCP tool documented", {}, async () => {
|
|
1219
|
+
const r = await api.getUserGuide();
|
|
1220
|
+
return { content: [{ type: "text", text: r.content || JSON.stringify(r, null, 2) }] };
|
|
1221
|
+
});
|
|
1222
|
+
|
|
1223
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1224
|
+
// MEMORY WRITE
|
|
1225
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1226
|
+
|
|
1227
|
+
server.tool("write_memory", "Write content to an agent's memory (context.md or daily journal)", {
|
|
1228
|
+
agentId: z.string().describe("Agent ID"),
|
|
1229
|
+
content: z.string().describe("Content to write"),
|
|
1230
|
+
target: z.enum(["context", "daily", "overwrite"]).optional().describe("Where to write: 'context' appends to context.md, 'daily' appends to today's journal, 'overwrite' replaces context.md entirely (default: overwrite)"),
|
|
1231
|
+
}, async ({ agentId, content, target }) => {
|
|
1232
|
+
const r = await api.writeMemory(agentId, content, target);
|
|
1233
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1234
|
+
});
|
|
1235
|
+
|
|
1236
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1237
|
+
// SKILL CONTENT
|
|
1238
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1239
|
+
|
|
1240
|
+
server.tool("get_skill_content", "Read the full content of a skill file (markdown)", {
|
|
1241
|
+
path: z.string().describe("Absolute path to the skill .md file (from get_agent_skills or browse_registry)"),
|
|
1242
|
+
}, async ({ path }) => {
|
|
1243
|
+
const r = await api.getSkillContent(path);
|
|
1244
|
+
return { content: [{ type: "text", text: r.content || JSON.stringify(r, null, 2) }] };
|
|
1245
|
+
});
|
|
1246
|
+
|
|
1247
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1248
|
+
// GOAL & CRON UPDATE
|
|
1249
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1250
|
+
|
|
1251
|
+
server.tool("update_goal", "Update an existing goal's configuration (description, schedule, budget, etc.)", {
|
|
1252
|
+
agentId: z.string().describe("Agent ID"),
|
|
1253
|
+
goalId: z.string().describe("Goal ID to update"),
|
|
1254
|
+
description: z.string().optional().describe("New description"),
|
|
1255
|
+
successMetric: z.string().optional().describe("New success metric"),
|
|
1256
|
+
enabled: z.boolean().optional().describe("Enable or disable"),
|
|
1257
|
+
budget: z.number().optional().describe("Max daily USD budget"),
|
|
1258
|
+
heartbeat: z.any().optional().describe("Updated heartbeat schedule config"),
|
|
1259
|
+
reportTargets: z.any().optional().describe("Updated report channel targets"),
|
|
1260
|
+
}, async ({ agentId, goalId, ...updates }) => {
|
|
1261
|
+
const r = await api.updateGoal(agentId, goalId, updates);
|
|
1262
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1263
|
+
});
|
|
1264
|
+
|
|
1265
|
+
server.tool("update_cron", "Update an existing cron job's schedule, message, or channel", {
|
|
1266
|
+
agentId: z.string().describe("Agent ID"),
|
|
1267
|
+
index: z.number().describe("Cron index (0-based)"),
|
|
1268
|
+
schedule: z.string().optional().describe("New cron expression"),
|
|
1269
|
+
message: z.string().optional().describe("New message text"),
|
|
1270
|
+
channel: z.string().optional().describe("New channel"),
|
|
1271
|
+
chatId: z.string().optional().describe("New chat ID"),
|
|
1272
|
+
enabled: z.boolean().optional().describe("Enable or disable"),
|
|
1273
|
+
}, async ({ agentId, index, ...updates }) => {
|
|
1274
|
+
const r = await api.updateCron(agentId, index, updates);
|
|
1275
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1276
|
+
});
|
|
1277
|
+
|
|
1278
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1279
|
+
// SERVICE RESTART
|
|
1280
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1281
|
+
|
|
1282
|
+
server.tool("restart_service", "Restart the MyAgent gateway service (required after config changes to channels, service settings, etc.)", {}, async () => {
|
|
1283
|
+
const r = await api.restart();
|
|
1284
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1285
|
+
});
|
|
1286
|
+
|
|
1287
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1288
|
+
// DISCOVERY
|
|
1289
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1290
|
+
|
|
1291
|
+
server.tool("list_capabilities", "Get a structured summary of all platform capabilities grouped by category — use this to understand what you can do", {}, async () => {
|
|
1292
|
+
const r = await api.listCapabilities();
|
|
1293
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1294
|
+
});
|
|
1295
|
+
|
|
1296
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1297
|
+
// DRIVE — browse, read, search the PersonalAgents data drive
|
|
1298
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1299
|
+
|
|
1300
|
+
server.tool("browse_drive", "Browse files and folders in the PersonalAgents data drive (where all agent data, memory, skills, registry files live)", {
|
|
1301
|
+
path: z.string().optional().describe("Path to browse (default: drive root). Can be absolute or relative to drive root."),
|
|
1302
|
+
}, async ({ path }) => {
|
|
1303
|
+
const r = await api.browseDrive(path);
|
|
1304
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1305
|
+
});
|
|
1306
|
+
|
|
1307
|
+
server.tool("read_drive_file", "Read a file from the PersonalAgents data drive (max 1MB)", {
|
|
1308
|
+
path: z.string().describe("Absolute path to the file"),
|
|
1309
|
+
}, async ({ path }) => {
|
|
1310
|
+
const r = await api.readDriveFile(path);
|
|
1311
|
+
return { content: [{ type: "text", text: r.content || JSON.stringify(r, null, 2) }] };
|
|
1312
|
+
});
|
|
1313
|
+
|
|
1314
|
+
server.tool("search_drive", "Full-text search across the PersonalAgents data drive — search conversation logs, memory, skills, configs, registry files", {
|
|
1315
|
+
q: z.string().describe("Search query (case-insensitive substring match)"),
|
|
1316
|
+
path: z.string().optional().describe("Scope search to a subdirectory (default: entire drive)"),
|
|
1317
|
+
limit: z.number().optional().describe("Max results (default: 50, max: 200)"),
|
|
1318
|
+
types: z.string().optional().describe("Comma-separated file extensions to search (default: .md,.json,.jsonl,.txt)"),
|
|
1319
|
+
}, async ({ q, path, limit, types }) => {
|
|
1320
|
+
const r = await api.searchDrive(q, path, limit, types);
|
|
1321
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1325
|
+
// AI GYM
|
|
1326
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1327
|
+
|
|
1328
|
+
server.tool("get_learner_profile", "Get the gym learner's profile (identity, activity, dimensions, streak, selected trainer)", {}, async () => {
|
|
1329
|
+
const r = await api.getGymLearnerProfile();
|
|
1330
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1331
|
+
});
|
|
1332
|
+
|
|
1333
|
+
server.tool("update_learner_profile", "Update the gym learner's profile (merge fields)", {
|
|
1334
|
+
data: z.record(z.string(), z.any()).describe("Fields to merge into the learner profile"),
|
|
1335
|
+
}, async ({ data }) => {
|
|
1336
|
+
const r = await api.updateGymLearnerProfile(data);
|
|
1337
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
server.tool("get_plan", "Get the gym learner's training plan (on-the-job + platform-driven buckets)", {}, async () => {
|
|
1341
|
+
const r = await api.getGymPlan();
|
|
1342
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1343
|
+
});
|
|
1344
|
+
|
|
1345
|
+
server.tool("update_plan", "Update the gym training plan", {
|
|
1346
|
+
data: z.record(z.string(), z.any()).describe("Full plan object to write"),
|
|
1347
|
+
}, async ({ data }) => {
|
|
1348
|
+
const r = await api.updateGymPlan(data);
|
|
1349
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1350
|
+
});
|
|
1351
|
+
|
|
1352
|
+
server.tool("get_gym_progress", "Get program completion progress for all programs", {}, async () => {
|
|
1353
|
+
const r = await api.getGymProgress();
|
|
1354
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1355
|
+
});
|
|
1356
|
+
|
|
1357
|
+
server.tool("update_gym_progress", "Update program/step completion progress", {
|
|
1358
|
+
data: z.record(z.string(), z.any()).describe("Progress data keyed by program slug"),
|
|
1359
|
+
}, async ({ data }) => {
|
|
1360
|
+
const r = await api.updateGymProgress(data);
|
|
1361
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1362
|
+
});
|
|
1363
|
+
|
|
1364
|
+
server.tool("list_gym_cards", "List active gym cards (recommendations, insights, challenges)", {}, async () => {
|
|
1365
|
+
const r = await api.listGymCards();
|
|
1366
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1367
|
+
});
|
|
1368
|
+
|
|
1369
|
+
server.tool("create_gym_card", "Create a new gym card (recommendation, insight, or challenge)", {
|
|
1370
|
+
title: z.string().describe("Card title"),
|
|
1371
|
+
description: z.string().describe("Card description"),
|
|
1372
|
+
cta: z.string().optional().describe("Call to action button text"),
|
|
1373
|
+
ctaAction: z.string().optional().describe("Action identifier when CTA is clicked"),
|
|
1374
|
+
type: z.string().optional().describe("Card type: recommendation, insight, challenge, tip"),
|
|
1375
|
+
}, async ({ title, description, cta, ctaAction, type }) => {
|
|
1376
|
+
const r = await api.createGymCard({ title, description, cta, ctaAction, type });
|
|
1377
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1378
|
+
});
|
|
1379
|
+
|
|
1380
|
+
server.tool("dismiss_gym_card", "Dismiss a gym card", {
|
|
1381
|
+
id: z.string().describe("Card ID to dismiss"),
|
|
1382
|
+
}, async ({ id }) => {
|
|
1383
|
+
const r = await api.dismissGymCard(id);
|
|
1384
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1385
|
+
});
|
|
1386
|
+
|
|
1387
|
+
server.tool("snapshot_dimensions", "Save a weekly dimension score snapshot for the progress history chart", {
|
|
1388
|
+
dimensions: z.record(z.string(), z.object({
|
|
1389
|
+
score: z.number(),
|
|
1390
|
+
label: z.string(),
|
|
1391
|
+
})).describe("Dimension scores to snapshot"),
|
|
1392
|
+
}, async ({ dimensions }) => {
|
|
1393
|
+
const r = await api.snapshotDimensions({ dimensions });
|
|
1394
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1395
|
+
});
|
|
1396
|
+
|
|
1397
|
+
server.tool("list_gym_programs", "List all training programs in the gym", {}, async () => {
|
|
1398
|
+
const r = await api.listGymPrograms();
|
|
1399
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1400
|
+
});
|
|
1401
|
+
|
|
1402
|
+
server.tool("get_gym_program", "Get a specific training program with all modules and steps", {
|
|
1403
|
+
slug: z.string().describe("Program slug (e.g., 'getting-started')"),
|
|
1404
|
+
}, async ({ slug }) => {
|
|
1405
|
+
const r = await api.getGymProgram(slug);
|
|
1406
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1407
|
+
});
|
|
1408
|
+
|
|
1409
|
+
server.tool("import_program", "Import a training program from markdown (H1=program, H2=module, H3=step)", {
|
|
1410
|
+
markdown: z.string().describe("Markdown content to parse into a program"),
|
|
1411
|
+
difficulty: z.string().optional().describe("beginner, intermediate, or advanced"),
|
|
1412
|
+
}, async ({ markdown, difficulty }) => {
|
|
1413
|
+
const r = await api.importGymProgram({ markdown, difficulty });
|
|
1414
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1415
|
+
});
|
|
1416
|
+
|
|
1417
|
+
server.tool("get_agent_activity_summary", "Get aggregated activity summary for an agent (message count, active days, topics, tool use)", {
|
|
1418
|
+
agentId: z.string().describe("Agent ID"),
|
|
1419
|
+
}, async ({ agentId }) => {
|
|
1420
|
+
const r = await api.getAgentActivitySummary(agentId);
|
|
1421
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1422
|
+
});
|
|
1423
|
+
|
|
1424
|
+
server.tool("search_agent_logs", "Full-text search across agent conversation logs", {
|
|
1425
|
+
q: z.string().describe("Search query"),
|
|
1426
|
+
agentIds: z.string().optional().describe("Comma-separated agent IDs to search (default: all)"),
|
|
1427
|
+
}, async ({ q, agentIds }) => {
|
|
1428
|
+
const r = await api.searchAgentLogs(q, agentIds);
|
|
1429
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1430
|
+
});
|
|
1431
|
+
|
|
1432
|
+
server.tool("update_gym_program", "Update metadata for a training program", {
|
|
1433
|
+
slug: z.string().describe("Program slug"),
|
|
1434
|
+
body: z.record(z.string(), z.any()).describe("Fields to update (title, description, difficulty, etc.)"),
|
|
1435
|
+
}, async ({ slug, body }) => {
|
|
1436
|
+
const r = await api.updateGymProgram(slug, body);
|
|
1437
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1438
|
+
});
|
|
1439
|
+
|
|
1440
|
+
server.tool("delete_gym_program", "Delete a training program", {
|
|
1441
|
+
slug: z.string().describe("Program slug to delete"),
|
|
1442
|
+
}, async ({ slug }) => {
|
|
1443
|
+
const r = await api.deleteGymProgram(slug);
|
|
1444
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1445
|
+
});
|
|
1446
|
+
|
|
1447
|
+
server.tool("get_dimension_history", "Get dimension score history (weekly snapshots)", {}, async () => {
|
|
1448
|
+
const r = await api.getGymDimensionHistory();
|
|
1449
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1450
|
+
});
|
|
1451
|
+
|
|
1452
|
+
server.tool("run_gym_digest", "Manually trigger the activity digest (analyzes all agent activity, scores dimensions, generates cards)", {}, async () => {
|
|
1453
|
+
const r = await api.runGymDigest();
|
|
1454
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1455
|
+
});
|
|
1456
|
+
|
|
1457
|
+
server.tool("get_gym_feed", "Get the aggregated gym feed — tips/nudges from gym cards, platform updates from changelog, and AI briefing", {}, async () => {
|
|
1458
|
+
const r = await api.getGymFeed();
|
|
1459
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1460
|
+
});
|
|
1461
|
+
|
|
1462
|
+
server.tool("get_gym_config", "Get public gym configuration flags (gymEnabled, gymOnlyMode, aibriefingEnabled)", {}, async () => {
|
|
1463
|
+
const r = await api.getGymConfig();
|
|
1464
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1465
|
+
});
|
|
1466
|
+
|
|
1467
|
+
server.tool("list_gym_guides", "List all coach-created guides (programs with source=coach)", {}, async () => {
|
|
1468
|
+
const r = await api.listGymGuides();
|
|
1469
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1470
|
+
});
|
|
1471
|
+
|
|
1472
|
+
server.tool("create_gym_guide", "Create a coach-generated guide from a training session. Saved as a program with source=coach, visible in the Guides tab.", {
|
|
1473
|
+
title: z.string().describe("Guide title"),
|
|
1474
|
+
description: z.string().optional().describe("Short description of what this guide covers"),
|
|
1475
|
+
difficulty: z.enum(["beginner", "intermediate", "advanced"]).optional().describe("Difficulty level"),
|
|
1476
|
+
dimensions: z.array(z.string()).optional().describe("Related skill dimensions (application, communication, knowledge, orchestration, craft)"),
|
|
1477
|
+
estimatedTime: z.string().optional().describe("Estimated completion time (e.g. '15 minutes')"),
|
|
1478
|
+
modules: z.array(z.object({
|
|
1479
|
+
id: z.string(),
|
|
1480
|
+
title: z.string(),
|
|
1481
|
+
order: z.number(),
|
|
1482
|
+
steps: z.array(z.object({
|
|
1483
|
+
id: z.string(),
|
|
1484
|
+
title: z.string(),
|
|
1485
|
+
order: z.number(),
|
|
1486
|
+
type: z.enum(["knowledge", "self-report", "platform-check"]).optional(),
|
|
1487
|
+
content: z.string(),
|
|
1488
|
+
})),
|
|
1489
|
+
})).optional().describe("Structured modules with steps"),
|
|
1490
|
+
content: z.string().optional().describe("Raw markdown content (alternative to modules — will be displayed as a single-step guide)"),
|
|
1491
|
+
}, async (params) => {
|
|
1492
|
+
const body: Record<string, unknown> = { ...params };
|
|
1493
|
+
// If raw content provided without modules, wrap in a single module
|
|
1494
|
+
if (params.content && !params.modules) {
|
|
1495
|
+
body.modules = [{
|
|
1496
|
+
id: "main",
|
|
1497
|
+
title: params.title,
|
|
1498
|
+
order: 1,
|
|
1499
|
+
steps: [{
|
|
1500
|
+
id: "guide-content",
|
|
1501
|
+
title: params.title,
|
|
1502
|
+
order: 1,
|
|
1503
|
+
type: "knowledge",
|
|
1504
|
+
content: params.content,
|
|
1505
|
+
}],
|
|
1506
|
+
}];
|
|
1507
|
+
delete body.content;
|
|
1508
|
+
}
|
|
1509
|
+
const r = await api.createGymGuide(body);
|
|
1510
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1511
|
+
});
|
|
1512
|
+
|
|
1513
|
+
server.tool("get_gym_insights", "Get pre-computed AI insights (generated weekly by the gym goal). Used by 'You tell me' mode.", {}, async () => {
|
|
1514
|
+
const r = await api.getGymInsights();
|
|
1515
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1516
|
+
});
|
|
1517
|
+
|
|
1518
|
+
server.tool("save_gym_insights", "Save AI-generated insights from weekly analysis. Called by the weekly-insight goal after analyzing activity.", {
|
|
1519
|
+
insights: z.array(z.object({
|
|
1520
|
+
title: z.string(),
|
|
1521
|
+
description: z.string(),
|
|
1522
|
+
dimension: z.string().optional(),
|
|
1523
|
+
agentId: z.string().optional(),
|
|
1524
|
+
})).describe("List of insight objects"),
|
|
1525
|
+
topRecommendation: z.string().optional().describe("The single best recommendation for the user right now"),
|
|
1526
|
+
summary: z.string().optional().describe("Brief summary of what was observed"),
|
|
1527
|
+
}, async ({ insights, topRecommendation, summary }) => {
|
|
1528
|
+
const r = await api.saveGymInsights({ insights, topRecommendation, summary });
|
|
1529
|
+
return { content: [{ type: "text", text: JSON.stringify(r, null, 2) }] };
|
|
1530
|
+
});
|
|
1531
|
+
|
|
1532
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1533
|
+
// START SERVER
|
|
1534
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1535
|
+
|
|
1536
|
+
async function main() {
|
|
1537
|
+
const transport = new StdioServerTransport();
|
|
1538
|
+
await server.connect(transport);
|
|
1539
|
+
console.error("MyAIforOne MCP server running on stdio");
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
main().catch((err) => {
|
|
1543
|
+
console.error("MCP server failed to start:", err);
|
|
1544
|
+
process.exit(1);
|
|
1545
|
+
});
|