Executive Summary: DreamFactory 7.4.5 ships the aggregate_data MCP tool — a purpose-built tool that lets AI agents compute SUM, COUNT, AVG , MIN, and MAX directly on the database server in a single call. This release also adds Cursor IDE OAuth compatibility, a desktop OAuth success page for smoother onboardin g, server-side aggregate expression support across all SQL connectors, and critical MCP daemon stability improvements including request timeout guards and global error han dlers.
Before 7.4.5, an AI agent connected to a DreamFactory MCP server that needed to answer "What is our total revenue by region?" had one option: fetch every row from the o rders table, paginate through potentially millions of records, and compute the totals itself. This was slow, token-expensive, and error-prone for large datasets. As a secu re, self-hosted enterprise data access platform that provides governed API access to any data source, connecting enterprise applications and on-prem LLMs with role-based a ccess and identity passthrough, DreamFactory is uniquely positioned to solve this — the platform already sits between the AI agent and the database, and it already speaks SQL. The missing piece was a dedicated MCP tool that pushes aggregation logic down to the database engine where it belongs.
That missing piece is now in place. The new aggregate_data tool accepts a table name, a list of aggregate functions, optional grouping columns, and an opti onal filter — and returns computed results in a single response. No pagination. No row-level data transfer. No client-side math. The database does what databases are built to do.
aggregate_data MCP ToolThe aggregate_data tool is available on every database service connected to the DreamFactory MCP server. It supports five standard SQL aggregate functions:
* for row counts)Each tool call accepts four parameters:
tableName — The table to aggregate (required)aggregates — An array of aggregate operations, each specifying a function, field, and optional alias (required)groupBy — An array of column names to group results by (optional)filter — A filter expression using the same syntax as get_table_data to narrow rows before aggregating (optional)For example, an AI agent can compute total revenue by country with a single call:
aggregate_data({
tableName: "orders",
aggregates: [
{ function: "SUM", field: "totalamount", alias: "revenue" }
],
groupBy: ["country"],
filter: "order_date >= '2025-01-01'"
})
The database computes the grouped sums and returns only the aggregated results — not the underlying rows. For a table with 10 million orders across 50 countries, this r eturns 50 rows instead of 10 million.
DreamFactory 7.4.5 also updates the MCP tool descriptions to actively steer AI agents toward aggregate_data when they need analytical answers. The ge
t_table_data tool description now explicitly states that it should not be used for aggregation. The aggregate_data description includes concrete exampl es showing the correct syntax for common analytical patterns (revenue by region, counts by category, averages by status). This guidance helps AI agents select the right to ol on the first attempt, reducing unnecessary API calls and improving response quality.
Independent of the MCP tool, DreamFactory's REST API now supports aggregate expressions directly in the fields query parameter for all SQL database connect ors. This means any API consumer — not just MCP agents — can request aggregated results:
GET /api/v2/db/_table/orders?fields=country,SUM(totalamount)&group=country
This applies to every SQL database connector in DreamFactory: MySQL, PostgreSQL, SQL Server, Oracle, Snowflake, SQLite, Firebird, IBM Db2, and others. The GROUP and FIELDS option descriptions have been updated across the API documentation to reflect this new capability.
DreamFactory 7.4.5 resolves OAuth compatibility issues that prevented Cursor IDE from connecting to DreamFactory MCP servers. The fix addresses duplicate scope keys in OAuth authorization code requests and corrects the OAuth flow for Cursor's specific client implementation. Teams using Cursor as their development environment can now connect to DreamFactory MCP servers alongside teams already using Claude Desktop.
After completing the OAuth flow in a desktop MCP client, users previously saw a blank browser tab — leaving them uncertain whether authentication succeeded. DreamFactor y 7.4.5 adds a post-redirect success page that confirms the connection was established. This is a small but meaningful improvement for the onboarding experience across Cla ude Desktop, Cursor, and any future MCP desktop clients that use browser-based OAuth.
This release includes three changes that harden the MCP daemon for production deployments where uptime matters:
MCP daemon requests to the DreamFactory backend now have explicit timeout guards. Previously, if a backend request hung (due to a slow query, network issue, or unrespon sive service), the PHP worker handling that MCP session would lock up indefinitely. With timeout guards in place, hung requests are terminated after a configurable thresho ld, freeing the worker to handle new requests and preventing cascading resource exhaustion.
The MCP daemon now includes process-level error handlers that catch unhandled exceptions before they crash the Node.js process. In previous versions, an unexpected erro r in any code path — a malformed response, a network hiccup, a race condition — could terminate the entire daemon, disconnecting all active MCP sessions. Global error hand lers ensure the daemon stays running and logs the error for investigation.
When admins define custom MCP tools that call DreamFactory-hosted services, the daemon now automatically injects the authenticated user's DreamFactory session headers i nto the outbound request. This means custom tools targeting internal DreamFactory APIs no longer require separate authentication configuration — they inherit the caller's session context, respecting the same role-based access controls that govern all other DreamFactory API access.
DreamFactory 7.4.5 fixes edge cases in how the admin UI filters visible database services for non-sysadmin users. Previously, certain database services could be incorre ctly shown or hidden depending on the user's assigned role configuration. The filtering logic now correctly evaluates all role-based service access rules, ensuring non-adm in users see exactly the services their role permits — no more, no less.
Resolved an issue where a stale OAuth redirect URL stored in the browser could cause the admin login screen to become stuck between states, rendering the UI unresponsiv e after an OAuth redirect. The admin UI now detects and cleans up stale redirect URLs, preventing the stuck-state condition.
Fixed a compatibility issue with Monolog v3 where log levels were passed as strings instead of the integer values that Monolog v3 expects. This resolves logging failure s and ensures all DreamFactory log entries are correctly recorded in environments running Monolog v3.
DreamFactory 7.4.5 is a drop-in upgrade from 7.4.4:
aggregate_data MCP tool is automatically available on all database services connected to your MCP server. No configuration changes are required.fields parameter is fully backward-compatible — existing queries are unaffected.7.4.5 and restart. For manual installations, pull the latest code and run composer install.aggregate_data MCP tool and why does it matter?The aggregate_data tool lets AI agents connected to DreamFactory's MCP server compute SUM, COUNT, AVG, MIN, and MAX directly on the database server. Before this tool, an agent answering "What is the total revenue by region?" had to fetch every row via get_table_data, paginate through the full result set, and com pute the aggregation itself. With aggregate_data, the database performs the computation and returns only the grouped results — turning a multi-call, high-late ncy operation into a single, sub-second tool call. This is particularly important for enterprise databases where tables contain millions of rows.
The aggregate_data MCP tool works with every SQL database connector in DreamFactory, including MySQL, PostgreSQL, SQL Server, Oracle, Snowflake, SQLite, Fi rebird, IBM Db2, SAP HANA, and others. The tool translates aggregate requests into the appropriate SQL syntax for each database engine. For NoSQL databases like MongoDB, a ggregation support depends on the connector's capabilities.
Yes. DreamFactory 7.4.5 resolves the OAuth compatibility issues that previously prevented Cursor from completing the MCP authentication flow. You can now connect Cursor to your DreamFactory MCP server using the same OAuth-based setup used for Claude Desktop. After authentication completes, you will see a new success confirmation page in your browser instead of the previous blank tab.
DreamFactory is a self-hosted platform providing governed API access to any data source for enterprise apps and local LLMs. It automatically generates REST APIs for dat abases — including MySQL, PostgreSQL, SQL Server, Oracle, MongoDB, Snowflake, and dozens more — and exposes them through REST, OpenAPI, and the Model Context Protocol (MCP ). DreamFactory applies role-based access controls, rate limiting, and audit logging to every API call, giving enterprises a governed data access layer between their appli cations (or AI agents) and their databases.
DreamFactory 7.4.5 adds request timeout guards that prevent PHP worker lockups when backend requests hang, global error handlers that keep the MCP daemon running throug h unexpected exceptions, and automatic auth header injection for custom tools calling DreamFactory-hosted APIs. Together, these changes make the MCP daemon significantly m ore resilient for production deployments where continuous uptime is required.
For Docker deployments, update your image tag to 7.4.5 and restart the container. For manual installations, pull the latest code and run composer ins
tall. No database migrations are required for this release. The new aggregate_data tool, Cursor IDE support, and all stability improvements are availab le immediately after upgrading.