mcpdbwizard-open is an MCP server generator for Oracle databases. Its core purpose is not to give an AI agent a general-purpose SQL execution tool, but rather the opposite: to let you precisely select, at generation time, the database objects to expose, and then generate a typed toolset containing only those objects. Unselected objects do not appear in the generated binary, so there is no risk of being denied execution at runtime.
[Purpose and Problems Solved] The real-world problem the project points out is this: handing a run-sql tool to an agent causes public text-to-SQL accuracy to drop sharply on real enterprise-grade database schemas, and a wrong UPDATE is not a wrong answer but an incident. Hand-writing a tool for every stored procedure does not scale, and PL/SQL is especially unfriendly to automatic inference—a procedure can have any number of OUT and IN OUT parameters (with no single return value), parameters can be records (including nested records), collections, %ROWTYPE, REF CURSOR, package types, and overloads, and Oracle's own data dictionary describes these types differently across versions. What mcpdbwizard-open does is exactly this kind of inference.
[Main Capabilities]
- Generate typed MCP tools: each generated MCP tool carries a JSON Schema built from the procedure's real signature, so the agent knows exactly what the parameters are instead of inferring them from a textual description. Records are passed as JSON objects, REF CURSOR as an array of row objects, DATE as an ISO-8601 string, RAW and binary vectors as base64, CLOB as text, and BLOB as base64.
- Also generate the complete invocation layer: including typed DAO factories, callable statement wrappers, table managers, and an optional SOAP layer. These are also usable independently, but the MCP server is the focus.
- The exposure scope is decided at generation time, not at runtime: unselected objects generate no code at all. TABLE_MCP_CRUD_<i> can narrow a table to any subset of create/read/update/delete. Operations that are not exposed generate no tool method—it does not exist in the binary, rather than merely not being registered.
- Generate a single <Factory>McpServer.java: by default it uses stdio communication, with http [port] uses Streamable HTTP when starting. Optional bearer-token authentication and TLS both read secrets from the environment at runtime, and fail closed when not set, so no secrets are embedded in the generated source code.
- Exposed content covers PL/SQL routines, table row CRUD and secondary lookups, user SQL statements, sequences, and on 23ai support for JSON relational duality views along with their document CRUD and etag optimistic locking.
[Data Support and Known Gaps] Beyond ordinary scalars and LOBs, it supports 12c identity columns and extended VARCHAR2/RAW; 21c native JSON; 23ai native BOOLEAN, VECTOR (dense, binary, and sparse), and JSON relational duality views. Known gaps include: TIMESTAMP WITH [LOCAL] TIME ZONE and BFILE can be passed as procedure parameters, but cannot yet be used as table columns; SDO_GEOMETRY has no JSON mapping, and routines that use it are skipped; FLOAT16 vectors are blocked on the server side.
[Usage] Requires Java 21 and Maven. The Oracle JDBC driver (com.oracle.database.jdbc:ojdbc11) is obtained from Maven Central and requires no manual installation. After building, two jars are produced under target/: a normal jar, and a self-contained mcpdbwizard-app-<version>-shaded.jar with the driver built in. <log_dir> is created automatically if it does not exist. Configuration files support .pb2 (flat property files) and .json; both are accepted and can be converted losslessly to each other. As of 2026-08, the original leading <access_code> parameter was removed; if it is still passed on the command line, it will be read as the log directory. The logging backend of the generated server can be selected among console, text file, java.util.logging, Log4j 1.x, SLF4J, or Log4j 2; the SLF4J and Log4j 2 backends are in com.mcpdbwizard.pub and depend only on the facade jar (optional dependency).
[Testing and Limitations] The test suite without a database requires no additional conditions and passes on a freshly cloned repository. Tests that require Oracle are gated: when there is no reachable database, they are skipped rather than failing. The third-tier tests (link generator output) are not in this repository, and the schemas and configuration they require are not included either - because those schema structures are not part of the publicly available content. examples/generated-output/ can show what the generator produces without a database. The API documentation covers only the runtime library com.mcpdbwizard.pub that generated code links to, and carries a compatibility contract: its signatures are load-bearing, and only methods are added without changing them. The known issues page records the symptoms and workarounds for each issue, and some entries are documented but not fixed because no one has requested them yet. The license is Apache License 2.0, and generated code is your own work, without license obligations from this project.