Flapi

v1.0.0โ€ขAPIsโ€ขstable

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

apicppduckdbduckdb-extensionmcp
Share:
70
Stars
0
Downloads
0
Weekly
0/5

What is Flapi?

Flapi is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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

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

This server falls under the APIs and Databases categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • API Framework heavily relying on the power of DuckDB and Duc

Use Cases

Build performant APIs on BigQuery or Snowflake.
Create cost-efficient data APIs using DuckDB.
Query large datasets through REST interfaces for AI agents.
DataZooDE

Maintainer

LicenseNOASSERTION
Languagec++
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx flapi

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Flapi

flAPI is a DuckDB-powered API framework that automatically generates RESTful and MCP-compatible endpoints from SQL templates, letting you expose BigQuery, Snowflake, Parquet, Postgres, MySQL, and Iceberg datasets as production-grade APIs without writing application code. It runs a REST server (port 8080) and an MCP server (port 8081) simultaneously from a single YAML configuration, making it ideal for AI agents that need to query large analytical datasets efficiently. Features include per-tool RBAC, rate limiting, DuckLake-backed caching, and a single-binary deployment via `flapi pack`.

Prerequisites

  • Python 3.8+ with pip, or Docker for container-based deployment
  • A data source to connect: local Parquet/CSV files, BigQuery, Snowflake, Postgres, or MySQL
  • Basic familiarity with YAML configuration and SQL
  • An MCP-compatible client such as Claude Desktop, Cursor, or VS Code
  • Optional: uv or uvx for zero-install usage via `uvx --from flapi-io flapi`
1

Install flAPI

Install flAPI using pip (installs both the `flapi` server and `flapii` CLI client) or run it with zero installation via uvx. Docker is also available for container deployments.

pip install flapi-io
# or run without installing:
uvx --from flapi-io flapi -c flapi.yaml
2

Create a project and configuration file

Initialize a new flAPI project. The configuration YAML defines connections to your data sources and the SQL templates for each endpoint. Create a `flapi.yaml` in your project directory.

# flapi.yaml
connections:
  - name: local-data
    type: duckdb
    database: ":memory:"

mcp:
  enabled: true
  port: 8081

server:
  port: 8080
3

Define a unified REST + MCP endpoint

Create a YAML endpoint definition that serves as both a REST API endpoint and an MCP tool. The `url-path` key creates the REST route and `mcp-tool` registers it as an AI-callable tool.

# endpoints/customers.yaml
url-path: /customers/
mcp-tool:
  name: get_customers
  description: Retrieve customer records from the database
  result-mime-type: application/json

request:
  - field-name: limit
    field-in: query
    description: Maximum number of records to return
    required: false
    validators:
      - type: int
        min: 1
        max: 1000

template-source: customers.sql
connection: [local-data]
4

Start the flAPI server

Launch flAPI pointing to your configuration file. Both the REST API (port 8080) and MCP server (port 8081) start concurrently. The Swagger UI is available at http://localhost:8080/doc.

flapi -c flapi.yaml --enable-mcp
# Or via Docker:
docker run -it --rm -p 8080:8080 -p 8081:8081 \
  -v $(pwd)/examples/:/config \
  ghcr.io/datazoode/flapi -c /config/flapi.yaml --enable-mcp
5

Configure your MCP client

Add the flAPI MCP server to your MCP client configuration. flAPI uses HTTP transport on port 8081, so configure the client to connect via the MCP JSON-RPC endpoint.

{
  "mcpServers": {
    "flapi": {
      "command": "uvx",
      "args": ["--from", "flapi-io", "flapi", "-c", "/path/to/flapi.yaml", "--enable-mcp"]
    }
  }
}
6

Verify the MCP server is running

Test the MCP server health endpoint and list available tools to confirm your SQL-defined endpoints are discoverable by AI agents.

curl http://localhost:8081/mcp/health
# Expected: {"status":"healthy","server":"flapi-mcp-server",...}

curl -X POST http://localhost:8081/mcp/jsonrpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Flapi Examples

Client configuration

Configure Claude Desktop or another MCP client to connect to a locally running flAPI instance. The server is started as a subprocess using the flapi-io Python package.

{
  "mcpServers": {
    "flapi": {
      "command": "uvx",
      "args": [
        "--from", "flapi-io",
        "flapi",
        "-c", "/path/to/your/flapi.yaml",
        "--enable-mcp"
      ]
    }
  }
}

Prompts to try

Once connected, ask your AI assistant to query data through the MCP tools defined in your flAPI configuration.

- "Call the get_customers tool and return the first 10 records"
- "Use the flapi MCP tool to query sales data filtered by region='West'"
- "List all available MCP tools exposed by the flAPI server"
- "Query the customers endpoint with limit=50 and format the results as a table"

Troubleshooting Flapi

MCP server returns 'tools_count: 0' even though YAML endpoints are defined

Ensure each endpoint YAML file includes an `mcp-tool` block with a `name` and `description`. The presence of `url-path` alone creates only a REST endpoint. Restart flAPI after editing YAML files.

Port 8081 already in use when starting flAPI

Change the MCP port in flapi.yaml under `mcp.port` or kill the process using the port with `lsof -ti:8081 | xargs kill -9`.

DuckDB extension for BigQuery or Snowflake fails to load

DuckDB extensions require a compatible DuckDB version. Run `flapi --version` to confirm the bundled DuckDB version, then install the matching extension: `INSTALL duckdb_bigquery FROM community` inside a DuckDB session.

Frequently Asked Questions about Flapi

What is Flapi?

Flapi is a Model Context Protocol (MCP) server that 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 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Flapi?

Follow the installation instructions on the Flapi GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Flapi?

Flapi works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Flapi free to use?

Yes, Flapi is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "flapi": { "command": "npx", "args": ["-y", "flapi"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide โ†’

Ready to use Flapi?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides