Molecule for AI agents

Make any coding agent molecule-native: the conventions agent, the MCP server, and the package docs an agent reads.

Two doors for agents

A coding agent (Claude Code, Codex, Cursor, Gemini CLI, …) can build on molecule two ways, and they compose: conventions in the repo tell it how molecule code is written, and the MCP server gives it tools to search packages, scaffold, and operate projects.

Write the conventions into your repo

agent init writes the molecule conventions + quickstart into the files your harness already reads — one command, idempotent:

npx mlcl agent init
  • AGENTS.md at the project root — the cross-harness standard every major agent reads.
  • .cursor/rules, .claude/skills, .gemini/extensions, .windsurf/rules — the harness-native equivalents where they exist.

After this, an agent that opens the project immediately knows how to work with bonds, ClassMap styling, handler patterns, and migrations — no prompting required.

Give it tools: the MCP server

Register the molecule MCP server with your harness (works with Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Windsurf, Zed, and any MCP client):

npx mlcl mcp install

The agent then gets search_packages, scaffold_project, add_package, swap_provider, read_package_doc, deploy, env and sandbox tools — the full surface is on the MCP page. A hosted, no-install endpoint is also available at https://mcp.molecule.dev/mcp.

What the agent reads

  • Per-package docs — every installed package carries a generated README.md at node_modules/@molecule/<name>/README.md, always current, generated from source.
  • [llms-full.txt](/llms-full.txt) — every package’s API, examples, and wiring in one document, for agents that want the whole surface at once.
  • `molecule://conventions` — an MCP resource with the molecule way (bonds, ClassMap, i18n, migrations) in one page.