DevVault MCP
devvault-mcp
一个轻量级 MCP 服务器,为 Claude Code 提供对 DevVault 本地 Postgres 数据库的结构化访问——检查 schema、运行只读查询、执行受保护的写入,以及为测试填充模拟数据。
连接
DATABASE_URL 按以下顺序解析:
process.env.DATABASE_URLDEVVAULT_ENV_PATH(指向.env文件的路径),如果已设置../devvault-backend/.env
因此数据库密码保留在后端 .env 中,不会重复写入任何 MCP 配置。
Related MCP server: PostgreSQL MCP Server
工具
工具 | 用途 |
| 显示我们连接的是哪个数据库/用户(不显示凭据)。 |
| 公共表 + 近似行数。 |
| 表的列(名称、类型、是否可空、默认值)。 |
| DevVault 主要表的精确行数。 |
| 一条只读语句(SELECT/WITH/EXPLAIN/SHOW),在 |
| 一条 INSERT/UPDATE/DELETE。除非 |
| 向 snippets/bookmarks/notes/commands/prompts 插入模拟行(有效的 cuid id + 时间戳),并关联到现有用户。 |
安全防护
run_query拒绝任何非只读内容,并阻止语句堆叠(;)。run_write拒绝DROP/TRUNCATE/ALTER/CREATE/GRANT/…,并拒绝没有WHERE子句的UPDATE/DELETE,除非传入allowDangerous: true。写入在事务内执行,出错时回滚。
注册到 Claude Code
已通过 ../.mcp.json(项目范围)完成配置:
{
"mcpServers": {
"devvault-db": {
"command": "node",
"args": ["/Users/cookie/project-git/devvault_2/devvault-mcp/server.js"]
}
}
}MCP 服务器在 Claude Code 启动时加载,因此需要重启/重新连接会话,devvault-db 工具才会出现。
本地检查(无需 MCP 客户端)
npm install
node smoke.js # connectivity + row counts
node mcptest.js # full MCP handshake: list tools + call a few模拟数据
seed_dummy 创建的种子行,其标题均以 Dummy 开头。
要删除它们:
DELETE FROM prompts WHERE title LIKE 'Dummy %';
DELETE FROM commands WHERE title LIKE 'Dummy %';
DELETE FROM snippets WHERE title LIKE 'Dummy %';
DELETE FROM bookmarks WHERE title LIKE 'Dummy %';
DELETE FROM notes WHERE title LIKE 'Dummy %';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
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to PostgreSQL databases with schema inspection, query execution in multiple formats (JSON, CSV, Markdown), and query history tracking with built-in security features.
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query and manage local PostgreSQL databases through SQL execution and schema exploration tools. It supports both read-only queries and write operations including table creation and data modification via natural language.34ISC
- AlicenseAqualityDmaintenanceEnables Claude to interact with a local PostgreSQL database through SQL queries, schema inspection, and CRUD operations.8225MIT
- AlicenseNot gradedqualityDmaintenanceEnables safe interaction with PostgreSQL databases through read-only queries, schema exploration, and performance analysis.225MIT
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Comprehensive PostgreSQL documentation and best practices, including ecosystem tools
MCP server for managing Prisma Postgres.
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/cookieark7/devvault-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server