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
claude mcp add --transport stdio datazoode-flapi uvx --from flapi-io flapi -c flapi.yaml
How to use
flAPI combines a REST API server with an MCP (Model Context Protocol) server to expose datasets as read-only APIs and to provide AI tooling capabilities via MCP. The same unified YAML configuration drives both REST endpoints and MCP tools/resources, enabling you to define data-backed endpoints alongside MCP tools that can be called through JSON-RPC. Once running, REST endpoints are available on port 8080 (e.g., http://localhost:8080/) and the MCP server on port 8081 (e.g., http://localhost:8081/mcp/jsonrpc). You can discover tools, initialize the MCP session, and invoke tools through the JSON-RPC interface. The MCP tooling is designed to reuse the same SQL templates, authentication, validation, and caching used by REST endpoints, providing a cohesive development experience.
How to install
Prerequisites:
- Python environment with pip
- Optional: Docker if you prefer containerized usage (see Docker instructions in README)
Install via Python package (recommended for local development):
pip install flapi-io
This installs both the REST client commands (flapi) and the MCP client tools (flapii) on your system. You can then run the server with the provided command:
uvx --from flapi-io flapi -c flapi.yaml
If you prefer using the MCP and REST capabilities inside a container, pull and run the pre-built Docker image as described in the README (docker run ...). That approach uses the same configuration file (flapi.yaml) mounted into the container.
Alternative installation (Node.js/npm not required for this server):
- There is no npm package required for this server; this MCP server uses Python/uvx tooling. If you need to deploy in a Node.js workflow, consider wrapping the Python-based server in a script or using a container.
Additional notes
Tips and notes:
- The MCP server is enabled by default in flAPI deployments. You can enable it in the YAML under mcp settings or simply rely on the unified configuration approach described in the README.
- The configuration file should be named flapi.yaml (or adjust -c accordingly) and placed in the mounted/config directory when using Docker.
- REST endpoints run on port 8080; MCP JSON-RPC runs on port 8081. Ensure these ports are accessible in your environment.
- Tools and resources are discovered from the unified YAML configuration. You can initialize the MCP session and list available tools via the /mcp/jsonrpc endpoint after starting the server.
- If you encounter connectivity or health issues, check the MCP health endpoint at http://localhost:8081/mcp/health and verify that the configuration file paths are correct.
- For production deployments, consider using Docker or a system service to manage the uvx process and to monitor logs for errors.
Related MCP Servers
anytype
An MCP server enabling AI assistants to interact with Anytype - your encrypted, local and collaborative wiki - to organize objects, lists, and more through natural language.
hayhooks
Easily deploy Haystack pipelines as REST APIs and MCP Tools.
storyblok
A modular, extensible MCP Server for managing Storyblok spaces, stories, components, assets, workflows, and more via the Model Context Protocol (MCP).
openproject
A Model Context Protocol (MCP) server that provides seamless integration with OpenProject API v3.
create -kit
Scaffold a production-ready Model Context Protocol (MCP) server in seconds.
tally
MCP server for Tally.so - manage forms through AI with natural language commands and safety-first bulk operations