keepassmcp
🔐keepassmcp🔐
keepassmcp 是一个 PHP 辅助工具和 MCP 服务器,用于读取本地 KeePass 数据库——包括条目、备注、自定义属性和密码。
它在设计上是只读的:数据库中的任何内容都不会被写入或更改。
keepassmcp 需要 PHP 8.5 或更高版本,以及带有 pykeepass 的 Python 3。解密本身委托给 pykeepass,因为没有 PHP 库能够可靠地读取 KDBX 4.x;因此支持所有 KDBX 变体,包括 Argon2 密钥派生。
安装
composer require vielhuber/keepassmcp
pip install pykeepassRelated MCP server: vault-kv-mcp
配置
将 .env.example 复制为 .env,或通过进程环境提供相同的变量:
KEEPASS_DATABASE=/path/to/passwords.kdbx
KEEPASS_PASSWORD_FILE=/dev/shm/keepass.pass
MCP_TOKEN=主密码可以直接通过 KEEPASS_PASSWORD 提供,或者更推荐的方式是通过 KEEPASS_PASSWORD_FILE 中指定的文件提供。使用文件可以将密码排除在进程环境之外,否则密码会被每个子进程继承,并在 /proc/<pid>/environ 中保持可读。无论使用哪种渠道,该值在读取后都会立即从环境中移除,并通过 stdin 传递给读取器,因此它永远不会出现在进程参数中。
KEEPASS_PYTHON 可选地指向特定的解释器,例如 virtualenv 中的解释器。
PHP
use vielhuber\keepassmcp\keepassmcp;
$vault = new keepassmcp();
$vault->listEntries();
$vault->searchEntries('api-key');
$vault->getEntry('7f9c…');MCP 服务器
vendor/bin/mcp-server.php可用工具:
list_entriessearch_entriesget_entry
list_entries 和 search_entries 从不返回密码或备注正文;它们报告标题、组路径、用户名、URL 以及 has_password 和 has_notes 标志。search_entries 确实会搜索备注和自定义属性名称的内部,因此存储在条目中的长篇文档仍然可以被找到。只有 get_entry 返回单个条目的机密值。
测试
composer install
vendor/bin/phpunit测试套件使用模拟读取器,从不打开真实的数据库。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA secure, read-only MCP server for browsing and searching files in a specified directory with path traversal protection and .gitignore support.3MIT
- FlicenseAqualityCmaintenanceA read-only MCP server that provides tools to read, list, and inspect secrets from HashiCorp Vault's KV secrets engine (versions 1 and 2) using a Vault token.5
- AlicenseNot gradedqualityCmaintenanceMCP server for the Nextcloud Passwords app, enabling reading and managing password entries (list, search, create, update, delete) with strong security guarantees.MIT
- AlicenseAqualityBmaintenanceRead-only MCP server that connects to multiple IMAP accounts, enabling cross-account email listing, search, and retrieval without modifying mailboxes.4MIT
Related MCP Connectors
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Federated commerce search across independent WooCommerce merchants. Keyless, read-only MCP server.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vielhuber/keepassmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server