flapi
by DataZooDE
Overview
A fast and flexible API gateway powered by DuckDB, providing configurable HTTP and MCP endpoints for data access and management, with built-in caching, authentication, and rate-limiting features.
Installation
./build/release/flapi --port 8080 --config examples/flapi.yamlEnvironment Variables
- FLAPI_CONFIG_SERVICE_TOKEN
- FLAPI_TOKEN
- DB_USER
- POSTGRES_USER
Security Notes
Critical SQL Injection Vulnerability: The `QueryExecutor` directly executes SQL query strings (`duckdb_query(conn, query.c_str(), &result)`) which are constructed from Mustache templates and user-provided parameters. While a `RequestValidator` attempts to prevent SQL injection using regex, this method is fundamentally insufficient and prone to bypasses, posing a severe risk. This allows malicious users to execute arbitrary SQL commands including data exfiltration, modification, or deletion. Additionally, `executeWrite` splits queries by semicolon, enabling multi-statement injection. It is recommended to use parameterized queries with prepared statements for all user-controlled inputs. Other security aspects like JWT/OIDC authentication are implemented using standard libraries (jwt-cpp, OpenSSL) which is a positive, and AWS Secrets Manager integration leverages DuckDB's secret management, but the core SQL execution flaw is critical.
Similar Servers
zen-mcp-server
A server for coordinating and managing AI agents, likely for simulations or complex task execution, leveraging Claude LLMs.
mcp-server-mysql
A backend server application for a Modular Control Platform (MCP) or Microservice Control Plane, likely built with Node.js/TypeScript and integrating with MySQL, potentially featuring AI/LLM evaluation capabilities.
mcp-duckdb-memory-server
Manages and queries a knowledge graph using DuckDB as an embedded backend for AI agent memory, specifically designed for the Model Context Protocol.
lex
Provides a UK legal research API for AI agents, offering capabilities to search legislation, caselaw, amendments, and explanatory notes using semantic and keyword search, and includes a Micro-Copilot (MCP) server for integration with AI assistants.