9. API, MCP and web client
SmartFBX includes a local REST API and an MCP server (Model Context Protocol) so that scripts, other tools and AI agents can query metadata, run SQL and manage named scripts on the configured connections.
- Turn them on with the API and MCP switches under the tree (or Tools > Start/stop API and MCP) and set the ports next to them. The state is saved in the settings.
- The MCP server listens on the address set in Settings > MCP listen address (default
127.0.0.1; choose0.0.0.0when the AI agent runs on another computer). The API listens on the address set in Settings (default127.0.0.1, this computer only); when you choose a network address for either of them, SmartFBX asks to set an access token, which the MCP server requires too. - Tools > API log shows every request with time, verb, path, IP, status, duration and, optionally, request and response bodies. Requests are recorded from startup, also while the window is closed (the last Max rows).
- Database > Open Web Client opens a browser page on the selected connection, served by the API, to run queries from the browser.
Both servers are off by default.
The complete list of REST endpoints is in chapter 10, the MCP tools in chapter 11 and the additional agent and interactive tools in chapter 12; every endpoint and tool is documented in detail in the REST API reference and the MCP reference.