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

  1. 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]
  2. In Claude Desktop, go to Settings > Desktop app > Manage > Extensions. Install the organization-approved extension from the directory or install the .mcpb file provided by IT using Advanced settings > Extension Developer > Install Extension…. [153]
  3. Enter the connection details and check the server status under + > Connectors. [153]
  4. Have it read the schema first; add the rule “perform read-only operations and show the query before running it.”
  5. 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

  1. What is the Model Context Protocol (modelcontextprotocol.io)
  2. Model Context Protocol Specification (modelcontextprotocol.io)
  3. MCP Security Best Practices (modelcontextprotocol.io)
  4. Getting Started with Local MCP Servers on Claude Desktop (support.claude.com)
  5. When to use desktop and web connectors (support.claude.com)
  6. Claude Code Security (docs.anthropic.com)