Flapi logo

Flapi

Turns SQL templates into REST endpoints and MCP tools backed by DuckDB, with shared validation, caching, and role-based access control.

Install Flapi

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "flapi": {
      "command": "uvx",
      "args": [
        "--from",
        "flapi-io",
        "flapi"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx --from flapi-io flapi

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

flapi MCP server converts YAML-defined SQL templates into REST endpoints and MCP tools using a single DuckDB-based binary. It connects to sources including BigQuery, Snowflake, Parquet, Postgres, MySQL, Iceberg, S3, and SAP systems through DuckDB extensions and related connectors. REST and MCP interfaces share parameter validation, SQL templates, caching, and access controls, while MCP is exposed at `/mcp/jsonrpc` alongside the REST API. Reach for flapi when agents or data applications need governed tools over analytical or operational data without writing a separate API service.

Use cases

  • Expose warehouse queries as governed MCP tools
  • Build REST APIs over BigQuery or Snowflake data
  • Serve Parquet and Iceberg data to AI agents
  • Share validated SQL endpoints between apps and agents
  • Package a configured data API into one deployable binary

Key features

  • SQL templates for REST and MCP
  • DuckDB-backed multi-source querying
  • Typed parameter validation
  • Shared caching across REST and MCP
  • Per-tool role-based access control
  • Long-running MCP tasks

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

4/4 checks healthy over the last 9d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · flapi-io (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars75Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Flapi works

What flapi does

flapi turns SQL templates and YAML configuration into HTTP APIs and Model Context Protocol tools. A single configuration can define REST endpoints, MCP tools, and MCP resources. The same SQL, parameter rules, cache, and role checks can serve both REST callers and AI agents.

DuckDB is embedded in the distributed binary and provides access to a broad set of data sources. Supported examples include BigQuery, Snowflake, Parquet, Postgres, MySQL, Iceberg, S3, and SAP ERP or BW through the listed DuckDB extensions and connectors. SQL templates use Mustache-like expressions, with typed parameter references bound as DuckDB prepared-statement values.

How it works

Configuration entries are classified by whether they contain a url-path, mcp-tool, or mcp-resource. flapi runs the REST API and MCP service together on one port. With the default container setup, REST requests use the configured HTTP routes and MCP JSON-RPC requests use /mcp/jsonrpc; /mcp/health exposes an MCP health check.

MCP tools can advertise typed parameters and constraints, return structured content, and use an output schema learned after their first invocation. Asynchronous tools can return task handles for long-running queries, with task retrieval and cancellation support. MCP resources can use templates such as flapi://customers/{id}.

Setup and configuration

The Python package flapi-io provides both the flapi server command and the flapii CLI. It can be run temporarily with uvx or installed with pip. Pre-built binaries and a container image are also available. The server accepts a configuration file through -c, for example flapi -c flapi.yaml.

The container exposes one port for both protocols and mounts a directory containing flapi.yaml and its related SQL files. MCP is enabled by default and can be disabled with mcp.enabled: false. Swagger UI is available at /doc, with the generated Swagger YAML at /doc.yaml.

Tools and capabilities

  • Generate REST endpoints and MCP tools from SQL templates.
  • Query BigQuery, Snowflake, Parquet, Postgres, MySQL, Iceberg, S3, SAP ERP, and other DuckDB-accessible sources.
  • Validate typed parameters including integers, doubles, booleans, dates, times, UUIDs, enums, emails, and strings.
  • Share DuckLake-backed caches between REST and MCP, including full refresh and incremental synchronization.
  • Apply per-tool and per-resource role restrictions, rate limits, response shaping, and dry-run requests.
  • Package configuration, templates, and small data files into a deployable binary while excluding configured secret-file patterns.

Limitations and notes

MCP and REST share the server port rather than using separate ports. Configuration, SQL templates, and any required data files must be supplied to the process or packaged into the binary. Telemetry is enabled by default and can be disabled with the --no-telemetry flag, the FLAPI_NO_TELEMETRY environment variable, or configuration. Claude Code users can install the flapi plugin to scaffold, configure, deploy, and debug flapi projects.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Flapi

flapi is an MCP server that connects AI agents to DuckDB-accessible data sources such as BigQuery, Snowflake, Parquet, Postgres, MySQL, Iceberg, S3, and SAP systems. Its main tools are YAML-defined SQL-backed MCP tools and resources, served alongside REST endpoints with shared validation, caching, and role-based access control.

Install it with `pip install flapi-io`, which provides the `flapi` and `flapii` commands. You can also run it with `uvx --from flapi-io flapi -c flapi.yaml`, or use the published Docker image and pre-built binaries.

Define MCP tools in YAML and associate them with SQL templates using the `mcp-tool` configuration type. Typed parameters, caching, authentication, and per-tool roles are configured through the flapi project configuration; MCP authentication is set in the top-level `mcp.auth` block.

The MCP JSON-RPC endpoint is available at `/mcp/jsonrpc` on the same port as the REST API. MCP health checks use `/mcp/health`, and MCP can be disabled with `mcp.enabled: false` in `flapi.yaml`.

Yes. flapi provides a Claude Code plugin that can scaffold projects, create endpoints and MCP tools, design caches, and help deploy or debug flapi. The plugin is installed from the `DataZooDE/flapi` marketplace repository.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFlapi AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/flapi?style=directory)](https://allmcps.com/mcp/flapi)
HTML Embed
<a href="https://allmcps.com/mcp/flapi"><img src="https://allmcps.com/api/badge/flapi?style=directory" alt="Flapi on AllMCPs" /></a>