Back to blog

How to Set Up a SQLite MCP Server With Claude Cowork

Spencer Pauly
Spencer Pauly
4 min read
How to Set Up a SQLite MCP Server With Claude Cowork

A customer emailed asking why their team wasn't using a particular feature anymore. I was drafting a reply and wanted to check the actual usage numbers before I said anything. Our app data lives in a Turso database. My reply was half-written in Claude Cowork. I just asked the question there, in plain English, without switching contexts. The answer came back, I cited the number in the email, and kept writing. That's the whole pitch.

Here's how to get your SQLite database into Claude Cowork via QueryBear's MCP server.

Part of the SQLite MCP Server guide.

What you'll need

  • A SQLite database accessible via a Turso or libSQL endpoint (QueryBear connects via HTTP, not local .db files)
  • A QueryBear account
  • Claude Cowork installed on your Mac or Windows machine

Why route through a gateway

The short version: you don't want an AI tool holding your database credentials in context, and you don't want unbounded queries running against your data. QueryBear gives every query a parser check (no writes allowed), a table allowlist, column masking, a row limit, and a timeout. The full picture is in the SQLite MCP Server guide.

Connect QueryBear to your SQLite database

QueryBear connects to SQLite via Turso/libSQL HTTP endpoints, which means it works with any database hosted on Turso or any server running @libsql/client. Local .db files aren't supported.

  1. Open the QueryBear dashboard and click "New connection."
  2. Pick "SQLite (Turso/libSQL)" and paste your libsql://...turso.io URL along with your auth token.
  3. Under "Allowed tables," pick the tables Cowork should be able to query. Leave anything sensitive off the list.
  4. Under "Blocked columns," add any columns that shouldn't reach the AI's context window.
  5. Save. QueryBear will test the HTTP connection.

One thing worth knowing about SQLite: it uses dynamic typing, so a column you expect to hold integers might contain strings depending on how data was inserted. Be specific in your WHERE clauses if results look off.

Install the QueryBear MCP server in Claude Cowork

Open Claude Cowork and go to Settings → Connectors → Add custom connector.

Fill in:

  • Name: querybear
  • URL: https://mcp.querybear.com/mcp

Save and restart if prompted. Cowork now has list_connections, get_schema, and run_query available in every session, all routed through QueryBear.

Ask your first question

Once connected, you can ask questions the same way you'd write them in a message to a colleague:

I asked: "What's the most-used feature in our app last week?"

Claude Cowork checked the schema and generated:

SELECT feature_name, COUNT(*) AS event_count
FROM events
WHERE created_at >= datetime('now', '-7 days')
GROUP BY feature_name
ORDER BY event_count DESC
LIMIT 10;

The top feature had 3,400 events. I cited that number in my customer reply and moved on.

SQLite's datetime('now', '-7 days') is the standard way to scope to a rolling window. QueryBear knows the dialect and generates it correctly.

A Claude Cowork-specific tip

When you're drafting a document in Cowork, a data answer doesn't interrupt the flow. You ask the question inline, get the result, and keep writing. If you need to share the data with someone else, you can drag the result table directly into a slide in Keynote or PowerPoint. It lands as a table you can style, not an image. For things like a customer health review or a weekly feature report, that small difference saves a surprising amount of time.

Using a different tool?

  • Claude Code - terminal-native, best for engineers
  • Cursor - IDE-native
  • Windsurf - IDE-native, alternative to Cursor
  • ChatGPT - browser, requires Developer Mode
  • Codex - OpenAI's CLI agent
  • Gemini - Google's CLI agent

Querying a different database?

Database Access

Give Your AI Agents
Database Access. Securely.

Connect any database. Control permissions. Audit every query. All running locally on your machine.