
Npm Run Mcp Server
Expose every package.json script as an MCP tool so your agent can run dev, test, and build commands with the right cwd and npm context.
Overview
npm-run MCP Server is a MCP server for the Build phase that exposes package.json scripts as agent-invokable tools over stdio.
What is this MCP server?
- Maps package.json scripts field into MCP-callable tools automatically
- Stdio npm package npm-run-mcp-server (registry version 0.2.12 in packages block)
- Server metadata version 0.2.13 with GitHub source fstubner/npm-run-mcp-server
- Keeps agents inside project-defined scripts instead of inventing ad hoc commands
- Works for any Node repo that already documents workflows via npm run
- npm registry package identifier npm-run-mcp-server at version 0.2.12 in packages metadata
- Top-level server schema version 0.2.13
- Stdio-only transport per published server.json excerpt
What problem does it solve?
Agents guess shell commands and miss project-specific npm scripts, breaking builds and wasting tokens on failed retries.
Who is it for?
Node and full-stack solo devs who standardize on package.json scripts and use MCP daily in Claude Code or Cursor.
Skip if: Pure Python or Go repos with no package.json, or teams that forbid agents from running npm scripts unsupervised.
What do I get? / Deliverables
Once registered, your agent calls vetted npm scripts as MCP tools, matching how you defined the repo’s workflow.
- One MCP tool per package.json script name your project defines
- Consistent agent access to dev, test, and build commands you already maintain
- Less terminal back-and-forth while implementing features
Recommended MCP Servers
Journey fit
Script execution is core Build work—wiring local workflows—rather than distribution or production monitoring. Agent-tooling captures the pattern: npm scripts become discoverable, named tools instead of free-form shell guesses that break on monorepos.
How it compares
Script-surface MCP bridge, not a task runner replacement like Turborepo docs or a CI pipeline skill.
Common Questions / FAQ
Who is npm-run MCP Server for?
JavaScript and TypeScript builders who want their agent to run existing npm scripts safely through MCP instead of improvised terminal commands.
When should I use npm-run MCP Server?
Use it during Build whenever the agent should start dev servers, run tests, or execute custom scripts you already declared in package.json.
How do I add npm-run MCP Server to my agent?
Install npm-run-mcp-server from npm, add a stdio MCP server block pointing at the binary, and set the working directory to the package.json root your agent should use.