ai-cred
v1.0.1
Published
Centralized credential store for AI sessions — macOS Keychain backed MCP server + CLI
Maintainers
Readme
ai-cred
Centralized credential store for AI sessions. Store SSH keys, Jenkins tokens, Portainer logins, AWS credentials, and API keys in the macOS Keychain — Claude fetches them on demand via MCP. No more re-pasting secrets every session.
Install
npm install -g ai-credSetup with Claude Code
Register the MCP server so Claude can access your credentials:
claude mcp add ai-cred -- ai-cred-serverThen in your CLAUDE.md, add:
## Credential Store (ai-cred MCP)
- Use `get_credential` to fetch creds before connecting to any service
- Use `find_credential` with a partial name if unsure of the exact service name
- Use `list_credentials` to see what's available
- Use `store_credential` to save new credentials
- Use `delete_credential` to remove credentialsCLI Usage
# Add a credential (interactive, masked input)
ai-cred add my-server -t ssh -e prod
# List all credentials (masked preview, no full secrets)
ai-cred list
# Get full credential details
ai-cred get my-server -e prod
# Update a credential
ai-cred update my-server -t ssh -e prod --host 10.0.0.1
# Remove a credential
ai-cred remove my-server -e prodMCP Tools
Once registered, Claude has access to these tools:
| Tool | Description |
|------|-------------|
| store_credential | Store a credential in the macOS Keychain |
| get_credential | Retrieve a credential by service name and environment |
| list_credentials | List all credentials (metadata only, no secrets) |
| delete_credential | Remove a credential |
| find_credential | Fuzzy search by partial service name |
Credential Types
| Type | Fields |
|------|--------|
| ssh | host, port, username, password/keyPath |
| jenkins | url, username, apiToken |
| portainer | url, apiToken |
| aws | accessKeyId, secretAccessKey, region, profile |
| api-key | url, key |
All types support optional notes field.
Environments
Credentials are organized by environment: prod, dev, staging, global
Security
- Credentials stored in a dedicated macOS Keychain (
ai-cred.keychain-db) — isolated from your login keychain - All Keychain operations use parameterized subprocess calls — no shell injection possible
- List operations never expose secrets — metadata only
- Audit log at
~/.ai-cred/audit.logrecords every access (timestamps and operations only, never credential values) - Error messages are sanitized — no credential data in logs or stack traces
Requirements
- macOS (uses macOS Keychain via
securityCLI) - Node.js 22+
License
ISC
