Flapi
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
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
Maintainer
Works with
Installation
Manual Installation
npx flapiConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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`
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.yamlCreate 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: 8080Define 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]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-mcpConfigure 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"]
}
}
}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.
Flapi Alternatives โ Similar APIs Servers
Looking for alternatives to Flapi? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
โ 43.4k๐ฆ The API and AI Gateway
API Mega List
โ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHubโperiod. ๐ช
Fetch
โ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
โ 2.1kSelf-Hosted API Management for Builders
Korean Law
โ 1.8k๊ตญ๊ฐ๋ฒ๋ น์ ๋ณดMCP v4.0 | ๋ฒ์ ์ฒ 41๊ฐ API โ 17๊ฐ MCP ๋๊ตฌ. ๋ฒ๋ นยทํ๋กยท์กฐ๋ก ๊ฒ์ + LLM ํ๊ฐ ๋ฐฉ์ง ์ธ์ฉ๊ฒ์ฆ + ์กฐ๋ฌธ ์ํฅ ๊ทธ๋ํ(impact_map) + ์์ ๋น๊ต ์๋ diff(time_travel) + ์๋ฏผ 5๋จ๊ณ ์คํ ๊ฐ์ด๋(action_plan) | 41 Korean legal APIs โ 17 MCP tools
RuleGo
โ 1.5kโ๏ธRuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
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.
Set Up Flapi in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.