MCP Server for Natural Language Business Data Analytics

ramp · Finance · 2025 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Financial data analytics and business intelligence

Ramp wanted a natural-language analytics interface over business spend data without forcing users to learn API endpoints, dashboards, or SQL, while still handling large financial datasets safely and reliably.

Constraints:

Architecture

Ramp built an open-source MCP server with FastMCP that exposes Ramp developer API data as tools for Claude Desktop. The architecture evolved from direct API tools into a local SQL-oriented pipeline: load tools pull Ramp API data, process_data flattens and loads it into in-memory SQLite, execute_query runs SQL over the local table, and an OLAP-powered API handles reporting-scale extracts. Audit logging and constrained OAuth scopes bound the MCP client's access.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  Claude["Claude Desktop"] --> Server["Ramp MCP server"]
  Server --> API["Ramp developer API"]
  Server --> SQLite["In-memory SQLite database"]
  Server --> OLAP["OLAP-powered API"]
  Server --> Audit["Audit logging"]
  Server --> Scopes["OAuth scope controls"]
  Audit --> Scopes
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Claude Desktop MCP client and LLM interface that receives user questions, invokes MCP tools, and generates analyses or visualizations. Ramp MCP server
Ramp MCP server FastMCP server exposing Ramp data-access, processing, and query operations as tools. Claude Desktop, Ramp developer API, In-memory SQLite database, OLAP-powered API, Audit logging, OAuth scope controls
Ramp developer API REST source for Ramp resources and spend data. Ramp MCP server
In-memory SQLite database Local relational store populated from API data so SQL can perform aggregate and window operations. Ramp MCP server
OLAP-powered API Reporting-optimized backend used when complex or high-volume extracts would otherwise time out. Ramp MCP server
Audit logging Security visibility layer for MCP access to developer API data. Ramp MCP server, OAuth scope controls
OAuth scope controls Least-privilege access boundary limiting which scopes and tools the MCP client can use. Ramp MCP server, Audit logging

Data flow

Claude connects through an MCP client to Ramp's FastMCP server. The server calls Ramp developer APIs through load tools, transforms REST JSON into SQL rows with inferred types, stores the result in an in-memory SQLite database, and exposes execute_query so Claude can generate SQL instead of loading all raw events into context. For heavier reporting data, the MCP server can call an OLAP-powered API optimized by Ramp's data platform team.

3 supporting quotes
“We built a Ramp MCP server that lets you interact with your business data using natural language—by turning our developer API into a SQL interface that an LLM can query.”article, stated
“In order to implement a SQL interface to analyze our API data, we built a lightweight in-memory ETL that pulls data from our APIs, transforms it, and loads it into an in-memory SQLite database.”article, stated
“To expose all of this functionality to the LLM, we defined a few different tools:”article, stated

Why this architecture

The SQL-centered design matched LLM strengths better than direct mathematical reasoning over raw API payloads. Keeping data local in SQLite reduced context and token pressure, while OLAP integration handled reporting-scale timeouts and OAuth/audit controls addressed financial-data risk.

3 supporting quotes
“That sounded like SQL: structured, predictable, and built for querying. Most importantly, Claude could now load as little raw data into its context window as possible, making the server do most of the heavy computational lifting.”article, stated
“LLMs are significantly better at SQL than at math, which is why this set of tools made sense for our RESTful API to expose relational spend data effectively.”article, stated
“As a solve, we added an interface to an OLAP-powered API built by our data platform team. This allowed us to extract spend data which was specifically optimized for reporting use cases, solving the timeouts.”article, stated

Models used: Claude Desktop · LLMs with SQL generation capability

Scale

Alternatives considered (roads not taken)

Expose Ramp API endpoints directly as MCP tools

Rejected because: Direct API payloads worked for a small demo but caused math errors, context pressure, token cost, and input-size limits.

“Our initial setup worked fine on a small demo business, but we quickly ran into a few scaling issues: miscalculations, limited context windows, input size limits, and high input token usage.”article, stated

Paginate raw API responses into smaller chunks

Rejected because: Pagination made responses digestible but did not scale meaningfully beyond a few hundred transactions.

“At first we hacked together a simple pagination tool to chunk responses into smaller, digestible parts, but we struggled to scale meaningfully beyond a few hundred transactions.”article, stated

Use only local SQLite for reporting-heavy workloads

Rejected because: Reporting use cases produced complex, high-volume extracts that timed out, so Ramp added an OLAP-powered API.

“Reporting use cases involve a ton of data and complex queries, often leading to timeouts. As a solve, we added an interface to an OLAP-powered API built by our data platform team.”article, stated

Release write tools immediately

Rejected because: Ramp judged write operations unreliable enough that a safety framework should come first.

“Write tools can be particularly unreliable, so we'll work on a safety framework before releasing tools that can perform actions in your business on your behalf as an agentic LLM.”article, stated

Patterns

tool-use-orchestration (tooling)

Ramp exposes load, processing, and query operations as MCP tools so Claude can orchestrate data extraction and analysis workflows.

“MCP "tools" are akin to HTTP endpoints the LLM can access through an MCP client.”article, stated
“Adding a new source of data — like a different API endpoint — was as simple as defining a new tool.”article, stated

context-engineering (context_management)

The team changed the interface so Claude could keep raw data out of its context window and ask the server/database to do heavy computation.

“Most importantly, Claude could now load as little raw data into its context window as possible, making the server do most of the heavy computational lifting.”article, stated

safety-policy-enforcement (control)

Financial-data access is bounded by audit logging, constrained OAuth scopes, least-privilege design, and delaying write tools until a safety framework exists.

“As a mitigant, we implemented audit logging and you can pick a constrained set of OAuth scopes and tools to make available to the MCP client.”article, stated
“Write tools can be particularly unreliable, so we'll work on a safety framework before releasing tools that can perform actions in your business on your behalf as an agentic LLM.”article, stated

observability-tracing (operations)

Developer API audit logs provide visibility into MCP access to sensitive business data.

“Audit logs for the Ramp developer API”article, stated
“LLMs can pull and understand large amounts of data from any source at their disposal.”article, stated

Tradeoffs

Use SQL as the LLM-facing data interface

Chose In-memory SQLite and SQL query tools over Direct REST payload analysis by the model.

Rationale: SQL let the LLM express intent while minimizing raw context and moving computation to the database.

“That sounded like SQL: structured, predictable, and built for querying.”article, stated
“It can now load as little or as much data as it needs while running aggregate or window functions to gain a better understanding of the data.”article, stated

Keep a separate process_data step

Chose Load tools plus process_data plus execute_query over Skipping transformation to reduce roundtrips.

Rationale: The explicit processing step made API data queryable as SQL, though the authors note it could be skipped to reduce roundtrips.

“A process_data tool to transform the data from the API and load into the SQLite table (we could've skipped this step to reduce roundtrips)”article, stated

Use OLAP integration for reporting workloads

Chose A reporting-optimized API from the data platform team over Only pulling raw operational API data into local SQLite.

Rationale: High-volume reporting use cases timed out, so the team reused enterprise analytics infrastructure optimized for those queries.

“This allowed us to extract spend data which was specifically optimized for reporting use cases, solving the timeouts.”article, stated

Delay agentic write operations

Chose Read/analysis use cases first over Immediate write tools that act on the business.

Rationale: The team viewed write tools as particularly unreliable and wanted a safety framework before letting the LLM perform business actions.

“Write tools can be particularly unreliable, so we'll work on a safety framework before releasing tools that can perform actions in your business on your behalf as an agentic LLM.”article, stated

Gotchas (what bit them)

Raw API payloads pushed too much data and arithmetic into the model.

Root cause: The first MCP server design treated API endpoints as the interface instead of giving the model a queryable relational abstraction.

Resolution: Ramp flattened API JSON into SQLite rows and let Claude generate SQL while the database handled aggregation.

“Our initial setup worked fine on a small demo business, but we quickly ran into a few scaling issues: miscalculations, limited context windows, input size limits, and high input token usage.”article, stated
“LLMs are significantly better at SQL than at math, which is why this set of tools made sense for our RESTful API to expose relational spend data effectively.”article, stated

Simple pagination did not create meaningful scale.

Root cause: Chunking responses still forced the model to reason over many raw transaction fragments.

Resolution: The interface moved to predictable SQL data formats with server-side computation.

“At first we hacked together a simple pagination tool to chunk responses into smaller, digestible parts, but we struggled to scale meaningfully beyond a few hundred transactions.”article, stated
“Then we asked Claude what it would prefer the data to look like, and it said it preferred predictable data formats that enabled server-side functions.”article, stated

Reporting-scale API latency became the next bottleneck.

Root cause: Large business datasets and complex reporting queries caused tool calls and extracts to time out.

Resolution: Ramp added an OLAP-powered API for reporting-optimized spend extraction and named further optimizations such as concurrency, async pulls, caching, and DuckDB.

“Reporting use cases involve a ton of data and complex queries, often leading to timeouts.”article, stated
“There are plenty of optimizations we could implement (concurrent requests, pulling data from the APIs asynchronously, smart caching, using DuckDB, etc.)”article, stated

LLM tool selection was not deterministic enough to trust without safeguards.

Root cause: Claude sometimes chose incorrect tools or used the same prompt differently across conversations.

Resolution: The implementation used audit logs, OAuth scope limits, and delayed write tools pending a safety framework.

“LLMs themselves may not always pick the correct tools, or they may use them incorrectly.”article, stated
“Claude occasionally made mistakes even when given the same prompt twice across separate conversations.”article, stated

Evaluation

Ramp tested the MCP server with Claude Desktop against spend-analysis prompts, compared behavior before and after SQL/SQLite redesign, observed scaling and timeout failures, and used repeated-prompt behavior to identify tool-selection inconsistency.

Metrics: few hundred transactions before meaningful scaling broke down · tens of thousands of spend events after SQL redesign · input token usage reduction enough to work with free Claude · API latency and timeouts on very large businesses · same-prompt inconsistency across separate conversations

3 supporting quotes
“With Claude Desktop as our MCP client, Claude was able to both generate visualizations and run simple analyses on spend data pulled from Ramp’s APIs using natural language.”article, stated
“After this move to a SQL-based paradigm, Claude went from struggling with a few hundred data points to accurately analyzing tens of thousands of spend events.”article, stated
“Claude occasionally made mistakes even when given the same prompt twice across separate conversations.”article, stated

Outcomes

The article reports movement from a few hundred transactions to tens of thousands of spend events, plus use cases involving very large businesses with enough data to make API latency and tool timeouts central constraints.

3 supporting quotes
“Our open-source ramp-mcp server can access a business context using a variety of tools, and enable natural language access to your Ramp data.”article, stated
“It can create curated views of your spend, identify potential cost savings, and help you navigate your business hierarchy — all while surfacing insights we hadn’t even considered.”article, stated
“MCP is early, with many limitations to overcome, and also a strong and growing community of engineers that can see the tip of the iceberg for how transformative this technology can be.”article, stated