SkematIA Documentation

AI-Powered Backend as a Service (BaaS) with Firebird 5.0

What is SkematIA?

SkematIA is a Backend as a Service that lets you design, build, and query databases using natural language and AI. It runs on Firebird 5.0 and exposes your data through two interfaces: a Model Context Protocol (MCP) server for AI agents, and a REST API for any HTTP client.

You don't need database drivers, SQL knowledge, or direct Firebird access. Describe your data in plain language, and SkematIA creates the schema, tables, relationships, and constraints automatically. Then query your data conversationally or with raw SQL.

AI Schema Design

Describe your business in natural language. SkematIA generates a complete Firebird 5.0 schema with tables, fields, PKs, FKs, indexes, and generators.

Natural Language Queries

Ask questions about your data in plain language. The AI converts them to Firebird SQL and returns results instantly.

MCP + REST API

Connect from Claude, GPT, custom agents via MCP, or from any HTTP client via REST. Same API key, same data.

Zero-Trust Security

Granular permissions per API key (read_only, read_write, full). Audit trail on every operation. Rate limiting per plan.

Quickstart (under 10 minutes)

1. Sign up at skematia.com and create a project.

2. Copy your API key (starts with sk_).

3. Choose your connection method: MCP for AI agents, or REST for any HTTP client.

4. Set header: Authorization: Bearer sk_your_api_key

5. Start with list_tables or get_schema to explore your database.

Connect via MCP (for AI Agents)

SkematIA exposes a Streamable HTTP MCP server. It's stateless: each request is independent, no session management needed.

Endpoint

https://skematia.com/mcp/mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "skematia": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://skematia.com/mcp/mcp",
        "--header",
        "Authorization: Bearer sk_YOUR_API_KEY"
      ]
    }
  }
}

Claude Code (CLI)

claude mcp add skematia --transport http https://skematia.com/mcp/mcp

Python MCP SDK

from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession

async with streamablehttp_client(
    url="https://skematia.com/mcp/mcp",
    headers={"Authorization": "Bearer sk_YOUR_API_KEY"},
) as (read, write, _):
    async with ClientSession(read, write) as session:
        await session.initialize()
        tools = await session.list_tools()
        result = await session.call_tool("query", {
            "project_id": "your-project-id",
            "question": "how many tables exist?",
        })

Raw HTTP (curl)

curl -X POST https://skematia.com/mcp/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'

REST API

All REST endpoints require the /api/ prefix. Without it, requests hit the frontend and return 405. No trailing slashes.

SQL dialect is Firebird 5.0: column aliases require AS, table names are UPPERCASE, use ROWS N instead of LIMIT N.

Schema & Explorer

MethodEndpointDescription
GET GET/api/explorer/{id}/schemaFull database schema (tables, fields, PKs, FKs, generators)
GET GET/api/explorer/{id}/tablesList all tables
GET GET/api/explorer/{id}/tables/{table}/structureTable structure (columns, PKs, FKs, indexes)
GET GET/api/explorer/{id}/tables/{table}/dataPaginated table data
GET GET/api/explorer/{id}/schema/suggestionsSchema improvement suggestions
GET GET/api/explorer/{id}/schema/historyDDL version history
GET GET/api/explorer/{id}/schema/versionCurrent schema version summary

Data Operations

MethodEndpointDescription
POST POST/api/data/{id}/raw-sqlExecute raw SQL {"sql": "SELECT ..."}
GET GET/api/data/{id}/{table}List rows from a table
POST POST/api/data/{id}/{table}Insert record
PUT PUT/api/data/{id}/{table}/{pk}Update record by PK
DELETE DEL/api/data/{id}/{table}/{pk}Delete record by PK

AI Studio

MethodEndpointDescription
POST POST/api/ai/startStart AI design session
POST POST/api/ai/chatChat with AI for schema design
POST POST/api/ai/execute-schemaExecute AI-generated schema

Projects & API Keys

MethodEndpointDescription
GET GET/api/projectsList user projects
POST POST/api/projectsCreate new project
POST POST/api/api-keysCreate API key
GET GET/api/api-keysList API keys

Example (curl)

curl -H "Authorization: Bearer sk_YOUR_API_KEY" \
  https://skematia.com/api/explorer/{project_id}/schema

Example (Python)

import httpx
r = httpx.get(
    "https://skematia.com/api/explorer/{project_id}/schema",
    headers={"Authorization": "Bearer sk_YOUR_API_KEY"}
)
schema = r.json()

MCP Tools (15)

ToolDescriptionPermission
list_tablesList all tables with field countsread_only
get_schemaFull schema: tables, fields, PKs, FKs, relationshipsread_only
execute_sqlExecute raw SQL (permission depends on statement type)varies
queryNatural language to Firebird SQLread_only
insert_dataInsert one or more recordsread_write
update_dataUpdate record by primary keyread_write
delete_dataDelete record by primary keyread_write
bulk_updateUpdate multiple records by WHERE conditionread_write
design_schemaAI schema design from natural languagefull
modify_schemaAI schema modification from instructionsfull
schema_suggestionsAnalyze schema, return improvement suggestions with SQL fixread_only
schema_historyDDL change history with versions and timestampsread_only
list_projectsList accessible projectsread_only
create_projectCreate new project with Firebird databasefull
list_backupsList available backups (scheduled, manual, pre-restore)read_only

Security

SkematIA implements a Zero-Trust security model with three pillars:

Granular Permissions

Each API key has a permission level that controls allowed operations:

LevelAllowed
read_onlySELECT queries only
read_writeSELECT + INSERT, UPDATE, DELETE
fullAll operations including DDL (CREATE, ALTER, DROP)

Audit Trail

Every operation is logged with user, project, action, SQL statement, duration, and result. The audit log is immutable and stored in a central database.

Rate Limiting

Sliding window rate limiting per API key. Response headers include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

PlanLimit
Free / Beta30 requests/minute
Pro100 requests/minute
Business1,000 requests/minute