# flAPI — Instant REST APIs & MCP Tools from SQL on DuckDB flAPI transforms SQL queries into production-ready REST APIs powered by DuckDB. Build blazing-fast, secure, AI-ready APIs in minutes. ## Ai-integration - [Claude Integration](https://flapi.io/docs/ai-integration/claude-integration.md): Connect flAPI to Claude Desktop and Claude Code - [MCP Config Tools](https://flapi.io/docs/ai-integration/mcp-config-tools.md): Manage flAPI endpoints, templates, and caches from an AI agent via the flapi_* MCP tools - [Model Context Protocol (MCP)](https://flapi.io/docs/ai-integration/mcp-overview.md): Expose flAPI endpoints as structured tools for AI agents - [MCP Protocol Reference](https://flapi.io/docs/ai-integration/mcp-protocol.md): JSON-RPC 2.0 protocol details for flAPI's MCP server — methods, sessions, errors ## Concepts - [Architecture Deep Dive](https://flapi.io/docs/concepts/architecture.md): Understanding how flAPI decouples slow backends from fast applications - [Caching Strategy](https://flapi.io/docs/concepts/caching-strategy.md): How flAPI's DuckLake-based caching reduces costs and unlocks snapshot-based time travel - [How It Works](https://flapi.io/docs/concepts/how-it-works.md): Understand flAPI's 3-step process to transform data into fast APIs - [SQL Templating](https://flapi.io/docs/concepts/sql-templating.md): Dynamic SQL queries with Mustache syntax ## Endpoints - [Authentication](https://flapi.io/docs/endpoints/authentication.md): Secure flAPI endpoints with Basic, Bearer (JWT), OIDC, or AWS Secrets Manager-backed credentials - [Endpoints Overview](https://flapi.io/docs/endpoints/overview.md): Learn how to create and configure API endpoints in flAPI - [Parameters](https://flapi.io/docs/endpoints/parameters.md): Handle request parameters in flAPI endpoints - [Response Format](https://flapi.io/docs/endpoints/response-format.md): Response shape, content negotiation, and pagination in flAPI - [SQL Templates](https://flapi.io/docs/endpoints/sql-templates.md): Learn how to write SQL templates for your API endpoints - [Validation](https://flapi.io/docs/endpoints/validation.md): Validate input parameters for security and data integrity - [Write Operations (CRUD)](https://flapi.io/docs/endpoints/write-operations.md): Configure POST, PUT, PATCH and DELETE endpoints in flAPI - [YAML Syntax & Structure](https://flapi.io/docs/endpoints/yaml-syntax.md): Extended YAML syntax for endpoints and MCP endpoints with best practices ## Examples - [Agent-Managed flAPI: Dynamic Endpoint Creation](https://flapi.io/docs/examples/agent-managed-flapi.md): Let an AI agent introspect, create, validate, and hot-reload flAPI endpoints over MCP — no server restart required - [Database Credentials from AWS Secrets Manager](https://flapi.io/docs/examples/aws-secrets-rotation.md): Back endpoint authentication with AWS Secrets Manager so user credentials live outside committed config - [BigQuery with Caching](https://flapi.io/docs/examples/bigquery-caching.md): Complete example of caching BigQuery data for cost-effective APIs - [Complete CRUD API Tutorial](https://flapi.io/docs/examples/crud-api.md): In this tutorial, you'll build a complete product management API with Create, Read, Update, and Delete operations using flAPI. By the end, you'll have a fully functional API that validates input, returns created data, and wraps writes in transactions. - [Pick a DuckLake Cache Refresh Mode](https://flapi.io/docs/examples/ducklake-refresh-modes.md): Choose between full, incremental append, and incremental merge refreshes for the same Parquet-backed products API - [Google Sheets API](https://flapi.io/docs/examples/google-sheets-api.md): Build a collaborative product catalog API from a spreadsheet - [Guided Agent Workflows with MCP Prompts](https://flapi.io/docs/examples/mcp-prompts.md): Publish prompt templates that walk AI agents through multi-step analysis tasks - [Schema as an MCP Resource](https://flapi.io/docs/examples/mcp-resources.md): Expose database schema and reference documentation to AI agents through MCP resources - [Multi-Environment Deployment from S3](https://flapi.io/docs/examples/multi-env-cloud-config.md): One flAPI image, three S3 paths — run dev, staging, and prod from the same container with config served by GitOps - [Multi-Tenant SaaS API with OIDC](https://flapi.io/docs/examples/oidc-saas-api.md): Delegate authentication to Microsoft Entra ID and drive row-level security from JWT claims - [Parquet File API](https://flapi.io/docs/examples/parquet-api.md): Create a REST API from Parquet files in 5 minutes - [SAP ERP Materials API](https://flapi.io/docs/examples/sap-erp-api.md): Complete example of building a materials inventory API from SAP ERP - [Vector Search RAG API](https://flapi.io/docs/examples/vector-search-rag.md): Build a production RAG system for AI agents with semantic search ## Getting-started - [Building from Source](https://flapi.io/docs/getting-started/build-from-source.md): Prerequisites - [Configuration](https://flapi.io/docs/getting-started/configuration.md): flAPI uses YAML files for configuration. The main configuration file (flapi.yaml) defines global settings, connections, and server behaviour. This page is an introduction to each top-level section — see the upstream Configuration Reference for the full option list. - [Contributing](https://flapi.io/docs/getting-started/contributing.md): We welcome contributions to Flapi! Here's how you can help: - [Deployment](https://flapi.io/docs/getting-started/deployment.md): Deploy flAPI to any cloud platform or on-premises infrastructure - [Creating Your First API](https://flapi.io/docs/getting-started/first-api.md): This guide walks you through creating your first API endpoint with flAPI using a Parquet file as the data source. You will end up with a running GET /customers/ endpoint that supports optional filtering parameters. - [Introduction to flAPI](https://flapi.io/docs/getting-started/introduction.md): The high-performance serving layer for enterprise data - [Quickstart](https://flapi.io/docs/getting-started/quickstart.md): What is Flapi? ## Guides - [Bidirectional Data Sync Patterns](https://flapi.io/docs/guides/bidirectional-sync.md): Traditional data serving layers are read-only—they pull data from slow backends and serve it from a fast cache, but changes flow only one direction. flAPI's write support enables bidirectional sync patterns where data flows both ways: reads from the cache, writes that update both the cache and the backend. - [Cloud Storage and VFS](https://flapi.io/docs/guides/cloud-storage.md): Load flapi.yaml and SQL templates from S3, GCS, Azure, or HTTPS without redeploying ## Guides - Caching - [DuckLake Caching Setup](https://flapi.io/docs/guides/caching/setup.md): Configure DuckLake-backed caching in flAPI for faster responses, snapshots, and time travel ## Guides - Connections - [BigQuery Connection](https://flapi.io/docs/guides/connections/bigquery.md): Connect flAPI to Google BigQuery - [Google Sheets](https://flapi.io/docs/guides/connections/google-sheets.md): Turn spreadsheets into production APIs - [ODBC (Universal Connector)](https://flapi.io/docs/guides/connections/odbc.md): Connect to ANY database - Oracle, Teradata, DB2, Informix, and more - [Connections Overview](https://flapi.io/docs/guides/connections/overview.md): Connect flAPI to your data sources - [Parquet Files](https://flapi.io/docs/guides/connections/parquet.md): Work with Parquet files in flAPI - [PostgreSQL Connection](https://flapi.io/docs/guides/connections/postgres.md): Connect flAPI to PostgreSQL databases - [Power BI](https://flapi.io/docs/guides/connections/powerbi.md): Query Power BI data models programmatically without opening Power BI - [SAP BW Connection](https://flapi.io/docs/guides/connections/sap-bw.md): Connect flAPI to SAP BW/4HANA for analytics and reporting data - [SAP ERP Connection](https://flapi.io/docs/guides/connections/sap-erp.md): Connect flAPI to SAP ERP systems using the ERPL extension - [Snowflake](https://flapi.io/docs/guides/connections/snowflake.md): Cost-optimized access to Snowflake with intelligent caching - [Vector Search (AI/RAG)](https://flapi.io/docs/guides/connections/vector-search.md): Build semantic search APIs for RAG applications and AI agents ## Tools - [flapii CLI](https://flapi.io/docs/tools/cli-overview.md): Command-line client for the flAPI Configuration Service - [Config Service REST API](https://flapi.io/docs/tools/config-service-api.md): Runtime configuration management over HTTP - manage endpoints, templates, caches, and schemas without restart - [Configuration Service](https://flapi.io/docs/tools/configuration-service.md): Manage and validate flAPI configurations at rest and at runtime - [Server CLI](https://flapi.io/docs/tools/server-cli.md): Command-line reference for the flapi server binary — flags, environment variables, self-packaging subcommands, signal handling, and exit codes. - [VS Code Extension](https://flapi.io/docs/tools/vscode-extension.md): flAPI development tools for Visual Studio Code