|
| 1 | +# FerrVault MCP |
| 2 | + |
| 3 | +FerrVault as a Model Context Protocol server, so an AI assistant can drive it. |
| 4 | + |
| 5 | +[](https://www.npmjs.com/package/@ferrvault/mcp) |
| 6 | + |
| 7 | +## Quick start |
| 8 | + |
| 9 | +Add to your MCP client configuration (Claude Code, Cursor, etc.): |
| 10 | + |
| 11 | +```json |
| 12 | +{ |
| 13 | + "mcpServers": { |
| 14 | + "ferrvault": { "command": "npx", "args": ["-y", "@ferrvault/mcp"] } |
| 15 | + } |
| 16 | +} |
| 17 | +``` |
| 18 | + |
| 19 | +The first tool call that needs auth opens a browser for an OAuth loopback flow and saves the token. To skip it (CI, headless), set `FERRLABS_API_TOKEN`. Details in the [FerrLabs MCP README](https://github.com/FerrLabs/MCP#how-auth-resolution-works). |
| 20 | + |
| 21 | +## Tools |
| 22 | + |
| 23 | +Tools marked **destructive** are irreversible or high-impact. MCP clients should gate them behind a confirmation. |
| 24 | + |
| 25 | +### `@ferrvault/mcp` |
| 26 | + |
| 27 | +Targets the FerrVault API (`api.ferrvault.com`, or a self-hosted instance through `FERRVAULT_API_URL`): vaults, their environments, and the secrets, secret requests and service tokens of each environment. Vaults belong to the organization the token is signed in to. |
| 28 | + |
| 29 | +The FerrVault API accepts FerrLabs session JWTs, not `fft_*` API tokens. Over HTTP, register the client with the IdP as an `eddsa_session_jwt` OAuth client and pass its id to the MCP client (`claude mcp add --client-id`); a dynamically registered client gets an `fft_*` token, which the API refuses. |
| 30 | + |
| 31 | +| Tool | Notes | |
| 32 | +| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 33 | +| `list_ferrvault_vaults`, `list_ferrvault_environments` | read | |
| 34 | +| `create_ferrvault_vault` | slug and display name, in the signed-in organization; FerrVault provisions its key, makes you admin and creates a `default` environment | |
| 35 | +| `create_ferrvault_environment` | slug and display name in an existing vault; vault admin | |
| 36 | +| `list_ferrvault_secrets` | names, versions, tags and expiry; never values | |
| 37 | +| `reveal_ferrvault_secret` | returns the plaintext value, audit-logged by FerrVault | |
| 38 | +| `set_ferrvault_secret` | creates the secret, or stores a new version when it exists | |
| 39 | +| `generate_ferrvault_secret` | random value generated in the MCP server, stored like `set_ferrvault_secret`, never returned | |
| 40 | +| `delete_ferrvault_secret` | **destructive** | |
| 41 | +| `list_ferrvault_secret_requests` | pending requests only: names clients asked for that have no value, with counts, timestamps and requester kind | |
| 42 | +| `archive_ferrvault_secret_request` | by id, or by name (resolved to the pending request); stays archived even if clients keep asking | |
| 43 | +| `copy_ferrvault_secret` | copies a value to another vault, environment or name (name defaults to the source), stored like `set_ferrvault_secret`; read and written in the MCP server, never returned; refuses source equal to target | |
| 44 | +| `list_ferrvault_service_tokens` | operator tokens of one environment: id, name, role, creator, created, expiry, last use; never the token; vault admin | |
| 45 | +| `create_ferrvault_service_token` | name, role, optional expiry; the token is written into a target secret (created or versioned) and never returned, and revoked again if that write fails; vault admin | |
| 46 | +| `revoke_ferrvault_service_token` | by id; **destructive**, workloads using it lose access; vault admin | |
| 47 | + |
| 48 | +## Configuration |
| 49 | + |
| 50 | +| Variable | Description | Default | |
| 51 | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | |
| 52 | +| `FERRVAULT_API_URL` | Base URL for the FerrVault API (`@ferrvault/mcp`). Its host must be allowed (see `FERRLABS_MCP_ALLOWED_API_HOSTS`). For an internal CA, point `NODE_EXTRA_CA_CERTS` at the CA certificate. | `https://api.ferrvault.com` | |
| 53 | +| `FERRVAULT_API_VERSION` | Contract version sent as `x-ferrvault-api-version` by `@ferrvault/mcp`. | `2026-08-04` | |
| 54 | + |
| 55 | +Shared variables (token, OAuth, host allowlist, HTTP transport, output cap) are read by [`@ferrlabs/mcp-core`](https://github.com/FerrLabs/MCP/tree/main/packages/mcp-core) and documented in the [FerrLabs MCP README](https://github.com/FerrLabs/MCP#configuration). |
| 56 | + |
| 57 | +## Development |
| 58 | + |
| 59 | +```bash |
| 60 | +cd mcp |
| 61 | +pnpm install |
| 62 | +pnpm build |
| 63 | +pnpm test |
| 64 | +pnpm smoke |
| 65 | +``` |
| 66 | + |
| 67 | +`pnpm smoke` boots the server over stdio and checks the handshake and the advertised tools. |
| 68 | + |
| 69 | +## License |
| 70 | + |
| 71 | +Mozilla Public License 2.0, see [LICENSE](../LICENSE). |
0 commit comments