Install in Claude Code (CLI)

Claude Code is Anthropic's terminal-native agent. It speaks MCP out of the box, so adding PlanMySaaS is two small steps.

Prerequisites

  • Claude Code installed. Check with claude-code --version.
  • Node.js 18+.
  • PlanMySaaS API key from Settings.

Step 1 — Install the server globally (optional but faster)

You can either let Claude Code spawn via npx each session or install once and reuse:

npm i -g @planmysaas/mcp-server
# provides the `planmysaas-mcp` binary on your PATH

Step 2 — Edit the Claude Code config

Open ~/.claude-code/config.json (create if missing) and add:

{
  "mcpServers": {
    "planmysaas": {
      "command": "planmysaas-mcp",          // or "npx" with args ["-y", "@planmysaas/mcp-server"]
      "env": {
        "PLANMYSAAS_API_KEY": "pms_live_…"
      }
    }
  }
}

Step 3 — Reload Claude Code

# Exit the current session and restart
claude-code

Step 4 — Verify

# inside Claude Code
> /tools          # lists all registered MCP tools
# should include generate_research, generate_architecture, etc.

> Check my PlanMySaaS credits.
# triggers the check_credits tool; shows current balance

Using it from shell automations

Claude Code shines when you pipe tasks through shell scripts. Example — generate a blueprint, save to a markdown file, commit to git:

#!/usr/bin/env bash
set -e
IDEA="${1:?Usage: $0 \"idea text\"}"

claude-code --no-interactive "use PlanMySaaS generate_blueprint for: $IDEA" \
  --save docs/blueprint.md

git add docs/blueprint.md && git commit -m "docs: add PlanMySaaS blueprint for ${IDEA:0:50}…"

Troubleshooting

  • Command not found: planmysaas-mcp — either install globally (npm i -g @planmysaas/mcp-server) or switch the config to the npx form.
  • Tools not listed — run claude-code --mcp-log to see startup errors; usually a JSON syntax issue.
  • 401 invalid_api_key — confirm the env var. No quotes or trailing whitespace in the JSON string.

See also full API docs or Claude Desktop install.