Short answer: add the server with claude mcp add, a name, and the command that starts it after --, for example claude mcp add --transport stdio warehouse -- <command that starts your database MCP server>. Pick the scope: local (you, this project, the default), project (the team, saved in .mcp.json), or user (you, every project). For a database, connect with a read-only login to a test or reporting copy, and never put the password in .mcp.json.
Once Claude Code can query the database itself, it stops guessing column names and starts checking its own answers. That is the benefit. The risk is the same: it can run whatever the login allows.
What are the three scopes?
| Scope | Saved in | Who has it | Good for |
|---|---|---|---|
| local (default) | your user settings, for this project | Only you, in this project | Trying a server, personal credentials |
| project | .mcp.json in the project | Everyone who opens the project | A shared, read-only reporting database |
| user | your user settings | You, in every project | A server you use everywhere |
Choose project scope with --scope project. Claude Code asks each person to approve project servers before they are used.
What should you check before connecting?
How do you see that it works?
Type /mcp in Claude Code: it lists the servers, whether each is connected, and its tools. Then ask something you can check: "How many rows are in the orders table?" and compare with your own count.
Where can you check this?
- Claude Code docs: Connect Claude Code to tools via MCP,
claude mcp add, scopes and/mcp
Where do you start?
Read what a server can offer in MCP for data: tools, resources and prompts. For the access rules inside a Power BI model, see row-level security.