Is @heroku/mcp-server safe?
- Node.js shell/command execution
- Dangerous MCP tool capability
- Node.js filesystem read
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
@heroku/mcp-server is an npm package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: filesystem read, filesystem write, install time execution, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@heroku/mcp-server 1.2.11
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of @heroku/mcp-server's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (7)
An MCP tool exposes a powerful capability (files, shell, network, browser, or credentials).
server.tool('pg_credentials', 'Manage access: credentials, permissions, security, monitoring', pgCredentialsOptionsSchema.shape, async (options) => {Why it matters: Wired into an agent, these grant it real access to your machine — confirm each is required.
Fix: Confirm each powerful tool is required and constrained; broad MCP tools (shell/filesystem/network) grant an agent significant host access.
The component can run operating-system commands or spawn processes.
import { spawn, spawnSync } from 'node:child_process';import { execSync } from 'node:child_process';execSync(`git remote add heroku-${result.name} ${app.git_url}`, { cwd: rootUri });import { spawnSync } from 'node:child_process';import { execSync } from 'node:child_process';result = execSync('git ls-files -c -o --exclude-standard', { cwd: root }).toString();Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
The component reads files from disk.
appJsonBytes = await fs.readFile(appJsonUri);
const content = await fs.readFile(file);
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
await fs.writeFile(optsFilePath, JSON.stringify(options.opts, null, 0));
await fs.rm(tempDir, { recursive: true });Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
package.json has a 'prepare' script (runs on git/local installs and before publishing).
"prepare": "husky",
Why it matters: Usually a build step, but confirm it doesn't fetch or run remote code.
Fix: Usually a legitimate build step; confirm it only builds and does not fetch or execute remote code.
The component makes outbound network requests.
const res = await fetch(DEV_CENTER_RESOURCE_URI);
const response = await fetch(`${this.endpoint}/apps/${appIdentity}`, {const response = await fetch(`${this.endpoint}/app-setups`, {const response = await fetch(`${this.endpoint}/app-setups/${appSetupIdentity}`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/builds`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/builds/${buildIdentity}`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/builds`, {await fetch(`/apps/${appIdentity}/build-cache`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/builds/${buildIdentity}`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/dynos`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/dynos/${dynoIdentity}`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/formations/${dynoFormationType}`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/dynos`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/dynos/${dynoIdentity}/actions/stop`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/formations/${dynoFormationType}/actions/stop`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/dynos/${dynoIdentity}`, {const response = await fetch(`${this.endpoint}/apps/${appIdentity}/dynos`, {const response = await fetch(`${this.endpoint}/sources`, {const response = await fetch(sourceBlob.put_url, {const stream = await fetch(streamUrl);
"axios": "^1.6.0"
Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An MCP tool surface (manifest or tool definitions) was found.
const server = new McpServer({ name: 'Heroku MCP Server', version: VERSION }, {const transport = new StdioServerTransport();
server.tool('list_addons', 'List add-ons: all apps or specific app, detailed metadata', listAddonsOptionsSchema.shape, async (options) => {server.tool('get_addon_info', 'Get add-on details: plan, state, billing', getAddonInfoOptionsSchema.shape, async (options) => {server.tool('create_addon', 'Create add-on: specify service, plan, custom names', createAddonOptionsSchema.shape, async (options) => {server.tool('list_addon_services', 'List available add-on services and features', listAddonServicesOptionsSchema.shape, async (options) => {server.tool('list_addon_plans', 'List service plans: features, pricing, availability', listAddonPlansOptionsSchema.shape, async (options) => {server.tool('list_ai_available_models', 'List available AI inference models', z.object({}).shape, async () => {server.tool('provision_ai_model', 'Provision AI model access for app', provisionAiModelOptionsSchema.shape, async (options) => {server.tool('make_ai_inference', 'Make inference request to Heroku AI API', aiInferenceOptionsSchema.shape, async (options) => {server.tool('list_apps', 'List Heroku apps: owned, collaborator access, team/space filtering', listAppsOptionsSchema.shape, async (options) => {server.tool('get_app_info', 'Get app details: config, dynos, addons, access, domains', getAppInfoOptionsSchema.shape, async (options) => {server.tool('create_app', 'Create app: custom name, region (US/EU), team, private space', createAppOptionsSchema.shape, async (options) => {server.tool('rename_app', 'Rename app: validate and update app name', renameAppOptionsSchema.shape, async (options) => {server.tool('pg_psql', 'Execute SQL queries: analyze, debug, modify schema, manage data', pgPsqlOptionsSchema.shape, async (options) => {server.tool('pg_info', 'View database status: config, metrics, resources, health', pgInfoOptionsSchema.shape, async (options) => {server.tool('pg_ps', 'Monitor active queries: progress, resources, performance', pgPsOptionsSchema.shape, async (options) => {server.tool('pg_locks', 'Analyze locks: blocked queries, deadlocks, concurrency', pgLocksOptionsSchema.shape, async (options) => {server.tool('pg_outliers', 'Find resource-heavy queries: performance, patterns, optimization', pgOutliersOptionsSchema.shape, async (options) => {server.tool('pg_credentials', 'Manage access: credentials, permissions, security, monitoring', pgCredentialsOptionsSchema.shape, async (options) => {server.tool('pg_kill', 'Stop processes: stuck queries, blocking transactions, runaway operations', pgKillOptionsSchema.shape, async (options) => {server.tool('pg_maintenance', 'Track maintenance: windows, schedules, progress, planning', pgMaintenanceOptionsSchema.shape, async (options) => {server.tool('pg_backups', 'Manage backups: schedules, status, verification, recovery', pgBackupsOptionsSchema.shape, async (options) => {server.tool('pg_upgrade', 'Upgrade PostgreSQL: version migration, compatibility, safety', pgUpgradeOptionsSchema.shape, async (options) => {server.tool('deploy_to_heroku', 'Use for all deployments. Deploys new/existing apps, with or without teams/spaces, and env vars to Heroku. ' +Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in @heroku/mcp-server.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →