Go to file
2026-04-24 07:42:58 +00:00
.claude docs: add CLAUDE.md, known-issues.md, .claude/settings.json; remove test.txt (#2) 2026-04-20 23:10:39 +00:00
.github/workflows chore: add CI workflow to enable PR checks 2026-04-24 07:42:58 +00:00
src fix(mcp): read MOLECULE_API_URL env var for platform base URL 2026-04-24 05:41:13 +00:00
tests/__tests__ fix(mcp): KI-006 — prevent anyOf in plugin tool schemas via order-safe nullable 2026-04-21 08:03:22 +00:00
.gitignore feat(mcp): add Zod schema validation to all tool handlers 2026-04-21 20:33:23 +00:00
CLAUDE.md test(api): add Jest unit tests for apiCall, platformGet, toMcpResult, isApiError (#4) 2026-04-21 06:17:36 +00:00
jest.config.cjs feat: MCP server content + npm publish CI 2026-04-16 03:50:00 -07:00
known-issues.md feat(mcp): add structured pino logging with AsyncLocalStorage context (KI-001) (#6) 2026-04-22 18:37:40 +00:00
package-lock.json feat(mcp): add structured pino logging with AsyncLocalStorage context (KI-001) (#6) 2026-04-22 18:37:40 +00:00
package.json feat(mcp): add structured pino logging with AsyncLocalStorage context (KI-001) (#6) 2026-04-22 18:37:40 +00:00
README.md feat: MCP server content + npm publish CI 2026-04-16 03:50:00 -07:00
tsconfig.json feat: MCP server content + npm publish CI 2026-04-16 03:50:00 -07:00

Molecule AI MCP Server

MCP server that exposes Molecule AI platform operations as tools for AI coding agents.

20 Tools Available

Tool Description
list_workspaces List all workspaces with status and skills
create_workspace Create a new workspace (with optional template)
get_workspace Get workspace details
delete_workspace Delete workspace (cascades to children)
restart_workspace Restart offline/failed workspace
chat_with_agent Send message and get AI response
assign_agent Assign model to workspace
set_secret Set API key or env var
list_secrets List secret keys (no values)
list_files List workspace config files
read_file Read a config file
write_file Create or update a file
delete_file Delete file or folder
commit_memory Store fact (LOCAL/TEAM/GLOBAL)
search_memory Search workspace memories
list_templates List available templates
expand_team Expand workspace to team
collapse_team Collapse team to single workspace
list_pending_approvals List pending approval requests
decide_approval Approve or deny a request

Phase 30 — Remote agent (SaaS) management

Tools that surface workspaces with runtime='external' (agents that run on machines outside this platform's Docker network and join via HTTP).

Tool Description
list_remote_agents Filter the workspace list to remote agents only — id / status / url / heartbeat
get_remote_agent_state Lightweight {status, paused, deleted} projection — faster than get_workspace when you only need lifecycle
get_remote_agent_setup_command Emit a WORKSPACE_ID=… PLATFORM_URL=… python3 … bash one-liner an operator can paste into a remote shell
check_remote_agent_freshness Compare last_heartbeat_at against a threshold (default 90s) — returns {fresh, seconds_since_heartbeat}

Setup

Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "molecule": {
      "command": "node",
      "args": ["./mcp-server/dist/index.js"],
      "env": {
        "MOLECULE_URL": "http://localhost:8080"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "molecule": {
      "command": "node",
      "args": ["./mcp-server/dist/index.js"],
      "env": {
        "MOLECULE_URL": "http://localhost:8080"
      }
    }
  }
}

Codex / OpenCode

# Run directly
MOLECULE_URL=http://localhost:8080 node mcp-server/dist/index.js

Environment Variables

Variable Default Description
MOLECULE_URL http://localhost:8080 Platform API URL

Examples

You: "Create an SEO agent workspace using the seo-agent template"
Agent: [calls create_workspace with template="seo-agent"]

You: "Set the OpenRouter API key for the SEO workspace"
Agent: [calls set_secret with key="OPENROUTER_API_KEY"]

You: "Ask the SEO agent to audit my homepage"
Agent: [calls chat_with_agent with message="Audit https://example.com for SEO"]

You: "What skills does the coding agent have?"
Agent: [calls get_workspace, reads agent_card.skills]