Section 9: Integration scenarios with Claude + MCP
Scenario 84: Asking read-only questions of a local database
Level: Advanced · Tools: Claude Desktop, local database MCP server, Desktop Extension, read-only database account
Who and in what situation
Okan, a cost analyst at a manufacturing company, asks questions each month of the local sales database that the IT team maintains on his computer, such as “which product group saw an increase in returns” and “which dealer sent incomplete invoices.”
How it is done today
Okan asks a colleague who knows SQL for a query, imports the results into Excel, and repeats the same waiting process with every new question.
How to do it with AI
- Ask the IT team to prepare a database MCP server that can read only the necessary tables and has no write/delete commands. The official architecture explains that a database server can provide a query tool and a schema resource. [145] [151]
- In Claude Desktop, go to Settings > Desktop app > Manage > Extensions. Install the organization-approved extension from the directory or install the
.mcpbfile provided by IT using Advanced settings > Extension Developer > Install Extension…. [153] - Enter the connection details and check the server status under + > Connectors. [153]
- Have it read the schema first; add the rule “perform read-only operations and show the query before running it.”
- Have it summarize the results with the source table and date range; verify critical decisions separately.
Example prompt
Use the {DATABASE_NAME} schema and read-only tools. Group {PRODUCT_GROUP} returns by dealer within {DATE_RANGE}. First explain the purpose of the query and the tables it will affect; do not write, update, delete, or export.Evidence and real-world example
The MCP architecture documents that a local server can run via STDIO and that a database server can provide a query tool. The use of Desktop Extension for tools such as a local database is also explained; no published customer case study was found. [151] [159]
Points to consider
The database extension runs on the local machine; use a read-only account, restricted table access, a query timeout, and test data. The MCP security documentation recommends trusted servers and an explicit consent approach. [152] [160]
Sources for this scenario
- What is the Model Context Protocol (modelcontextprotocol.io)
- Model Context Protocol Specification (modelcontextprotocol.io)
- MCP Security Best Practices (modelcontextprotocol.io)
- Getting Started with Local MCP Servers on Claude Desktop (support.claude.com)
- When to use desktop and web connectors (support.claude.com)
- Claude Code Security (docs.anthropic.com)