gopass-mcp
by inavhq
README.md
# gopass-mcp
MCP server for [gopass](https://github.com/gopasspw/gopass) password management. Gives AI agents secure, on-demand access to credentials stored in your gopass (GPG-encrypted, git-backed) password store.
## Prerequisites
- Node.js >= 20
- [gopass](https://github.com/gopasspw/gopass) installed and configured (v1.16+)
- A working gopass store (run `gopass ls` to verify)
## Install
```bash
git clone https://github.com/inavhq/gopass-mcp.git
cd gopass-mcp
npm install
npm run build
```
## Claude Code Configuration
Add to your Claude Code MCP settings (`~/.claude/settings.json` or project `.claude/settings.local.json`):
```json
{
"mcpServers": {
"gopass": {
"command": "node",
"args": ["/path/to/gopass-mcp/dist/index.js"]
}
}
}
```
## Tools
| Tool | Description | Write? |
|------|-------------|--------|
| `list_secrets` | List all secret paths, optionally filtered by folder prefix | No |
| `get_secret` | Retrieve a secret's content by path | No |
| `search_secrets` | Search for secrets by name | No |
| `generate_password` | Generate and store a random password | Yes |
## Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `GOPASS_PATH` | `gopass` | Path to gopass binary |
## Security
- Uses `execFile` (not `exec`) — no shell involved, no injection surface
- Path validation blocks directory traversal (`..`, absolute paths, `~`)
- Secret values are never written to stderr or logs
- No `insert_secret` or `delete_secret` — too dangerous for LLM automation
## Development
```bash
npm test # Run tests
npm run lint # ESLint + Prettier check
npm run typecheck # tsc --noEmit
npm run build # Compile to dist/
```
## License
MIT
TDQS
A4/5.0
Scored across 4 tools
Disambiguation5/5
Each tool has a clearly distinct purpose: listing, retrieving, searching, and generating secrets. There is no overlap or ambiguity between them.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern (list_secrets, get_secret, search_secrets, generate_password), making them predictable and easy to understand.
Tool Count5/5
With 4 tools, the set is well-scoped for a password manager server. Each tool covers a core operation without unnecessary bloat or missing essentials.
Completeness4/5
The tool set covers the essential operations for secret management (list, get, search, generate). Missing delete_secret or update_secret, but the core workflows are solid.
Maintenance
ActivityInactive
ResponsivenessNo issues