---
title: Installation
description: Install the secure-mcp audit skill from a git checkout. Then, optionally, build the strict MCP v2 stdio server and wire it into pi, Cursor, or OpenAI Codex.
sidebar:
  label: Installation
  order: 2
---

## Install the skill

The skill is a single Markdown file. It needs no build, Node.js, MCP client configuration, or filesystem allowlist. Clone the repository and link the skill folder into your agent's skills directory:

```bash
git clone https://github.com/brbndon/secure-mcp.git
cd secure-mcp

# Claude Code
mkdir -p ~/.claude/skills
ln -s "$PWD/.agents/skills/secure-mcp" ~/.claude/skills/secure-mcp

# Agents that read ~/.agents/skills
mkdir -p ~/.agents/skills
ln -s "$PWD/.agents/skills/secure-mcp" ~/.agents/skills/secure-mcp
```

Run only the lines for the agent you use. For another agent, link or copy the `secure-mcp` skill folder into its skills directory. A link picks up changes when you pull; a copy has to be updated by hand.

Restart the agent session, open the app you want reviewed, and ask for it by name:

```text
Use the secure-mcp skill to audit this app's local storage and data privacy.
```

The skill is meant for security and privacy audits. It stays out of routine feature work, ordinary debugging, and isolated fixes unless you ask for an audit or name it.

## Optional: MCP server

The MCP server is a local stdio process that speaks protocol revision `2026-07-28` only. It gives agents read-only tools that the skill can use for extra heuristic assistance. You do not need it to run an audit.

> **Platform support:** Linux and macOS only. Windows is not supported.

### Requirements

- Git
- Node.js 20 or newer
- pnpm 10
- Bash and Python 3 for `scripts/install-agents.sh` on Linux or macOS
- One or more existing absolute directories containing repositories you may review
- An MCP client that supports protocol revision `2026-07-28`

### Build and install in one command

The checkout contains the server, installer, master agent skill, fixtures, source, and documentation. The one-command bootstrap installs dependencies, builds the server, and prompts for the filesystem allowlist when it is unset. It then wires the skill and MCP server into pi, Cursor, and OpenAI Codex, and verifies the result. It also removes a `~/.claude/skills/secure-mcp` link that points at this checkout, so re-create that link afterward if you use Claude Code:

```bash
./scripts/setup.sh
```

Run it from the checkout you cloned above. To skip the prompt, pass the allowlist explicitly: `SECURE_MCP_ALLOWED_ROOTS=/absolute/path/to/Code ./scripts/setup.sh`. Prefer a parent directory that contains the Swift and web checkouts you review.

#### What the bootstrap runs (the manual path)

```bash
pnpm install --frozen-lockfile
pnpm build
export SECURE_MCP_ALLOWED_ROOTS=/absolute/path/to/repositories
./scripts/install-agents.sh install
./scripts/install-agents.sh check
```

Filesystem tools fail closed unless `SECURE_MCP_ALLOWED_ROOTS` names one or more roots that may contain a requested `project_root`. Use `:` between multiple roots on Linux/macOS. Prefer the parent that contains the repositories you review (for example `/Users/you/Code`) rather than a single app or your home directory. Canonical-path and symlink checks still apply within each authorized root.

`check` verifies installation. `add-root /absolute/path` appends another existing directory to an existing install. `uninstall` removes only entries owned by secure-mcp.

Grok Build TUI is unsupported until it negotiates MCP `2026-07-28`. It currently requests `2025-11-25`, so do not add it to client config. See [Client compatibility](/docs/clients).

### Manual client configuration

If you do not use the installer, point any stdio MCP client that supports protocol `2026-07-28` at the built entrypoint and pass the allowlist:

```json
{
  "mcpServers": {
    "secure-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/secure-mcp/dist/index.js"],
      "env": {
        "SECURE_MCP_ALLOWED_ROOTS": "/absolute/path/to/repositories"
      }
    }
  }
}
```

The `project_root` supplied to a tool must be visible to the machine running the server, fall under an allowed root, and is safest as an absolute path. See [Client compatibility](/docs/clients) for per-client shapes, including VS Code / GitHub Copilot's top-level `servers` key.

:::tip
Run `pnpm smoke` after building to confirm the server starts, negotiates protocol `2026-07-28`, lists its tools, and can analyze the included fixture without executing it.
:::

## Development loop

```bash
pnpm dev
pnpm test
pnpm verify
```

`pnpm dev` runs the MCP server through `tsx`. It is a stdio process, so logs belong on stderr and the terminal may look quiet while the client is connected.

## npm

The package `@brdndon/secure-mcp` is no longer published to npm. Version 2.0.0 (August 2026) remains on npm but receives no updates, and it does not include later changes, such as the Swift storage pack and findings paging. The git checkout is the only maintained way to get the project.
