Claude Code/OpenClaw access Database MCP service

Published by Alvin Liu on

I am proud to announce that my Database MCP Server now supports most AI IDEs, enabling seamless connections to a wide range of databases.

general-purpose MCP server that lets any MCP-compatible AI client (Cursor, Claude Code, OpenClaw, etc.) connect to any JDBC-supported database (Oracle, MySQL, PostgreSQL, SQL Server, and more). Not tied to a single IDE or tool.

Built-in safety — Optionally asks for human confirmation before running risky SQL, helping prevent accidental data loss.

Built on MCP (Model Context Protocol) with Java 11 and JDBC. Add the JDBC driver JAR, configure your database in config.yaml, and attach the server to your AI client. See USER_GUIDE.md for step-by-step setup (Cursor, Claude Code, OpenClaw, and others).

Features

  • list_connections — List configured database connections and their availability (db_type, etc.).
  • execute_sql — Execute SQL (multi-statement), call stored procedures/functions (JDBC { call }), and on Oracle run anonymous PL/SQL blocks (BEGIN...END).
  • execute_sql_file — Run SQL from a file (same rules as execute_sql).
  • query_to_csv_file — Run a query and write the result to a CSV file.
  • query_to_text_file — Run a query and write the result to a text file (e.g. procedure source).

Review and safety — When enabled in config, some SQL may require user approval before execution; if rejected, the client receives an execution-cancelled result.

Logging — Optional audit log (file rotation) and stderr console log.

db_mcp audit log

Project: https://github.com/kjstart/cursor_db_mcp

Demos: YouTube | Bilibili 中文

Categories: AIDatabase

Alvin Liu

Software Developer in Toronto

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *