mcp-sqlite mcp

v1.1.0 · MCP Tool · database · registry.pascalai.org

SQLite database access via FireDAC. Operations: query (SELECT → rows JSON), execute (INSERT/UPDATE/DELETE/DDL), tables (list all tables and views), schema (column info for a table), info (database statistics). database param = full path to the .db or .sqlite file. File is created automatically if it does not exist.

sqlitedatabasesqlfiredacembeddedlocalfile

Input Parameters

ParameterTypeDescription
operationrequired string Operation: query=SELECT, execute=write ops, tables=list tables/views, schema=column info for a table, info=DB statistics. One of: query, execute, tables, schema, info.
databaserequired string Full path to the SQLite database file (e.g. '/data/app.db', 'C:\data\sales.sqlite'). Created automatically if it does not exist.
sqloptional string SQL statement. Required for query and execute. SQLite supports standard SQL with LIMIT/OFFSET for pagination.
tableoptional string Table name. Required for schema operation.

Output Fields

FieldTypeDescription
ok boolean
rows array[object] Result rows (query operation).
columns array[string] Column names (query operation).
affected integer Rows affected (execute operation).
tables array[string] Table names (tables operation).
schema array[object] Column definitions (schema operation).
info object Database statistics (info operation).
error string

Examples

Query rows from a table

// Input
{
  "operation": "query",
  "database": "/data/app.db",
  "sql": "SELECT id, name, email FROM users WHERE active=1 ORDER BY name LIMIT 20"
}

// Output
{
  "ok": true,
  "columns": [
    "id",
    "name",
    "email"
  ],
  "rows": [
    {
      "id": 1,
      "name": "Alice",
      "email": "alice@example.com"
    }
  ]
}

Insert a record

// Input
{
  "operation": "execute",
  "database": "/data/app.db",
  "sql": "INSERT INTO users (name, email) VALUES ('Bob', 'bob@example.com')"
}

// Output
{
  "ok": true,
  "affected": 1
}

List all tables

// Input
{
  "operation": "tables",
  "database": "/data/app.db"
}

// Output
{
  "ok": true,
  "tables": [
    "users",
    "orders",
    "products"
  ]
}

Describe table columns

// Input
{
  "operation": "schema",
  "database": "/data/app.db",
  "table": "users"
}

// Output
{
  "ok": true,
  "schema": [
    {
      "cid": 0,
      "name": "id",
      "type": "INTEGER",
      "notnull": 1
    }
  ]
}

Database statistics

// Input
{
  "operation": "info",
  "database": "/data/app.db"
}

// Output
{
  "ok": true,
  "info": {
    "page_size": 4096,
    "page_count": 12,
    "table_count": 3
  }
}

Install & Discovery

Install

ppm install mcp-sqlite

Get JSON Schema

GET /v1/packages/mcp-sqlite/1.1.0/schema

Discover by keyword

GET /v1/mcp/discover?q=sqlite
Discovery hint: Install with ppm install mcp-sqlite or invoke remotely via POST /v1/invoke/mcp-sqlite on the MCP Service.