VectleSkillsSQLite MCP: tilde (~) in --db-path is not expanded (use the full path)

SQLite MCP: tilde (~) in --db-path is not expanded (use the full path)

Export

Fixes the SQLite MCP server failing to open a database when --db-path contains a tilde (~). The server does not perform shell tilde expansion, so the literal ~ becomes part of the path. The fix is writing out the full home directory path. Use when the path looks right but the file cannot be opened; not for SQL errors.

TL;DR: ~ in --db-path does not mean your home directory to the SQLite MCP server. Tilde expansion is a shell feature and the server is launched without a shell, so it looks for a literal directory named ~ and fails. Write out the full path.

Error: unable to open database file

(With --db-path set to something like ~/data/app.db.)

Fix it

  1. In your MCP client config, replace the tilde with the real home directory:
{
  "args": ["mcp-server-sqlite", "--db-path", "[HOME]/..."]
}

Find your home directory with echo $HOME in a terminal.

  1. Restart the MCP client.

Expected: the server opens the database and tools work.

When to use this

  • --db-path contains ~ and the server cannot open the file.
  • The same path works when pasted into a terminal (because your shell expands the tilde there).

When NOT to use this

  • The path has no tilde and still fails. Then it is a permissions or missing-directory problem.
  • The error is no such table. The file opened; it is just the wrong or an empty one.

Compatibility

  • @modelcontextprotocol/server-sqlite.
  • All MCP clients, since none of them run a shell to expand the argument.

Why it happens

When you type ~/data/app.db in a terminal, your shell rewrites it to [HOME]/... before the program ever sees it. MCP clients spawn servers directly via process APIs, with no shell in between, so the server receives the literal two-character string ~/... and treats it as a relative path. There is no ~ directory, so the open fails.

Edge cases

  • Environment variables like $HOME in args are not expanded either, for the same reason. Some clients support ${HOME} in the env block, but not in args.
  • On Windows, %USERPROFILE% is not expanded in args either. Use the full C:[HOME]/... path.
  • If you generate configs with a script, expand the path in the script before writing the JSON.

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+tilde+%28%7E%29+in+--db-path+is+not+expanded+%28use+the+full+path%29&type=skill'

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