Today, I experimented with the MCP server setup for the Oracle database using SQLCL. I want to thank Kris Rice and Jeff Smith for previously sharing information about this feature; I finally found some time to try it out. My background is in SQL, PL/SQL, and Oracle Database from a developer’s perspective, so I needed to spend some time to understand Claude Desktop, VS Code, etc. Hereβs a step-by-step account of what I did. I used an Oracle AI Database, but you can use any version of the Oracle database since we are not utilizing any built-in AI functionality.
Set up the environment
My PDB name is PDB261. Schema name is DVDRENT. Data loaded from https://github.com/ogobrecht/sample-data-sets-for-oracle
I am comfortable using Windows, so my client machine runs on Windows while my database is hosted on a Linux server.
Downloaded and installed the following:
- JDK 21
- SQLcl latest – uncompressed the folder to c:\tools\sqlcl. Also added “C:\tools\sqlcl\bin” directory to %PATH% (local environment variable)
- Claude Desktop – Used my Google account to sign-in and register for the free account.
SQLcl Configuration
- Verify SQLcl is working
C:\Users\opc>sql -version
SQLcl: Release 25.3.1.0 Production Build: 25.3.1.311.1257
- Save credentials in SQLcl
C:\Users\opc>sql -save mcp_dvdrent -savepwd dvdrent/#######@//NN.NN.NN.NN:1521/PDB261
SQLcl: Release 25.3 Production on Mon Nov 10 19:00:55 2025
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Name: mcp_dvdrent
Connect String: //NN.NN.NN.NN:1521/PDB261
User: dvdrent
Password: ******
Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.0.0.0 - for Oracle Cloud and Engineered Systems
Version 23.26.0.0.0
SQL>
Configure SQLcl MCP server with Claude
On your Claude Desktop, click on File > Settings, and then select Developer. Next, click on “Add MCP Server.” This step will direct you to the location of the file named “claude_desktop_config.json.” Open this file with your preferred editor (such as Notepad) and add the SQLcl information for your MCP server.
{
"mcpServers": {
"sqlcl": {
"command": "c:\\tools\\sqlcl\\bin\\sql",
"args": ["-mcp"]
}
}
}
Restart (File > Exit, then relaunch) Claude Desktop. You should see the MCP server under “Developer”

That’s it!
Now, the play part!
The search and tools icon is in the bottom portion of the chat window (next to the Plus sign).

It shows that SQLcl is configured.

Click on the > next to sqlcl to see all the programs available.

I didn’t know where to start the conversation or how to connect to my database from here.
Here is how I started my conversation.

The AI agent is friendly π

That was easier than I thought!

Wow! It just gave me full insight on my schema, relationship and everything I need to know!!!
Perfect! I've successfully connected to the **mcp_dvdrent** database. This appears to be an Oracle 23c database (version 23.26.0.0.0) with UTF-8 character encoding.
Now let me gather detailed information about the schema to provide you with insights:Excellent! I now have detailed schema information. Let me provide you with comprehensive insights about the **mcp_dvdrent** database:
## π Database Overview: DVD Rental System
This is a **DVD rental store database** (similar to the classic Sakila database) with 16 tables modeling a complete rental business operation.
### π¬ Core Business Entities
**1. Film Management (4 tables)**
- **DRS_FILM**: Core film catalog with 13 columns including title, description, release year, rental rate, replacement cost, rating, and special features
- **DRS_LANGUAGE**: Language reference data
- **DRS_CATEGORY**: Film categories/genres
- **DRS_ACTOR**: Actor information (first name, last name)
**2. Customer & Location (5 tables)**
- **DRS_CUSTOMER**: Customer records with contact info, linked to addresses and stores
- **DRS_ADDRESS**: Physical addresses with district, postal code, phone
- **DRS_CITY**: City names
- **DRS_COUNTRY**: Country reference data
- **Complete geographic hierarchy**: Country β City β Address
**3. Store Operations (4 tables)**
- **DRS_STORE**: Store locations with manager assignments
- **DRS_STAFF**: Employee records with credentials (username/password), including profile pictures (BLOB)
- **DRS_INVENTORY**: Film copies available at each store
- **DRS_PAYMENT**: Payment transactions tracking rental fees
**4. Rental Transactions (1 table)**
- **DRS_RENTAL**: Rental history with dates (rental_date, return_date) and customer/inventory linkage
**5. Relationship Tables (2 tables)**
- **DRS_FILM_ACTOR**: Many-to-many relationship between films and actors
- **DRS_FILM_CATEGORY**: Many-to-many relationship between films and categories
**6. System Table**
- **DBTOOLS$MCP_LOG**: MCP (Model Context Protocol) logging table tracking AI interactions
### π Key Relationships
The database has a well-designed relational structure with 14 foreign key relationships:
- Films β Language (films have language and original language)
- Customers β Address β City β Country (geographic hierarchy)
- Customers β Store (home store assignment)
- Staff β Address & Store (employee locations)
- Inventory β Film & Store (which films at which locations)
- Rentals β Customer, Inventory, Staff (complete rental tracking)
- Payments β Customer, Rental, Staff (financial transactions)
### π Data Insights I Can Provide
Would you like me to analyze:
1. **Business metrics**: Total films, customers, revenue, rental patterns
2. **Film analysis**: Most popular genres, actors, rental rates
3. **Customer insights**: Active customers, rental frequency, geographic distribution
4. **Store performance**: Inventory levels, revenue by store
5. **Staff analysis**: Employee assignments and performance
6. **Data quality**: Missing values, data consistency checks
Let me know what insights you'd like to explore, and I'll run the appropriate queries!
I choose #2, and it produced a comprehensive report.
Perfect! Let me analyze the film-related data to provide you with comprehensive insights.Perfect! Now let me create a comprehensive visual report of the film analysis:## π¬ Film Analysis Key Insights
I've created an interactive dashboard for you! Here are the main findings:
### **π Catalog Overview**
- **1,000 films** in the catalog with **200 actors**
- All films are in **English** (no other languages in current inventory)
- Film lengths range from **46 to 185 minutes** (avg: 115 min)
### **π° Pricing Strategy**
- **Rental rates**: $0.99 - $4.99 (avg: $2.98)
- **Replacement costs**: $9.99 - $29.99 (avg: $19.98)
- **Games & Sci-Fi** categories command highest rental rates ($3.25 & $3.22)
- **Documentary & Action** have lowest rates ($2.67 & $2.65)
### **π Category Distribution**
- **Top 3 categories**: Sports (74), Foreign (73), Family (69)
- **Sports films** are longest on average (128 min) and generate good revenue
- Most categories have 51-74 films, showing balanced inventory
### **β Rating Analysis**
- **PG-13** is most common (223 films - 22.3% of catalog)
- Surprisingly, **NC-17** is second most common (210 films)
- **PG-rated** films have highest average rental rate ($3.05)
- **G-rated** films have lowest rental rate ($2.89)
### **π Star Power**
- **Susan Davis** is the most prolific actor (54 films!)
- Top 15 actors average 36-54 films each
- Shows significant star concentration - these actors drive the catalog
### **β±οΈ Rental Duration**
- Most films have **6-day** rental periods (212 films)
- Rental duration doesn't strongly correlate with rental rate
- 5-day rentals have highest average rate ($3.20)
### **π Premium Content**
- 10 films command maximum pricing ($4.99 rental + $29.99 replacement)
- These premium films are well-distributed across ratings (PG-13, G, R)
- Premium films range from 81 to 181 minutes - length isn't the price driver
**Business Recommendations:**
1. Consider expanding Sports & Foreign categories given their popularity and high rates
2. Leverage top actors like Susan Davis for marketing campaigns
3. Review NC-17 inventory levels - having more NC-17 than R-rated seems unusual
4. PG-rated content performs well financially - consider expansion
Would you like me to dive deeper into any specific aspect?
Here is the compreshensive HTML report it published. https://claude.ai/public/artifacts/b46b1b7d-7376-48f4-96d5-7002d4b898db
Very cool, isn’t?
Now, I wanted to check some of the DBA activities.

Let me check the database size for you:## πΎ Database Size Analysis
The **mcp_dvdrent** database is quite compact:
### **Total Database Size: ~11 MB (0.01 GB)**
This is a very small database, typical for a demo/sample database!
### **π Storage Breakdown by Segment Type:**
**Largest Tables:**
1. **DRS_RENTAL** - 0.88 MB (16,044 rows)
2. **DRS_PAYMENT** - 0.81 MB (16,049 rows)
3. **DRS_FILM** - 0.44 MB (1,000 rows)
4. **DRS_INVENTORY** - 0.19 MB (4,581 rows)
**Indexes take up significant space:**
- Multiple indexes on rental and payment tables (0.31-0.69 MB each)
- Total index space is comparable to table space (good for query performance)
**LOB Segments (Large Objects):**
- 3 LOB segments (0.25 MB each) - likely storing:
- Film descriptions (CLOB in DRS_FILM)
- Staff pictures (BLOB in DRS_STAFF)
- MCP log messages (CLOB in DBTOOLS$MCP_LOG)
### **π Row Count Summary:**
- **DRS_PAYMENT**: 16,049 transactions
- **DRS_RENTAL**: 16,044 rentals
- **DRS_FILM_ACTOR**: 5,462 actor-film relationships
- **DRS_INVENTORY**: 4,581 film copies
- **DRS_FILM**: 1,000 films
- **DRS_CUSTOMER**: 599 customers
- **DRS_ADDRESS**: 603 addresses
- **DRS_CITY**: 600 cities
### **Key Insights:**
- Average of **~16 rentals/payments per film** - good activity
- Each film has an average of **5.5 actors** (5,462 relationships Γ· 1,000 films)
- Each film has **~4.6 copies** in inventory
- Very efficient storage with only **11 MB** handling all this data
- The database is well-indexed (almost 1:1 ratio of table to index space)
This is an excellent size for a demo/testing database - small enough to be fast, but large enough to demonstrate real-world relationships and query patterns!
I got into the best practice discussion.

Here is the comprehensive report it created, which I published for you to read. https://claude.ai/public/artifacts/26d4e58c-a3d7-4470-8990-26baaf4c868f. Check out the areas for improvement. (Note: the user DVDRENT is a PDB user with no DBA or SYSTEM level privileges. So it could not see CDB level parameters, and it caused to generate some “halucinations” in the recommendation part)
This particular user has very limited privileges, no SYSTEM privs. I asked something beyond its privilege access domain.

And it concluded with:

As you can see, this demonstrates the power of these agents! Start playing…
I also used VS Code to connect to SQLcl MCP with the Antropic LLM (and Gemini). More to come…
