Skip to main content
Glama
DevVault MCP

DevVault MCP

by cookieark7

devvault-mcp

A small MCP server that gives Claude Code structured access to DevVault's local Postgres database — inspect schema, run read-only queries, make guarded writes, and seed dummy data for testing.

Connection

DATABASE_URL is resolved in this order:

  1. process.env.DATABASE_URL

  2. DEVVAULT_ENV_PATH (path to an .env file), if set

  3. ../devvault-backend/.env

So the DB password stays in the backend .env and is not duplicated into any MCP config.

Related MCP server: PostgreSQL MCP Server

Tools

Tool

Purpose

db_info

Which database/user we're connected to (no credentials shown).

list_tables

Public tables + approximate row counts.

describe_table

Columns (name, type, nullable, default) for a table.

count_rows

Exact row counts for the main DevVault tables.

run_query

One read-only statement (SELECT/WITH/EXPLAIN/SHOW), run in a READ ONLY transaction. Supports $1,$2… params.

run_write

One INSERT/UPDATE/DELETE. DDL and unscoped UPDATE/DELETE (no WHERE) are refused unless allowDangerous=true.

seed_dummy

Insert dummy rows (valid cuid ids + timestamps) into snippets/bookmarks/notes/commands/prompts, attached to existing users.

Safety guards

  • run_query rejects anything that isn't read-only and blocks statement stacking (;).

  • run_write refuses DROP/TRUNCATE/ALTER/CREATE/GRANT/… and refuses UPDATE/DELETE with no WHERE clause, unless you pass allowDangerous: true.

  • Writes run inside a transaction and roll back on error.

Registering with Claude Code

Already wired up via ../.mcp.json (project scope):

{
  "mcpServers": {
    "devvault-db": {
      "command": "node",
      "args": ["/Users/cookie/project-git/devvault_2/devvault-mcp/server.js"]
    }
  }
}

MCP servers load at Claude Code startup, so restart / reconnect the session for the devvault-db tools to appear.

Local checks (no MCP client needed)

npm install
node smoke.js     # connectivity + row counts
node mcptest.js   # full MCP handshake: list tools + call a few

Dummy data

Seed rows created by seed_dummy all have titles beginning with Dummy . To remove them:

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 %';

Available Tools

7 tools
count_rowsCount rowsB

Exact row counts for the main DevVault tables.

Inputs: no named parameters.

db_infoDatabase infoA

Show which database this server is connected to (host/db only, no credentials).

Inputs: no named parameters.

describe_tableDescribe tableA

Show columns (name, type, nullable, default) for a table.

Inputs: table (required).

list_tablesList tablesA

List public tables with their live row estimates.

Inputs: no named parameters.

run_queryRun read-only queryA

Run a single read-only SQL statement (SELECT/WITH/EXPLAIN/SHOW). Executes inside a READ ONLY transaction. Use $1, $2… placeholders with params.

Inputs: sql (required), limit, params.

run_writeRun write statementA

Run a single INSERT/UPDATE/DELETE. DDL (DROP/TRUNCATE/ALTER/…) and unscoped UPDATE/DELETE (no WHERE) are refused unless allowDangerous=true. Add "RETURNING *" to see affected rows.

Inputs: sql (required), params, allowDangerous.

seed_dummySeed dummy dataA

Insert dummy rows (with valid cuid ids + timestamps) into snippets/bookmarks/notes/commands/prompts, attached to existing users. Great for filling the empty prompts/commands tables. Returns how many rows were inserted.

Inputs: notes, userId, prompts, commands, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools have distinct purposes: querying, writing, seeding, and introspection. However, run_query and run_write are clear opposites, and count_rows overlaps slightly with db_info/list_tables in terms of database introspection, though they serve different specific needs.

    Naming Consistency5/5

    All tool names use a consistent verb_noun pattern: run_query, run_write, seed_dummy, db_info, list_tables, describe_table, count_rows. Each name clearly indicates the action and the target, making the set highly predictable.

    Tool Count4/5

    With 7 tools, the count is well within the ideal range for a database management server. Each tool covers a core operation (query, write, seed, introspect), and none feel redundant. A couple more tools for advanced operations (e.g., transactions, backups) could be added, but the current count is appropriate.

    Completeness4/5

    The server covers essential database operations: querying, writing, seeding dummy data, and introspection (list tables, describe schema, row counts). It lacks tools for schema modification or data deletion scoped by ID, but the primary workflows for development (read, write, seed, introspect) are well covered.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides 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.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      1
      -
    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables Claude to interact with a local PostgreSQL database through SQL queries, schema inspection, and CRUD operations.
      8
      MIT