/SKILL.md
This skill should be used when the user asks to install or audit an MCP server, especially from third-party sources. Security-focused: clones at pinned commits, runs security scans.
npx skillsauth add hartreeworks/skill--secure-mcp-install secure-mcp-installInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides a security-focused workflow for installing MCP servers from third-party sources. It implements a "trust but verify" approach: clone the repository at a specific commit, run automated security scans, perform manual review of critical areas, then install with updates disabled.
Use this workflow when:
Clone the repository and check out the target commit:
# Create audit directory
mkdir -p ~/.claude/mcp-audits
cd ~/.claude/mcp-audits
# Clone the repository
git clone <REPO_URL> <SERVER_NAME>
cd <SERVER_NAME>
# Check out specific commit (or latest if user doesn't specify)
git checkout <COMMIT_SHA>
# Record the commit for the audit report
git log -1 --format="%H %ci %s" > ../<SERVER_NAME>-audit-commit.txt
Execute the audit script to scan for red flags:
~/.claude/skills/secure-mcp-install/scripts/audit-mcp-server.sh ~/.claude/mcp-audits/<SERVER_NAME>
The script scans for:
Review the output. Any HIGH severity findings require manual investigation before proceeding.
For Node.js projects:
cd ~/.claude/mcp-audits/<SERVER_NAME>
npm audit --audit-level=high
# Or with yarn:
yarn audit --level high
For Python projects:
cd ~/.claude/mcp-audits/<SERVER_NAME>
pip-audit -r requirements.txt 2>/dev/null || pip install pip-audit && pip-audit -r requirements.txt
Check for:
Perform targeted manual review of these critical areas:
Refer to references/audit-checklist.md for the complete checklist.
Create a report documenting the audit:
# Create report
cat > ~/.claude/mcp-audits/<SERVER_NAME>-audit-report.md << 'EOF'
# MCP Server Audit Report
## Server Details
- **Name**: <SERVER_NAME>
- **Repository**: <REPO_URL>
- **Commit**: <COMMIT_SHA>
- **Audit Date**: $(date -I)
## Automated Scan Results
<PASTE_SCAN_OUTPUT>
## Dependency Audit
<PASTE_DEPENDENCY_AUDIT>
## Manual Review Notes
<YOUR_NOTES>
## Decision
- [ ] APPROVED - Safe to install
- [ ] REJECTED - Security concerns identified
- [ ] CONDITIONAL - Safe with restrictions (document below)
## Restrictions/Notes
<ANY_RESTRICTIONS>
EOF
If approved, install the MCP server at the audited commit.
For npm-based servers, install from the local clone:
cd ~/.claude/mcp-audits/<SERVER_NAME>
npm install
npm run build # if needed
Then register with Claude Code using the CLI (required - manual file edits don't persist):
# For Node.js servers
claude mcp add-json <SERVER_NAME> '{
"type": "stdio",
"command": "node",
"args": ["'$HOME'/.claude/mcp-audits/<SERVER_NAME>/dist/index.js"],
"env": {
"API_KEY": "your-key"
}
}'
# For Python servers
claude mcp add-json <SERVER_NAME> '{
"type": "stdio",
"command": "'$HOME'/.claude/mcp-audits/<SERVER_NAME>/.venv/bin/python",
"args": ["-m", "<module_name>"],
"cwd": "'$HOME'/.claude/mcp-audits/<SERVER_NAME>",
"env": {
"API_KEY": "your-key"
}
}'
For Python servers, first create the venv:
cd ~/.claude/mcp-audits/<SERVER_NAME>
python -m venv .venv
source .venv/bin/activate
pip install -e .
Important: Use claude mcp add-json - manually editing ~/.claude.json gets overwritten on restart.
Since the server is installed from a local clone (not npm/pip registry), updates won't happen automatically. To upgrade later:
git fetch origingit diff HEAD origin/main| Step | Command/Action |
|------|----------------|
| Clone | git clone <url> && git checkout <sha> |
| Scan | ~/.claude/skills/secure-mcp-install/scripts/audit-mcp-server.sh <path> |
| Deps (npm) | npm audit --audit-level=high |
| Deps (pip) | pip-audit -r requirements.txt |
| Install | From local clone, not registry |
| Config | claude mcp add-json <name> '<json>' |
Always use the CLI - manually editing ~/.claude.json gets overwritten on restart:
# Add from JSON config
claude mcp add-json <name> '{"type": "stdio", "command": "...", "args": [...]}'
# Add stdio server with flags
claude mcp add <name> --transport stdio -- <command> <args>
# List configured servers
claude mcp list
# Remove a server
claude mcp remove <name>
| Scope | Method | Use Case |
|-------|--------|----------|
| User | claude mcp add-json | Personal servers, all projects |
| Project | .mcp.json file in project root | Team-shared, committed to git |
Note: For project scope, you CAN edit .mcp.json directly - only ~/.claude.json gets overwritten.
/mcp - Shows connected serversclaude mcp listcmd /c npx ...${VAR} and ${VAR:-default} expansionlatest or auto-updating installsreferences/red-flags.md - Detailed patterns the scanner looks forreferences/audit-checklist.md - Complete manual review checklistscripts/audit-mcp-server.sh - Automated security scannertools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.