npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

molecule-mcp

v0.3.34

Published

MCP server for the Molecule.dev packages: lets any coding agent find, read, add, wire and swap composable @molecule/* packages in any JavaScript or TypeScript project

Readme

molecule-mcp

The Molecule.dev MCP server — structured tools over the mlcl CLI for any MCP-capable coding agent, in any JavaScript or TypeScript project, new or existing: search the @molecule/* packages by capability, read their docs, add and wire them, swap providers, find working examples, run the project's checks, manage env and deploys, and run hosted tasks (web search, PDF rendering, image generation, …) with no vendor account. It can also start a new app from a custom stack or a template.

On npm as molecule-mcp: the npx -y molecule-mcp entries below run as written. On a machine where npm cannot reach the registry, npx -y --fetch-retries=0 --fetch-timeout=5000 molecule-mcp starts the cached copy within seconds instead of waiting out npm's retries.

Also ships the molecule doctrine as a resource (molecule://conventions) and an agent_init tool that writes the convention files your harness reads — so connecting this ONE server delivers both the capability and the context. Its startup instructions (sent when your agent connects; clients that show server instructions put them in context) say when to use Molecule: whenever a task in a JavaScript or TypeScript project needs a capability, unless the user asked for another library, search the packages and read their docs before writing the capability by hand.

The broader agent guide (all harnesses, all wiring methods, example agent workflows): ../docs/AGENTS-AND-HARNESSES.md (in the mlcl repo).

Install

The one command that works everywhere (uses your harness's own installer when it has one, writes the standard config when it doesn't):

npx mlcl mcp install

For every project on the machine, it installs the server in ~/.mlcl/mcp and registers node ~/.mlcl/mcp/run.mjs, which starts in about 0.1 s. npx -y molecule-mcp asks npm for the latest version on each start (1–2 s, and over a minute when npm cannot reach the registry), and some agents begin a session before a slow server is ready. The installed server checks for a new version once a day, in the background (MOLECULE_MCP_NO_UPDATE=1 turns that off). A project's own config keeps npx -y molecule-mcp, because the team shares that file.

Or use your harness's native command / config directly (these start the server through npx):

| Harness | Install | | ----------------- | ------------------------------------------------------------------------------------------------------- | | Claude Code | claude mcp add molecule -- npx -y molecule-mcp (or the plugin: /plugin install molecule@molecule) | | Cursor | cursor mcp add molecule -- npx -y molecule-mcp | | Codex | codex mcp add molecule -- npx -y molecule-mcp (or ~/.codex/config.toml [mcp_servers.molecule]) | | Gemini CLI | gemini mcp add molecule npx -y molecule-mcp (no -- separator) | | Windsurf | edit ~/.codeium/windsurf/mcp_config.json → mcpServers.molecule | | VS Code / Copilot | .vscode/mcp.json → servers.molecule | | OpenCode | opencode.json → mcp.molecule = {type:"local", command:["npx","-y","molecule-mcp"]} | | Amp | ~/.config/amp/settings.json → mcpServers.molecule | | Crush | ~/.config/crush/config.json → mcpServers.molecule | | Kiro | .kiro/settings/mcp.json (or ~/.kiro/settings/mcp.json) → mcpServers.molecule | | Trae | .trae/mcp.json (or ~/.trae/mcp.json) → mcpServers.molecule | | Zed | .zed/settings.json → agent.mcp_servers.molecule | | Goose | ~/.config/goose/config.yaml under extensions: (or goose configure) | | Junie (JetBrains) | /mcp in Junie → add server, command npx -y molecule-mcp | | Cline / Kilo Code | MCP Servers → Configure → mcpServers.molecule (same shape) | | Continue | config.json → mcpServers.molecule | | Aider | recent versions support MCP — add molecule, command npx -y molecule-mcp | | Any MCP client | command: npx, args: ["-y", "molecule-mcp"] |

Codex does not show an MCP server's instructions to the model, so for Codex mlcl mcp install also writes the Molecule conventions to ~/.codex/AGENTS.md; after a bare codex mcp add, run npx mlcl setup --agent codex for them and for the two entries that load the first-step tools up front.

mlcl mcp install writes/merges the JSON-config harnesses (Windsurf, VS Code, OpenCode, Amp, Crush, Kiro, Trae, Zed, Cursor-project) idempotently and never clobbers existing servers; for the YAML/UI harnesses (Goose, Junie, Cline/Kilo, Continue, Aider) it prints the exact snippet instead of risking a mangled config.

Why the long form? A stdio MCP server is a local process the client spawns, so the client needs its launch command. Shorter paths: the hosted endpoint — claude mcp add --transport http molecule https://mcp.molecule.dev/mcp, one URL for any HTTP-capable client, or paste it into Lovable/v0/bolt connector forms — the Smithery/Glama/PulseMCP registry listings (one-click), and for Claude Code the full plugin once its marketplace repo is public at launch — /plugin marketplace add molecule-dev/molecule-claude-code then /plugin install molecule@molecule (skills + this server, marketplace-updated).

Tools

| Tool | What it does | | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | search_packages | Search @molecule/* by capability ("payments", "social login"); the top three show their Quick Start | | read_package_doc | A package's generated usage README (walks up to hoisted node_modules) | | add_package | Install + wire a package by name, or by query: a capability in words (mlcl add --inject) | | swap_provider | Swap a wired provider (mlcl swap) | | find_example | A working, tested example of a feature, with where each file goes | | check_project | Run the project's typecheck, lint, build and tests; one short report | | agent_init | Write the molecule conventions into this project's agent files | | list_templates | The flagship app gallery (blog, crm, team-chat, …), for a new app | | scaffold_project | mlcl create unattended, JSON result | | login / login_poll | Browser device-code login (same token as the CLI — see below) | | whoami / logout | Login status / clear the token | | list_projects | Your molecule.dev projects (ids for create_api_key) | | create_api_key | Mint a project API key into the project .env (never shown in chat) | | check_env_vars | Which env vars the app needs (code reads + package declarations) and which are missing | | list_env_vars / get_env_var / set_env_var / unset_env_var | Local .env CRUD (values masked unless revealed) | | push_env_vars / pull_env_vars | Sync local .env with the molecule.dev project env | | export_project | Download the no-lock-in eject bundle (.tar.gz: code + db dump + .env) | | embed_text | Embeddings on molecule.dev, billed to the project — no OpenAI account | | text_to_speech | Speech audio from text on molecule.dev, written to a local file | | transcribe_audio | Text from a local audio file on molecule.dev (whisper-1) | | moderate_content | Moderation scores for text or a local image on molecule.dev |

Plus the molecule://conventions resource — the molecule doctrine (packages before hand-rolled code, bonds for providers, ClassMap, i18n) that your agent can read as context.

Example calls

// search_packages — capability search, agent-side package discovery
{ "query": "payments", "stack": "api", "limit": 3 }
// → [{"name":"@molecule/api-payments-stripe","stack":"api","category":"payments",
//      "label":"Stripe","description":"Stripe payment provider…",
//      "install":"mlcl add @molecule/api-payments-stripe --inject"}, …]

// read_package_doc — the package's own generated usage reference
{ "name": "api-payments-stripe", "directory": "/abs/my-project/api" }

// add_package / swap_provider — add a capability to any project, change its vendor
{ "name": "@molecule/api-emails-mailgun" }
{ "new_provider": "@molecule/api-database-mysql", "replace": "@molecule/api-database-postgresql" }

// agent_init — make the current project molecule-aware (idempotent)
{ "directory": "/abs/my-project" }

// scaffold_project — start a new app, unattended, JSON result
{ "name": "my-store", "template": "online-store", "skip_install": false }
// → {"project":"my-store","path":"/abs/my-store","type":"full-stack",
//     "packages":[…],"secrets":["STRIPE_SECRET_KEY",…]}

// a new app from a custom stack instead of a template
{ "name": "api", "type": "api", "packages": "@molecule/api-database-postgresql,@molecule/api-resource-user" }

Hosted services

molecule.dev runs some capabilities for you, so neither your app nor your agent needs its own vendor account. Each call is metered and billed to one project, through that project's API key:

  1. Call list_projects to find the project id. If it asks for approval, complete the browser login below.
  2. create_api_key with env_file pointing at the project's .env. The key is written there as MOLECULE_API_KEY (file mode 0600) and is not returned to the agent. Check that the file is gitignored.
  3. Service tools (embed_text, text_to_speech, transcribe_audio, …) read the key from that .env (pass directory) or from MOLECULE_API_KEY in this server's environment.

Key resolution and env_file share one rule — the only names either side accepts are .env and .env.<variant> (e.g. .env.local); placeholder variants such as .env.example, .env.schema and .env.template are refused on write and never read. Given a directory, resolution checks, in order:

  1. MOLECULE_API_KEY in this server's environment (always wins);
  2. directory/.env, then every directory/.env.<variant> in byte order, then the same set in directory/api;
  3. the same two locations in each parent, up to two parents.

Inside one file the ordinary dotenv rules apply (Node's util.parseEnv): inline # comments, single/double quotes, an export prefix and multi-line quoted values are handled, and a duplicate assignment resolves to the last one. create_api_key rewrites the key's assignment line — dropping older duplicates — so the key it mints is always the one a later service call reads.

The same HTTP API (POST https://api.molecule.dev/api/v1/services/<service>/<operation>, catalog at GET …/v1/services) backs the @molecule/*-molecule bonds, so app code reaches the same service through a normal, swappable bond.

Two modes: local (stdio) and hosted (HTTP)

  • Local stdio (default, molecule-mcp): full tool set, wraps the local mlcl CLI. What every CLI harness registers.
  • Hosted HTTP (molecule-mcp-serve / node dist/http.js): the read-only face, live at https://mcp.molecule.dev/mcp — search/docs/templates/conventions served from the live registry and npm, no local install needed. This is the surface URL-based clients use: Lovable chat connectors, v0 MCP integrations, bolt.new Connectors, and the short install (claude mcp add --transport http molecule https://mcp.molecule.dev/mcp). Deploy runbook: DEPLOY.md.

Login (platform features)

Call the platform tool directly. If it returns login_required, show the user the approval URL and code. Pass deviceCode to login_poll at the returned interval (seconds). After logged_in, resume the operation. You can also start approval explicitly with login.

The CLI starts browser approval in an interactive terminal and continues the command after approval. On a remote machine, mlcl login --no-browser prints a link you can open on another device. The CLI and MCP share ~/.mlcl/credentials.json, or the file named by MLCL_CREDENTIALS_FILE. For CI and scripts, set MOLECULE_TOKEN to a token from mlcl token create <name>. It takes precedence over the stored login.

Configuration

  • Local mode runs the mlcl CLI: MOLECULE_MCP_CLI=/path/to/mlcl/bin/run.js when set (local/dev), else mlcl on PATH (a global install), else the published CLI through npx, fetched once when the server starts and then run from npx's cache. No separate CLI install is needed.
  • Remote mode env: MOLECULE_REGISTRY_URL / MOLECULE_TEMPLATES_URL (default: the mlcl repo's raw GitHub URLs once public; *_FILE overrides for local dev) and PORT.
  • All write tools are explicit CLI invocations with explicit arguments — no background behavior. Anonymous opt-out tool-call telemetry (name/outcome/ duration only; MOLECULE_TELEMETRY=0 disables — see the mlcl README's "Telemetry & privacy" section).

Requirements

  • Node.js ≥ 22 (it ships npx). Local mode needs network access to the npm registry the first time, unless mlcl is installed globally or MOLECULE_MCP_CLI=/path/to/bin/run.js points at a checkout.

License

Apache-2.0 © Molecule Dev, Inc.