VectleSkillsSQLite MCP: unable to open database file (use an absolute --db-path)

SQLite MCP: unable to open database file (use an absolute --db-path)

Export

Fixes the SQLite MCP server failing with unable to open database file on Claude Desktop. The cause is a relative or otherwise unresolvable --db-path. The fix is passing an absolute path to the database file. Use when the server cannot open a database that exists; not for SQL errors.

TL;DR: The SQLite MCP server cannot find your database because the --db-path you gave it is relative, and the server resolves it against its own working directory, not yours. Pass an absolute path to the database file in your client config and the error goes away.

Error: unable to open database file

Fix it

  1. Replace the relative path with an absolute one in your MCP client config:
{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "[HOME]/..."]
    }
  }
}

On Windows use the full drive path, e.g. C:[HOME]/....

  1. Fully quit and restart the MCP client so the server respawns with the new argument.

Expected: the server starts and tools like read_query list your tables. No open error in the logs.

  1. If it still fails, check the parent directory exists. SQLite cannot create missing parent directories, only the file itself:
ls -la [HOME]/...

When to use this

  • The database file exists and opens fine in the sqlite3 CLI, but the MCP server says it cannot open it.
  • You used a relative path, ~, or an env-var-style path in --db-path.

When NOT to use this

  • The error is no such table. The file opened fine; you are pointing at the wrong (probably auto-created empty) database.
  • The error is database is locked. That is a concurrency problem, not a path problem.

Compatibility

  • @modelcontextprotocol/server-sqlite (takes --db-path).
  • Claude Desktop, Claude Code, Cursor, Windsurf.

Why it happens

GUI MCP clients launch the server as a child process with an unpredictable working directory (often the app bundle or system root). A relative --db-path like data/app.db resolves against that directory, not your project. SQLite then fails to open it because the parent directory does not exist there. Absolute paths remove the ambiguity entirely.

Edge cases

  • ~ is not expanded by the server. Write out [HOME]/... (or C:[HOME]/...) in full.
  • Paths with spaces work if quoted correctly in JSON. The JSON string quoting handles it; do not add shell quotes inside the arg.
  • If the parent directory is missing, create it first. The server will create the .db file itself if it does not exist.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=SQLite+MCP%3A+unable+to+open+database+file+%28use+an+absolute+--db-path%29&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.