How to access Oracle ATP database using Claude Code in VS Code IDE

Claude's integration with Oracle Autonomous Transaction Processing (ATP) opens up powerful possibilities for database management and AI-assisted development. Rather than manually writing complex SQL queries, managing schemas, or analyzing database performance, we can now leverage Claude's natural language capabilities to interact with our ATP instance directl, all while keeping our credentials secure on our machine.

In this post, we will walk through the step-by-step process of connecting Claude Code (the VS Code extension) to Oracle ATP on macOS, enabling seamless database queries and interactions through the Model Context Protocol (MCP). By the end, we will have a fully functional AI-powered database management environment running entirely in VS Code.


Part 1: Install VS Code Extensions

Step 1.1: Open VS Code

Launch Visual Studio Code on your Mac.

Step 1.2: Open Extensions Marketplace

Press Cmd+Shift+X or click the Extensions icon on the left sidebar (it looks like 4 squares).

We see a search box at the top that says "Search Extensions in Marketplace".

Step 1.3: Install Claude Code Extension

  1. In the search box, type: claude

  2. You'll see Claude Code by Anthropic

  3. Click the Install button

  4. Wait for it to finish (shows "Installed" when done)






Step 1.4: Install SQL Developer Extension

  1. In the search box, type: Oracle sql developer
  2. You'll see Oracle SQL Developer by Oracle
  3. Click the Install button
  4. Wait for it to finish




Step 1.5: Restart VS Code

After both extensions install:

  1. Close VS Code completely (Cmd+Q)
  2. Reopen VS Code

You should now see:

  • Claude Code icon in the left sidebar (looks like a Claude logo)
  • SQL Developer icon in the left sidebar (looks like a database)



Now let's understand how these tools work together:



How the Architecture Works

  1. In VS Code → Type in Claude Code: "Show me all employees"
  2. Claude Code Extension → Sends our request to Claude Code CLI
  3. Claude Code CLI → Routes through MCP Protocol
  4. MCP Protocol → Translates our English request to SQL
  5. SQLcl MCP Server → Takes the SQL, looks up our saved connection
  6. Saved Credentials → Unlocks our Oracle wallet
  7. Oracle ATP → Executes the query, sends results back
  8. Results come back through all layers → Claude explains them to us in VS Code

Now let's install everything. Follow these steps in order.

Follow the below blog post for initial setup of Brew, Java and sqlcl. The Initial setup remains same.

How to Connect Claude Desktop App to Oracle ATP using MCP Server on MacOS


Or We can directly create connection in VS Code  using sql developer connection.




We created the above connection earlier using admin user.
We can create new connection with different user , test , save and connect with new connection.
Click on the Plus (+) icon and provide the details..


After providing the details click on test to test the connection.


Save and close.
We will see two connection now.



We can verify the sqlcl as below.
Right click on the connection and click on OpenSQLcl





We can test the simple sql.
Select * from dual;





Now we will install Claude code CLI.


 Install Claude Code CLI

Run below command in Mac Terminal or VS code Terminal.

curl -fsSL https://claude.ai/install.sh | bash




Run the below command to verify:

claude --version





Register SQLcl as MCP Server

Run below command in terminal:

claude mcp add --transport stdio --scope user sqlcl -- /opt/homebrew/bin/sqlcl -mcp




Let us verify the registration by running the below command:

claude mcp list

We should see like: sqlcl: /opt/homebrew/bin/sqlcl -mcp - ✔ Connected



Now let us test one by one again from basic:

Test SQLcl Connection

sqlcl /nolog


This is working fine, we got the SQL prompt.

Now check MCP Server

exit from the SQL prompt and run below command in terminal.

claude mcp list




Now let us test Claude Code with SQL
Run the below command from terminal:

claude

This should Start Claude Code


it will ask for permission, Enter to confirm · Esc to cancel.




Claude code is launched.

Now we will do a simple query:
Use the sqlcl MCP server to list my saved Oracle connections.

Claude should respond with our connection names.



Here is the result.



Now let us query some data or describe a table.

Connect to DevATP , describe the table EXT_OBJ_STORAGE_ZIP_FILES and also query the table for data.





Now let us test from the claude code UI mode as well:


We have successfully connected and access Oracle ATP database using Claude Code in VS Code.

Here are the checklist we need to ensure we have completed to successfully use the above setup.

  • VS Code with Claude Code extension installed
  • VS Code with SQL Developer extension installed
  • Homebrew installed
  • Java installed
  • SQLcl installed
  • Oracle Wallet downloaded and extracted and saved at a safe location and accessible.
  • ATP connection saved in SQLcl 
  • Claude Code CLI installed
  • SQLcl registered as MCP server
  • SQL Developer configured with wallet path