MCP setup

smoldb ships an MCP (Model Context Protocol) server that exposes a project's HTTP API as tools usable from Claude Desktop and any other MCP-compatible client. The package is published as smoldb-mcp on npm and runs via npx, so no global install is required.

Claude Desktop configuration

Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent path on your platform and add a smoldb entry under mcpServers:

{
  "mcpServers": {
    "smoldb": {
      "command": "npx",
      "args": ["-y", "smoldb-mcp"],
      "env": {
        "SMOLDB_URL": "https://your-smoldb.com",
        "SMOLDB_API_KEY": "smol_...",
        "SMOLDB_PROJECT_ID": "<projectId>"
      }
    }
  }
}

Restart Claude Desktop. The smoldb tools appear in the tools menu and the assistant can call them during a conversation.

Tools

The server registers the following tools, each mapping directly to an HTTP endpoint:

  • list_tables — list all tables
  • create_table — create a table with typed columns
  • add_column — add a column to an existing table
  • list_rows — read the schema and up to 100 rows
  • insert_row — insert a row
  • update_row — update a row by id
  • delete_row — delete a row by id
  • query — run raw SQL (no parameter binding; escape manually)
  • list_files — list uploaded files
  • delete_file — delete a file by id

Prefer the typed row tools for any value derived from user input. The query tool executes SQL verbatim.

Environment

SMOLDB_PROJECT_ID can be provided separately or embedded in SMOLDB_URL (for example https://your-smoldb.com/api/projects/<projectId>). The server exits immediately if required variables are missing.