能力标签
🔌
MCP工具

flapi

基于 C++ · 让 AI 助手直接操作你的系统与工具
⭐ 70 Stars 🍴 4 Forks 💻 C++ 📄 NOASSERTION 🏷 AI 7.5分
7.5AI 综合评分
apicppduckdbmcp
⚙️ 配置说明
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,flapi 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。

📚 深度解析
flapi 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 flapi,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。flapi 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 flapi 评为 AI 评分 7.5 分,属于同类工具中的优质选择。
📋 工具概览

flapi 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 70
开发语言
C++
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
NOASSERTION
AI 综合评分
7.5 分
工具类型
MCP工具
Forks
4
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

flapi 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/DataZooDE/flapi

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "flapi": {
      "command": "npx",
      "args": ["-y", "flapi"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 flapi 执行以下任务...
Claude: [自动调用 flapi MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "flapi": {
      "command": "npx",
      "args": ["-y", "flapi"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 68/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

⚡ Features

  • Automatic API Generation: Create APIs for your datasets without coding
  • MCP (Model Context Protocol) Support: Declarative creation of AI tools alongside REST endpoints — with per-tool RBAC (allowed-roles), shadow/dry-run (_dryRun: true), response shaping (max-rows / redact-columns / sample), per-tool rate limit, and a tool-description hygiene scanner for prompt-injection attempts
  • Multiple Data Sources: Connect to BigQuery, SAP ERP & BW (via ERPL), Parquet, Iceberg, Postgres, MySQL, and more
  • SQL Templates: Mustache-like syntax. Typed {{ params.X }} references on int/double/boolean/date/time/uuid/enum/email/string fields are bound as DuckDB prepared statements — SQL injection is structurally impossible for those sites
  • Caching: DuckLake-backed cache with full refresh and incremental sync
  • Production security: PBKDF2-SHA256 password hashing, config-driven CORS allowlist, per-user rate limiting, JSONL request audit log, TLS termination, startup config auditor — all opt-in via single-line YAML so flapii project init demos stay simple
  • Easy deployment: Deploy flAPI with a single binary file
  • Self-packaging: Fold an entire flapi config tree (YAMLs + SQL templates + small data files) into the binary itself via flapi pack. scp flapi-prod user@host becomes the whole deploy. Reproducible (SOURCE_DATE_EPOCH), notarisable on macOS via a reserved Mach-O segment, with a secret deny list (*.env, secrets/*, *.pem, *.key) enforced at pack time.
  • Privacy-respecting telemetry: Anonymous startup/shutdown analytics with easy opt-out via --no-telemetry flag, FLAPI_NO_TELEMETRY env var, or flapi.yaml

Key Features

  • Unified Configuration: Single YAML files can define REST endpoints, MCP tools, and MCP resources
  • Automatic Detection: Configuration type is determined by presence of url-path (REST), mcp-tool (MCP tool), or mcp-resource (MCP resource)
  • Shared Components: MCP tools and resources use the same SQL templates, parameter validation, authentication, and caching as REST endpoints
  • Concurrent Servers: REST API (port 8080) and MCP server (port 8081) run simultaneously
  • Declarative Definition: Define everything using YAML configuration with SQL templatestocol
  • Tool Discovery: Automatic tool discovery and schema generation
  • Security Integration: Reuse existing authentication, rate limiting, and caching features

Inspect what's bundled

./flapi-prod info

📦 Install

The fastest way to try flAPI — no download, no Docker:

```bash

Build include paths dynamically

template: path: "{{env.CONFIG_DIR}}/sqls" ```

📦 Self-packaging (single-binary deploy)

The same flapi binary that serves the API can fold an entire config tree into itself, producing one self-contained executable deployable via scp.

```bash

🏭 Building from source

The source code of flAPI is written in C++ and closely resembles the DuckDB build process. A good documentation of the build process is the GitHub action in build.yaml. In essecence a few prerequisites need to be met: In essecence a few prerequisites need to be met:

  • Install the dependencies: sudo apt-get install -y build-essential cmake ninja-build
  • Checkout the repository and submodules: git clone --recurse-submodules https://github.com/datazoode/flapi.git
  • Build the project: make release

The build process will download and build DuckDB v1.1.2 and install the vcpkg package manager. We depend on the following vcpkg ports:

Note: MCP support is built-in and doesn't require additional dependencies beyond what's already included.

🛠 Quick Start

The easiest way to get started with flAPI is to use the pre-built docker image.

1. Pull the docker image from the Github Container Registry:

> docker pull ghcr.io/datazoode/flapi:latest

The image is pretty small and mainly contains the flAPI binary which is statically linked against DuckDB v1.5.2. Details about the docker image can be found in the Dockerfile.

#### 2. Run flAPI: Once you have downloaded the binary, you can run flAPI by executing the following command:

> docker run -it --rm -p 8080:8080 -p 8081:8081 -v $(pwd)/examples/:/config ghcr.io/datazoode/flapi -c /config/flapi.yaml

The different arguments in this docker command are: - -it --rm: Run the container in interactive mode and remove it after the process has finished - -p 8080:8080: Exposes port 8080 of the container to the host, this makes the REST API available at http://localhost:8080 - -p 8081:8081: Exposes port 8081 for the MCP server (when enabled) - -v $(pwd)/examples/:/config: This mounts the local examples directory to the /config directory in the container, this is where the flAPI configuration file is expected to be found. - ghcr.io/datazoode/flapi: The docker image to use - -c /config/flapi.yaml: This is an argument to the flAPI application which tells it to use the flapi.yaml file in the /config directory as the configuration file.

#### 2.1 Enable MCP Support: To enable MCP support, you can either:

Option A: Use the command line flag

> docker run -it --rm -p 8080:8080 -p 8081:8081 -v $(pwd)/examples/:/config ghcr.io/datazoode/flapi -c /config/flapi.yaml --enable-mcp

Option B: Configure in flapi.yaml

mcp:
  enabled: true
  port: 8081
  # ... other MCP configuration

#### 3.1 Test the API server: If everything is set up correctly, you should be able to access the API at the URL specified in the configuration file.

> curl 'http://localhost:8080/'


         ___
     ___( o)>   Welcome to
     \ <_. )    flAPI
      `---'    

    Fast and Flexible API Framework
    powered by DuckDB

#### 3.2 Get an overview of the available endpoints: The flAPI server creates embedded Swagger UI at which provides an overview of the available endpoints and allows you to test them. It can be found at

> http://localhost:8080/doc

You should see the familiar Swagger UI page:

flAPI Swagger UI

The raw yaml Swagger 2.0 is also available at http://localhost:8080/doc.yaml

#### 3.3 Test the MCP server: If MCP is enabled, you can test the MCP server as well:

```bash

MCP Resource example

mcp-resource: name: customer_schema description: Customer database schema definition mime-type: application/json

template-source: customer-schema.sql connection: [customers-parquet] ```

🎓 Example

Here's a simple example of how to create an API endpoint using flAPI:

Quick start: Full refresh cache

1) Configure DuckLake globally (alias is cache by default):

ducklake:
  enabled: true
  alias: cache
  metadata-path: ./examples/data/cache.ducklake
  data-path: ./examples/data/cache.ducklake
  data-inlining-row-limit: 10  # Enable data inlining for small changes (optional)
  retention:
    max-snapshot-age: 14d
  compaction:
    enabled: false
  scheduler:
    enabled: true

2) Add cache block to your endpoint (no primary-key/cursor → full refresh):

url-path: /publicis
template-source: publicis.sql
connection: [bigquery-lakehouse]

cache:
  enabled: true
  table: publicis_cache
  schema: analytics
  schedule: 5m
  retention:
    max_snapshot_age: 14d
  template_file: publicis/publicis_cache.sql

3) Write the cache SQL template (CTAS):

-- publicis/publicis_cache.sql
CREATE OR REPLACE TABLE {{cache.catalog}}.{{cache.schema}}.{{cache.table}} AS
SELECT
  p.country,
  p.product_category,
  p.campaign_type,
  p.channel,
  sum(p.clicks) AS clicks
FROM bigquery_scan('{{{conn.project_id}}}.landing__publicis.kaercher_union_all') AS p
GROUP BY 1, 2, 3, 4;

4) Query from the cache in your main SQL:

-- publicis.sql
SELECT
  p.country,
  p.product_category,
  p.campaign_type,
  p.channel,
  p.clicks
FROM {{cache.catalog}}.{{cache.schema}}.{{cache.table}} AS p
WHERE 1=1

Notes: - The cache schema (cache.analytics) is created automatically if missing. - Regular GET requests never refresh the cache. Refreshes happen on warmup, on schedule, or via the manual API. - Data Inlining: When data-inlining-row-limit is configured, small cache changes (≤ specified row limit) are written directly to DuckLake metadata instead of creating separate Parquet files. This improves performance for small incremental updates.

Data inlining (optional, for small changes)

DuckLake supports writing very small inserts directly into the metadata catalog instead of creating a Parquet file for every micro-batch. This is called "Data Inlining" and can significantly speed up small, frequent updates.

  • Enable globally: configure once under the top-level ducklake block:
  ducklake:
    enabled: true
    alias: cache
    metadata_path: ./examples/data/cache.ducklake
    data_path: ./examples/data/cache.ducklake
    data_inlining_row_limit: 10  # inline inserts up to 10 rows
  
  • Behavior:
  • Inserts with rows ≤ data-inlining-row-limit are inlined into the catalog metadata.
  • Larger inserts automatically fall back to normal Parquet file writes.
  • Inlining applies to all caches (global setting), no per-endpoint toggle.
  • Manual flush (optional): you can flush inlined data to Parquet files at any time using DuckLake’s function. Assuming your DuckLake alias is cache:
  -- Flush all inlined data in the catalog
  CALL ducklake_flush_inlined_data('cache');

  -- Flush only a specific schema
  CALL ducklake_flush_inlined_data('cache', schema_name => 'analytics');

  -- Flush only a specific table (default schema "main")
  CALL ducklake_flush_inlined_data('cache', table_name => 'events_cache');

  -- Flush a specific table in a specific schema
  CALL ducklake_flush_inlined_data('cache', schema_name => 'analytics', table_name => 'events_cache');
  
  • Notes:
  • This feature is provided by DuckLake and is currently marked experimental upstream. See the DuckLake docs for details: Data Inlining.
  • If you don’t set data_inlining_row_limit, flAPI won’t enable inlining and DuckLake will use regular Parquet writes.

Template authoring guide (reference)

Use these variables inside your cache templates and main queries:

  • Identification
  • {{cache.catalog}} → usually cache
  • {{cache.schema}} → e.g., analytics (auto-created if missing)
  • {{cache.table}} → your cache table name
  • Mode and scheduling
  • {{params.cacheMode}}full | append | merge
  • {{cache.schedule}} → if set in YAML
  • Snapshots
  • {{cache.snapshotId}}, {{cache.snapshotTimestamp}}
  • {{cache.previousSnapshotId}}, {{cache.previousSnapshotTimestamp}}
  • Incremental hints
  • {{cache.cursorColumn}}, {{cache.cursorType}}
  • {{cache.primaryKeys}} → comma-separated list, e.g., id,tenant_id

Authoring tips: - Full refresh: use CREATE OR REPLACE TABLE ... AS SELECT .... - Append: INSERT INTO cache.table SELECT ... WHERE event_time > previousSnapshotTimestamp. - Merge: MERGE INTO cache.table USING (SELECT ...) ON pk .... - Do not create schemas in templates; flAPI does that automatically.

Unified Configuration

MCP is now automatically enabled - no separate configuration needed! Every flAPI instance runs both REST API and MCP servers concurrently.

Configuration files can define multiple entity types:

REST Endpoint + MCP Tool (Unified)

```yaml

Single configuration file serves as BOTH REST endpoint AND MCP tool

url-path: /customers/ # Makes this a REST endpoint mcp-tool: # Also makes this an MCP tool name: get_customers description: Retrieve customer information by ID result-mime-type: application/json

request: - field-name: id field-in: query description: Customer ID required: false validators: - type: int min: 1 max: 1000000 preventSqlInjection: true

template-source: customers.sql connection: [customers-parquet]

rate-limit: enabled: true max: 100 interval: 60

auth: enabled: true type: basic users: - username: admin password: secret roles: [admin]


#### MCP Resource Only
yaml

List available tools (discovered from unified configuration)

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

1. Create a basic flAPI configuration

flAPI uses the popular YAML format to configure the API endpoints. A basic configuration file looks like this:

project_name: example-flapi-project
project_description: An example flAPI project demonstrating various configuration options
template:
  path: './sqls'            # The path where SQL templates and API endpoint configurations are stored
  environment-whitelist:    # Optional: List of regular expressions for whitelisting envvars which are available in the templates
    - '^FLAPI_.*'

duckdb:                     # Configuration of the DuckDB embedded into flAPI
  db_path: ./flapi_cache.db # Optional: remove or comment out for in-memory database, we use this store also as cache
  access_mode: READ_WRITE   # See the https://duckdb.org/docs/configuration/overview) for more details
  threads: 8
  max_memory: 8GB
  default_order: DESC

connections:                # A YAML map of database connection configurations, a API endpoint needs to reference one of these connections
   bigquery-lakehouse: 
                            # SQL commands to initialize the connection (e.g., e.g. installing, loading and configuring the BQ a DuckDB extension)
      init: |
         INSTALL 'bigquery' FROM 'http://storage.googleapis.com/hafenkran';
         LOAD 'bigquery';
      properties:           # A YAML map of connection-specific properties (accessible in templates via {{ context.conn.property_name }})
         project_id: 'my-project-id'

   customers-parquet: 
      properties:
         path: './data/customers.parquet'

heartbeat:
  enabled: true            # The eartbeat worker is a background thread which can can be used to periodically trigger endpionts
  worker-interval: 10      # The interval in seconds at which the heartbeat worker will trigger endpoints

enforce-https:
  enabled: false           # Whether to force HTTPS for the API connections, we strongly recommend to use a reverse proxy to do SSL termination
  # ssl-cert-file: './ssl/cert.pem'
  # ssl-key-file: './ssl/key.pem'

After that ensure that the template path (./sqls in this example) exists.

2. Configure the endpoints SQL template (`./sqls/customers.sql`):

After the creation of the YAML endpoint configuration we need to connect the SQL template which connects the enpoint to the data connection. The template files use the Mustache templating language to dynamically generate the SQL query.

SELECT * FROM '{{{conn.path}}}'
WHERE 1=1
{{#params.id}}
  AND c_custkey = {{{ params.id }}}
{{/params.id}}

The above template uses the path parameter defined in the connection configuration to directly query a local parquet file. If the id parameter is provided, it will be used to filter the results.

🧩 YAML includes and environment variables

flAPI extends plain YAML with lightweight include and environment-variable features so you can keep configurations modular and environment-aware.

Environment variables

- Write environment variables as {{env.VAR_NAME}} anywhere in your YAML. - Only variables that match the whitelist in your root config are substituted:

  template:
    path: './sqls'
    environment-whitelist:
      - '^FLAPI_.*'     # allow all variables starting with FLAPI_
      - '^PROJECT_.*'   # optional additional prefixes
  
- If the whitelist is empty or omitted, all environment variables are allowed.

Examples: ```yaml

Conditional include based on an environment variable

{{include from overrides/dev.yaml if env.FLAPI_ENV}}

Use env var in the include path

{{include from {{env.CONFIG_DIR}}/secrets.yaml}} ```

Resolution rules and behavior: - Paths are resolved relative to the current file first; absolute paths are supported. - Includes inside YAML comments are ignored (e.g., lines starting with #). - Includes are expanded before the YAML is parsed. - Includes do not recurse: include directives within included files are not processed further. - Circular includes are guarded against within a single expansion pass; avoid cycles.

Tips: - Prefer section includes ({{include:...}}) to avoid unintentionally overwriting unrelated keys. - Keep shared blocks in small files (e.g., connections.yaml, auth.yaml) and include them where needed.

Pack a config tree into a new bundled binary

flapi pack --in ./examples --out flapi-prod

Run it — serves the bundled config from any cwd

cd /tmp && ./flapi-prod


**How it works:** a ZIP archive is appended after the executable on
Linux/Windows (or written into a pre-allocated `__FLAPI/__bundle`
Mach-O segment on macOS, then re-`codesign`-ed so the result is
notarisable). At startup, flAPI reverse-scans for the bundle (or
probes the segment on macOS) and registers an
`EmbeddedArchiveFileProvider` plus an `embed://` DuckDB
filesystem so config / SQL templates / `read_csv()` calls all
resolve to the in-memory bundle. If no bundle is present
(unbundled binary, truncated tail), all paths fall back to the
local filesystem unchanged — existing operators see no behaviour
change.

**Secrets stay out of the bundle.** `flapi pack` refuses files
matching `*.env`, `secrets/*`, `*.pem`, `*.key` by default. The
override (`--allow-secrets`) is for testing only. Credentials
come from the environment at runtime (`AWS_*`, `GOOGLE_*`,
`AZURE_*`, `FLAPI_CONFIG_SERVICE_TOKEN`, `{{env.VAR}}` YAML
interpolation).

**Reproducible builds.** Set `SOURCE_DATE_EPOCH` before
`flapi pack` and the output is byte-identical across runs:
bash SOURCE_DATE_EPOCH=1700000000 flapi pack --in examples --out a SOURCE_DATE_EPOCH=1700000000 flapi pack --in examples --out b sha256sum a b # identical ```

12-factor env vars. FLAPI_CONFIG falls back for -c / --config; FLAPI_LOG_LEVEL falls back for --log-level. CLI flag wins over env var wins over built-in default. Invalid log levels exit non-zero with a single-line error.

macOS notes. The reserved-segment size is 16 MiB by default (knob FLAPI_RESERVED_BUNDLE_MIB at CMake configure time); oversized bundles exit non-zero with a corrective error. A --macos-append flag is available for local debugging — it uses the Linux/Windows append-after-EOF layout but the result is intentionally not notarisable.

See docs/CLI_REFERENCE.md §3 and docs/spec/DESIGN_DECISIONS.md §9 for full reference + rationale.

Per-session via environment variable

export FLAPI_NO_TELEMETRY=1 ./flapi

Permanently via config file (flapi.yaml)

telemetry: enabled: false ```

See CLI Reference and Configuration Reference for full details.

flAPI: Instant SQL based APIs

flAPI is a powerful service that automatically generates read-only APIs for datasets by utilizing SQL templates. Built on top of DuckDB and leveraging its SQL engine and extension ecosystem, flAPI offers a seamless way to connect to various data sources and expose them as RESTful APIs.

overview of flAPI

Run the flapi server (note: "flapi" is taken on PyPI, so the package is "flapi-io")

uvx --from flapi-io flapi -c flapi.yaml

Run the flapii CLI client (also bundled in flapi-io)

uvx --from flapi-io flapii


Or install permanently — one package gives you both commands:
bash pip install flapi-io # installs both "flapi" and "flapii" commands ```

Pre-built binaries and Docker images are also available — see below.

MCP Endpoints

  • POST /mcp/jsonrpc - Main JSON-RPC endpoint for tool calls
  • GET /mcp/health - Health check endpoint

1. Define your API endpoint (`./sqls/customers.yaml`):

Each endpoint is at least defined by a YAML file and a corresponding SQL template in the template path. For our example we will create the file ./sqls/customers.yaml:

url-path: /customers/      # The URL path at which the endpoint will be available

request:                  # The request configuration for the endpoint, this defines the parameters that can be used in the query
  - field-name: id
    field-in: query       # The location of the parameter, other options are 'path', 'query' and 'body'
    description: Customer ID # A description of the parameter, this is used in the auto-generated API documentation
    required: false       # Whether the parameter is required
    validators:           # A list of validators that will be applied to the parameter
      - type: int
        min: 1
        max: 1000000
        preventSqlInjection: true

template-source: customers.sql # The path to the SQL template that will be used to generate the endpoint
connection: 
  - customers-parquet          # The connection that will be used to execute the query

rate-limit:
  enabled: true           # Whether rate limiting is enabled for the endpoint
  max: 100                # The maximum number of requests per interval
  interval: 60            # The interval in seconds
  
auth:
  enabled: true           # Whether authentication is enabled for the endpoint
  type: basic             # The type of authentication, other options are 'basic' and 'bearer'
  users:                  # The users that are allowed to access the endpoint
    - username: admin
      password: secret
      roles: [admin]
    - username: user
      password: password
      roles: [read]

heartbeat:
  enabled: true           # Whether the heartbeat worker if enabled will trigger the endpoint periodically
  params:                 # A YAML map of parameters that will be passed by the heartbeat worker to the endpoint
    id: 123
There are many more configuration options available, see the full documentation for more details.

Audit, retention, compaction, and control APIs

flAPI maintains an audit table inside DuckLake at cache.audit.sync_events and provides control endpoints:

- Manual refresh:

curl -X POST "http://localhost:8080/api/v1/_config/endpoints/publicis/cache/refresh"

- Audit logs (endpoint-specific and global):

curl "http://localhost:8080/api/v1/_config/endpoints/publicis/cache/audit"
curl "http://localhost:8080/api/v1/_config/cache/audit"

- Garbage collection (retention): Retention can be configured per endpoint under cache.retention:

cache:
  retention:
    max-snapshot-age: 7d     # time-based retention
    # keep-last-snapshots: 3 # version-based retention (subject to DuckLake support)
The system applies retention after each refresh and you can also trigger GC manually:
curl -X POST "http://localhost:8080/api/v1/_config/endpoints/publicis/cache/gc"

- Compaction: If enabled in global ducklake.scheduler, periodic file merging is performed via DuckLake ducklake_merge_adjacent_files.

One-off via CLI flag

./flapi --no-telemetry

Troubleshooting

  • Cache refresh happens on every request: by design this is disabled. Ensure you’re not calling the manual refresh endpoint from a client and that your logs show scheduled or warmup refreshes only.
  • Schema not found: verify cache.schema is set; flAPI will auto-create it.
  • Retention errors: use time-based max-snapshot-age first. Version-based retention depends on DuckLake support.
🎯 aiskill88 AI 点评 A 级 2026-05-25

高性能API框架,依赖DuckDB

⚡ 核心功能
👥 适合人群
Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师
🎯 使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
⚖️ 优点与不足
✅ 优点
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。

🔗 相关工具推荐
📚 相关教程推荐
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
flapi 是一款C++开发的AI辅助工具。开源MCP工具:API Framework heavily relying on the power of DuckDB and DuckDB extensions. Read。⭐70 · C++ 主要应用场景包括:构建高性能API。
💡 AI Skill Hub 点评

AI Skill Hub 点评:flapi 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
📚 深入学习 flapi
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 flapi
原始描述 开源MCP工具:API Framework heavily relying on the power of DuckDB and DuckDB extensions. Read。⭐70 · C++
Topics apicppduckdbmcp
GitHub https://github.com/DataZooDE/flapi
License NOASSERTION
语言 C++
🔗 原始来源
🐙 GitHub 仓库  https://github.com/DataZooDE/flapi 🌐 官方网站  https://flapi.io

收录时间:2026-05-25 · 更新时间:2026-05-26 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。