keepassmcp
🔐keepassmcp🔐
keepassmcpは、ローカルのKeePassデータベース(エントリ、メモ、カスタムプロパティ、パスワード)を読み取るPHPヘルパー兼MCPサーバーです。
設計上、読み取り専用です。データベース内の何かが書き込まれたり変更されたりすることは一切ありません。
keepassmcpにはPHP 8.5以降と、pykeepassを備えたPython 3が必要です。復号処理自体はpykeepassに委任されています。これは、KDBX 4.xを確実に読み取れるPHPライブラリが存在しないためです。そのため、Argon2キー導出を含むすべてのKDBXバリアントがサポートされています。
インストール
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テストスイートはフェイクリーダーを使用し、実際のデータベースを開くことはありません。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
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
- AlicenseAqualityDmaintenanceA 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.5MIT
- AlicenseAqualityBmaintenanceMCP server for the Nextcloud Passwords app, enabling reading and managing password entries (list, search, create, update, delete) with strong security guarantees.14MIT
- AlicenseAqualityDmaintenanceRead-only MCP server that connects to multiple IMAP accounts, enabling cross-account email listing, search, and retrieval without modifying mailboxes.4MIT