{
 "kind": "mcp",
 "slug": "io-dbcode-dbcode",
 "path": "mcp/servers/io-dbcode-dbcode/",
 "name": "DBCode",
 "maker": "dbcodeio",
 "density": "full",
 "crumbs": [
  [
   "MCP servers",
   "mcp/"
  ],
  [
   "Databases",
   "mcp/databases/"
  ]
 ],
 "lead": "your AI assistant queries your databases.",
 "chips": [
  {
   "label": "Databases",
   "path": "mcp/databases/"
  },
  {
   "label": "Official"
  },
  {
   "label": "Local"
  }
 ],
 "primary": {
  "label": "Copy connect command",
  "copy": "claude mcp add dbcode -- npx -y @dbcode/mcp"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/dbcodeio/public"
  },
  {
   "label": "Website",
   "href": "https://dbcode.io/docs/ai/mcp"
  }
 ],
 "track": "New versions and outages of the remote endpoint on your dashboard",
 "verdicts": [
  {
   "key": "official",
   "label": "Made by",
   "value": "The service itself",
   "status": "yes",
   "sub": "Official server",
   "quote": "\"homepage\": \"https://dbcode.io/docs/ai/mcp\",",
   "note": "The server is published by DBCode itself from its own GitHub organization dbcodeio; the npm package @dbcode/mcp points its homepage at dbcode.io, and the registry name io.dbcode matches that domain.",
   "src": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/mcp/package.json"
  },
  {
   "key": "secrets",
   "label": "Keys",
   "value": "No key needed",
   "status": "yes",
   "sub": "No account",
   "quote": "Cursor, VS Code, Windsurf, Antigravity and Kiro can also connect DBCode to their built-in agent without this package.",
   "note": "In VS Code and Cursor DBCode registers its tools by itself, so no config is needed there. The package needs Node.js 22.14 or newer and DBCode installed in an editor.",
   "src": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/mcp/README.md"
  },
  {
   "key": "where",
   "label": "Runs",
   "value": "On your machine",
   "status": "cond",
   "sub": "Runs code locally: npm",
   "note": "",
   "src": "https://github.com/dbcodeio/public"
  },
  {
   "key": "license",
   "label": "Commercial use",
   "value": "Allowed",
   "status": "yes",
   "sub": "Custom license license",
   "quote": "Free for everyone, including commercial use and teams of any size",
   "note": "DBCode and its MCP server are free for commercial use and teams of any size.",
   "src": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/README.md"
  }
 ],
 "vfoot": "Checked against its repository at one commit, on Nov 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What DBCode does",
   "parts": [
    {
     "t": "prose",
     "text": "DBCode is a database tool that lives inside VS Code, Cursor and similar editors. This server lets your AI assistant use the database connections you saved in DBCode, so it can list them, read the tables and run queries for you. It works with more than 100 kinds of databases."
    },
    {
     "t": "h3",
     "text": "What people use it for"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Ask questions about your data",
       "text": "Ask in chat, for example how many orders came in last month, and the assistant writes and runs the query on your saved connection.",
       "idea": false
      },
      {
       "title": "Learn an unfamiliar database",
       "text": "Let the assistant find your connections, read every table and column, and explain how the main tables relate before it writes any query.",
       "idea": false
      },
      {
       "title": "Copy real rows into a test database",
       "text": "Pull a slice of production data into your development database to test against real shapes. Only row counts go back to the assistant, not the rows.",
       "idea": false
      },
      {
       "title": "Query MongoDB in its own language",
       "text": "On a MongoDB connection the assistant can send the same find or aggregate statements you would type yourself, or plain SQL.",
       "idea": false
      },
      {
       "title": "An assistant inside a Dev Container",
       "text": "Turn on DBCode's local web server on your computer and point an assistant that runs in a Dev Container or on another machine at it, with sign-in kept on.",
       "idea": false
      },
      {
       "title": "Check the data after a release",
       "text": "After a change ships, ask the assistant to run a few read-only checks on a staging copy, such as counting rows with empty required fields.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "DBCode popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "367",
       "l": "GitHub stars, dbcodeio/public"
      },
      {
       "n": "118",
       "l": "downloads last week, @dbcode/mcp"
      },
      {
       "n": "0",
       "l": "public agent projects connect it"
      }
     ]
    }
   ]
  },
  {
   "id": "tools",
   "nav": "Tools",
   "h2": "Tools it gives your agent (8)",
   "parts": [
    {
     "t": "tools",
     "items": [
      {
       "name": "dbcode-get-connections",
       "text": "Lists your saved DBCode database connections."
      },
      {
       "name": "dbcode-get-databases",
       "text": "Lists the databases on one connection."
      },
      {
       "name": "dbcode-get-tables",
       "text": "Reads table schemas with columns, keys and indexes."
      },
      {
       "name": "dbcode-execute-query",
       "text": "Runs a read query and returns the rows (SQL or native MongoDB syntax)."
      },
      {
       "name": "dbcode-execute-dml",
       "text": "Runs data changes (insert, update, delete), subject to the connection's role."
      },
      {
       "name": "dbcode-execute-ddl",
       "text": "Runs schema changes such as creating or dropping tables, subject to the connection's role."
      },
      {
       "name": "dbcode-disconnect",
       "text": "Disconnects to release file locks on file-based databases such as SQLite."
      },
      {
       "name": "dbcode-copy-data",
       "text": "Copies the result of a query on one connection into an existing table on another (up to 1,000,000 rows per call)."
      }
     ]
    }
   ]
  },
  {
   "id": "data",
   "nav": "Data and license",
   "h2": "What it sends and its license",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Sends",
       "v": "table and column names, and the rows of every query the assistant runs",
       "sub": "To your AI client and the model provider it uses; each time the assistant calls a read or query tool. Opt out: use a read-only connection or AI data masking, or do not connect databases with private data."
      },
      {
       "l": "Sends",
       "v": "nothing from dbcode-copy-data except row counts and a sample of error messages",
       "sub": "To your AI client; when the assistant copies data between connections. Opt out: not needed; the copied rows stay between your databases."
      }
     ]
    },
    {
     "t": "prose",
     "text": "The server is free for everyone, including companies. The small launcher package is MIT, but DBCode itself is closed software you may use and not copy, change or pass on."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "Yes",
       "status": "yes",
       "sub": "DBCode and its MCP server are free for commercial use and teams of any size.",
       "quote": "Free for everyone, including commercial use and teams of any size",
       "src": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/README.md"
      },
      {
       "l": "Pass on its files",
       "v": "No",
       "status": "no",
       "sub": "The DBCode extension, where the tools run, may not be passed on without written consent; only the small launcher package is MIT.",
       "quote": "Licensee shall not distribute, sublicense, or transfer the Extension to third parties without prior written consent from Licensor.",
       "src": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/LICENSE"
      },
      {
       "l": "client-work",
       "v": "Yes",
       "status": "yes",
       "sub": "The license covers personal or business use on unlimited devices.",
       "quote": "grants the user (\"Licensee\") a non-exclusive, non-transferable license to download, install, and use the DBCode Extension (\"Extension\") on unlimited devices for personal or business purposes.",
       "src": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/LICENSE"
      }
     ]
    }
   ]
  },
  {
   "id": "alive",
   "nav": null,
   "spy_as": "data",
   "h2": "Is it alive",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Latest version",
       "v": "1.0.1 in the registry, updated Oct 3, 2026"
      },
      {
       "l": "Last release",
       "v": "@dbcode/mcp 1.0.1 on npm, published 2026-10-03; the DBCode docs page was updated Nov 9, 2026 (extension v1.39.1)"
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "DBCode",
       "me": true,
       "facts": [
        "367 stars",
        "Local"
       ]
      },
      {
       "name": "DBHub",
       "why": "Pick it if you want a standalone open source database server with no editor extension",
       "path": "mcp/servers/io-github-bytebase-dbhub/",
       "facts": [
        "3,870 stars",
        "Local",
        "in 23 projects"
       ]
      },
      {
       "name": "com-supabase-mcp",
       "why": "Pick it if your database is on Supabase and the agent should also manage the project",
       "path": null,
       "facts": [
        "Local"
       ]
      }
     ],
     "more": "All databases servers",
     "more_path": "mcp/databases/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add the DBCode MCP server (claude mcp add dbcode -- npx -y @dbcode/mcp), then list my DBCode connections, read the tables of my dev database and only run read queries unless I ask for a change."
    },
    {
     "t": "h3",
     "text": "Connect it"
    },
    {
     "t": "tabs",
     "label": "Connect by client",
     "items": [
      {
       "tab": "Claude Code",
       "code": "claude mcp add dbcode -- npx -y @dbcode/mcp"
      },
      {
       "tab": "npm (stdio)",
       "code": "npx -y @dbcode/mcp"
      },
      {
       "tab": "Cursor",
       "code": "{\n  \"mcpServers\": {\n    \"dbcode\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@dbcode/mcp\"]\n    }\n  }\n}\n"
      }
     ]
    },
    {
     "t": "small",
     "text": "In VS Code and Cursor DBCode registers its tools by itself, so no config is needed there. The package needs Node.js 22.14 or newer and DBCode installed in an editor."
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Asking \"show me all records created last month\" with no schema step",
       "fix": "First have the assistant read the tables and columns of the named database, then ask the question.",
       "why": "The assistant does not know your table names by itself and guesses."
      },
      {
       "dont": "Calling dbcode-copy-data into a table that does not exist yet",
       "fix": "Create the destination table first with dbcode-execute-ddl, and alias source columns to the destination column names.",
       "why": "The copy needs an existing table and maps columns by name."
      },
      {
       "dont": "npx -y @dbcode/mcp on a machine without the DBCode extension or with Node older than 22.14",
       "fix": "Install DBCode in a supported editor and Node.js 22.14+, then restart the agent.",
       "why": "The launcher only finds and starts the installed extension and checks the Node version."
      },
      {
       "dont": "Turning on the local web server with authorization None and external connections allowed",
       "fix": "Keep OAuth on whenever allowExternalConnections is enabled for Dev Containers or other machines.",
       "why": "Without OAuth anyone on your network can run queries through it."
      },
      {
       "dont": "Looping copy calls over a huge table in one go",
       "fix": "Split the source query into key ranges and call it repeatedly with duplicates=skip.",
       "why": "Each call copies at most 1,000,000 source rows; skip makes re-runs safe to resume."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Does it cost anything?",
       "a": "No. The server is free for everyone. Only extras such as a separate, narrower role for the assistant need the paid Pro plan.",
       "evidence": {
        "url": "https://dbcode.io/docs/ai/mcp",
        "quote": "The MCP server is free for everyone."
       }
      },
      {
       "q": "Do I need to keep my editor open?",
       "a": "No. With no editor open, the server reads your saved DBCode connections directly; a few features, such as copying data, then need the editor.",
       "evidence": {
        "url": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/mcp/README.md",
        "quote": "With no editor open, the server reads your saved DBCode connections directly."
       }
      },
      {
       "q": "Are my database passwords sent to the AI?",
       "a": "No. DBCode says it never sends credentials, passwords, connection strings or server addresses; table names and query results are sent when the assistant asks.",
       "evidence": {
        "url": "https://dbcode.io/docs/ai/privacy-and-security",
        "quote": "Database credentials or passwords"
       }
      },
      {
       "q": "Can the assistant delete data?",
       "a": "It can if the connection's role allows it. The Production role asks first for deletes and blocks dropping tables; read-only mode allows only reads.",
       "evidence": {
        "url": "https://dbcode.io/docs/connections/roles",
        "quote": "Most restrictive; limits potentially dangerous operations"
       }
      },
      {
       "q": "I use DBCode in two editors. Which connections does the assistant see?",
       "a": "The newest installed DBCode is used; add --app with the editor name, such as Cursor, to choose.",
       "evidence": {
        "url": "https://github.com/dbcodeio/public/blob/5d537882350d65f790959875068eff7751a51fe8/mcp/README.md",
        "quote": "If you use DBCode in more than one editor, choose which editor's connections the agent sees with --app"
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Registry name",
   "io.dbcode/dbcode"
  ],
  [
   "Category",
   "Databases"
  ],
  [
   "Version",
   "1.0.1"
  ],
  [
   "Package",
   "npm @dbcode/mcp"
  ],
  [
   "License",
   "Custom license"
  ],
  [
   "GitHub",
   "dbcodeio/public"
  ],
  [
   "In the registry since",
   "Oct 3, 2026"
  ],
  [
   "Works with",
   "Claude Code, OpenAI Codex, OpenCode, LangChain, n8n, LangGraph"
  ]
 ],
 "good": [
  "Query results, with real values from your tables, go to your AI assistant and its model provider. Only connect databases whose data you are fine sharing.",
  "The assistant can change data and tables. Set the connection to read-only or to the Production role, which asks before changes and blocks drops.",
  "A separate, narrower role just for the assistant needs the paid Pro plan; the default role, the same as yours, is free."
 ],
 "checked_line": "Read by AgentGid from 14 pages and files at one commit, checked Nov 10, 2026; stars update daily.",
 "logo": "https://agentgid.com/media/avatars/dbcodeio.png"
}