Florentine.ai MCP Server - Talk to your MongoDB & MySQL data
The Florentine.ai Model Context Protocol (MCP) Server lets you integrate natural language querying for your MongoDB & MySQL data directly into your custom AI Agent or AI Desktop App.
Questions are forwarded by the AI Agent to the MCP Server, transformed into database queries and the query results are returned to the agent for further processing.
Also has a couple of extra features under the hood, e.g.:
- Secure data separation for multi-tenant usage
- Automated schema exploration
- Semantic vector search/RAG support with automated embedding creation
- Advanced lookup support
- Exclusion of keys
Note: If you are looking for our API you can find it here.
Contents
Prerequisites
- Node.js >= v18.0.0
- A Florentine.ai account (create a free account here)
- A connected database and at least one analyzed and activated collection/table in your Florentine.ai account
- A Florentine.ai API Key (you can find yours on your account dashboard)
Installation
A detailed documentation of the MCP Server can be found here in our docs.
You can easily run the server using npx. See the following example for Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"florentine": {
"command": "npx",
"args": ["-y", "@florentine-ai/mcp", "--mode", "static"],
"env": {
"FLORENTINE_TOKEN": "<FLORENTINE_API_KEY>"
}
}
}
}
Available Tools
- florentine_list_collections --> Lists all currently active collections/tables that can be queried. That includes descriptions, keys and type of values.
- florentine_ask --> Receives a question and returns a query, query result or answer (depending on the
returnTypes setting).
Arguments
| Variable | Required | Allowed values | Description |
|---|
--mode | Yes | static, dynamic | static (for existing external MCP clients, e.g. Claude Desktop) or dynamic (for own custom MCP clients). See integration modes section. |
--debug | No | true | Enables logging to external file. If set requires --logpath to be set as well. |
--logpath | No | Absolute log file path | File path to the debug log. If set requires --debug to be set as ĂĄwell. |
Authentication
The Florentine.ai MCP Server uses an API key to authenticate requests. You can view and manage your API key on your account dashboard. The key must be added as an ENV variable to the configuration setup of the MCP server:
"env": {
"FLORENTINE_TOKEN": "<FLORENTINE_API_KEY>"
}
Connect your LLM account
Florentine.ai works as a bring your own key model, so you need to provide your LLM API key (OpenAI, Google, Anthropic, Deepseek) in your MCP requests.
You have two options how you can add your LLM API key:
Option 1: Save your LLM key in your account (recommended)
The easiest way to connect to your LLM provider is to save your LLM API key in your Florentine.ai dashboard.
- Add your API key
- Select your LLM provider (OpenAI, Deepseek, Google or Anthropic)
- Click Save

Option 2: Provide your LLM key inside the MCP server config env variables
If you prefer not to store the key in your Florentine.ai account or want to use multiple LLM keys, you can pass the key inside the MCP server config:
"env": {
"LLM_SERVICE": "<YOUR_LLM_SERVICE>",
"LLM_KEY": "<YOUR_LLM_API_KEY>"
}
| Parameter | Description | Allowed Values |
|---|
LLM_SERVICE | Specifies the LLM provider to use. | openai,google,anthropic or deepseek |
LLM_KEY | Your API key for the provided LLM service. | A valid API key string |
Note: If you provide a LLM_KEY inside the env variables of the MCP server config, it will override any key stored in your account.
Integration Modes
You will have to set the operating mode in the args array of your MCP Server config to either static or dynamic:
"args": [
"-y",
"@florentine-ai/mcp",
"--mode",
"static"
]
Static Mode
The static mode should be used if you integrate Florentine.ai into an existing external MCP client such as a MCP-ready Desktop App like Claude Desktop or Dive AI.
In static mode you set all parameters (such as Return Types, Required Inputs, etc.) as env variables inside the config json. This means that these parameters will remain static until you change the setup config and will be sent with every request to Florentine.ai. See the following example:
{
"mcpServers": {
"florentine": {
"command": "npx",
"args": ["-y", "@florentine-ai/mcp", "--mode", "static"],
"env": {
"FLORENTINE_TOKEN": "<FLORENTINE_API_KEY>",
"SESSION_ID": "6f7d62f9-8ceb-456b-b7ef-6bd869c3b13a",
"LLM_SERVICE": "openai",
"LLM_KEY": "<YOUR_OPENAI_KEY>",
"RETURN_TYPES": "[\"result\"]",
"REQUIRED_INPUTS": "[{\"keyPath\":\"accountId\",\"value\":\"507f1f77bcf86cd799439011\"}]"
}
}
}
}
Environment variables
| Variable | Required | Type | Description |
|---|
FLORENTINE_TOKEN | Yes | String | Your Florentine.ai api key, copy it from dashboard. |
SESSION_ID | No | String | The session id of the client. Used for server-side chat history. See Sessions section. |
LLM_SERVICE | No | String | Specifies the LLM provider to use. Only needed if you did not save the LLM key in your Florentine.ai account. See Connect your LLM account section. |
LLM_KEY | No | String | Your API key for the provided LLM service. Only needed if you did not save the LLM key in your Florentine.ai account. See Connect your LLM account section. |
RETURN_TYPES | No | Stringified JSON | The return types for florentine_ask tool calls. See Return Types section. |
REQUIRED_INPUTS | No | Stringified JSON | The required inputs. See Required Inputs section. |
Dynamic Mode
The dynamic mode should be used if you integrate Florentine.ai into your own custom MCP client.
In dynamic mode you can pass all parameters (such as Return Types, Required Inputs, etc.) directly to the florentine_ask tool. This means you can dynamically inject individual parameters to every request forwarded to Florentine.ai (i.e. a user id).