# flapi [Health: Active]

**Category:** 📊 Data Platforms  
**Repository:** https://github.com/DataZooDE/flapi  
**GitHub Stars:** 75  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/flapi

## Description
API Framework heavily relying on the power of DuckDB and DuckDB extensions. Ready to build performant and cost-efficient APIs on top of BigQuery or Snowflake  for AI Agents and Data Apps

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "flapi": {
    "command": "uvx",
    "args": ["--from","flapi-io","flapi"]
  }
}
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/flapi/readme_

