MCP for DataLong read

MCP Resources vs MCP Tools for Data Exposure

A practical guide to deciding what the model fetches versus receives.

· 8 min read
Cover illustration for “MCP Resources vs MCP Tools for Data Exposure”
MCP for Data · October 23, 2026 · 8 min read · 1,837 words

For API-first and agent-first teams, a headless analytics backend should separate governed metric definitions from permissioned query execution, without requiring a prebuilt dashboard UI. Resources provide application-controlled context, while Tools give the model callable operations. Choosing between them determines who decides when data is accessed, making that choice central to safe, predictable agent behavior.

The control boundary MCP encodes between Resources and Tools

MCP’s official specification describes Resources as “application-controlled” and Tools as “model-controlled.” The application decides how and when Resource content enters the model’s context, while the model decides when to invoke an available Tool. The specification directs server authors who want model-controlled access to use a primitive such as Tools.

Resources are identified by URIs and expose read-only content, which can be text or binary. Clients discover and retrieve that content through resources/list and resources/read. Resources have no execution semantics of their own. Tools, by contrast, are callable functions with structured parameters, whose schemas the model reads at runtime. The developer exposes a capability, but does not pre-wire every call the model will make.

The distinction therefore cannot be reduced to GET versus POST, or even reading versus writing. A function named get_security_policy() may only fetch text, yet exposing it as a Tool makes retrieval an action the model drives. A schema file preloaded by the application is Resource-like context even when its underlying transport is HTTP GET. Read-only does not mean application-controlled.

Why most MCP servers ignore Resources and what that costs them

Treating every useful server capability as a callable function obscures this distinction. API documentation, for example, may reach an agent through get_api_docs() even when the application already knows the task requires those documents. The function returns information rather than changing a record, which can make the choice appear harmless. But the choice delegates a decision unnecessarily. The model must now choose whether and when to load context that the application could have supplied.

That delegation also expands the review surface. Every Tool is a potential execution path for architecture, IAM, and compliance teams to assess. A Resource still needs access controls, but because it has no execution semantics, reviewers need not assess side effects. Resources usually pass security review faster than Tools as a result. Packaging background documentation as an operation creates approval work without adding a capability the task requires.

The same design adds reasoning work for the agent. It must consider a context-fetching function among the operations it can invoke, rather than simply reason from context already selected for it. This is an avoidable burden on the model. Informational retrieval and destructive operations need not compete within the same action-selection process. The cost is that an unnecessary Tool grants authority and demands scrutiny beyond what a Resource would require.

What goes wrong when the model controls access to data it should only receive

Tool poisoning exploits the descriptions a model reads to understand its available operations. A malicious or compromised server can embed instructions in a description that redirect the agent’s behavior. The documented search_files example places hidden instructions to exfiltrate credentials inside what appears to be information about a search capability. The description becomes an instruction channel for the attacker. Adding Tools the model does not need gives it more places to read this potentially hostile material as it decides what to do.

A reporting agent may need to read customer records and produce output, but it should have no right to delete records or change billing settings for that task. The problem persists even without a poisoned description. When agents process customer data and chain actions across environments with little per-step human oversight, excessive permissions leave decisions to the model that should have been settled by the application’s access policy.

Resources do not eliminate the need for security controls. Read-only content can reveal internal documentation, accidentally embedded secrets, infrastructure details, customer data, or compliance records. MCP’s security guidance calls for validating resource URIs, enforcing access controls, sanitizing file paths against directory traversal, and auditing access. Read-only is not the same as harmless. Governance therefore requires both a sound choice of primitive and a least-privilege policy governing the content or operations exposed through it.

A decision framework for classifying data as a Resource or a Tool

If the host application or user should choose when information enters context, the data belongs on the Resource side of the boundary. Static or semi-static material is a good fit when it is useful without real-time computation or filtering. Typical examples include database schemas, API documentation, product catalogs, and configuration files. Business metric definitions also fit this pattern because they explain how to reason about a measure.

A Tool can provide the required action path when useful delivery requires model-selected parameters, live fetching, or computation, such as choosing a filter or requesting the current state of an account. Executing SQL against live tables also belongs here. Creating or updating records plainly requires execution authority, while a fetch adjacent to side-effecting operations needs equally deliberate scoping. Even with dynamic data, the application must decide whether to let the model make that choice.

A Tool designation does not justify unrestricted access. It establishes that the model needs an operation, after which the operation’s permissions must match the task. Likewise, a Resource designation does not make its contents public or remove the need for URI validation. Classification and authorization answer different questions. The first assigns control over access, while the second limits what that access can reveal or change.

A CRM or database server illustrates the hybrid pattern. Table schemas appear as Resources so the application can provide the structure the model needs to write correct queries. Query execution appears as a Tool because the model must supply parameters for a particular request.

How the Resource/Tool split applies in a Supabase and Postgres MCP setup

The Supabase MCP server exposes Tools across eight feature groups, namely Account, Database, Debugging, Development, Functions, Branching, Docs, and Storage. Its hosted setup uses OAuth 2.1 with automatic token refresh, requiring neither local binaries nor hardcoded credentials. That breadth makes scoping an explicit architectural decision. Authentication establishes access to the server, but the set of available capabilities determines what an agent can attempt. Teams should therefore examine defaults and mirror the server’s deliberate scoping choices.

The Postgres MCP server and the Supabase server make different choices about SQL execution. The former uses a query Tool scoped to read-only transactions, while the latter exposes execute_sql, which supports reads and writes. Those are different delegations of authority despite both being query interfaces. The Postgres option is the appropriate choice when read-only safety is the priority and migrations or logs are not needed. When agents need to do more, teams must look more closely at the permissions they get through the Supabase connection.

The Supabase server provides controls for that purpose. Its read_only flag demotes the agent to a read-only Postgres user, project_ref pins access to a single project, and feature-group selection restricts the exposed capabilities. These settings belong in the connection URL for the remote hosted server or in CLI flags for the local stdio server. For analytics agents, the corresponding design is schema definitions as Resources or equivalent preloaded context, with query execution exposed as a Tool using read_only=true.

Why observability of MCP access patterns is not optional once agents are in the loop

Missing traces are a primary debugging blocker in MCP-based architectures. A server’s declared Resources and Tools show intended access, but they do not show which paths agents actually use under load. That gap can conceal both operational failures and unnecessary delegation. Teams should log every MCP request’s method, context size, duration, and Supabase latency to a separate observability sink. These fields make the request path available for inspection rather than leaving teams to infer it from an agent’s final answer.

The Supabase observability interfaces provide supporting signals without changing the control boundary itself. Logs are queryable with SQL through MCP, the Management API, or Explorer, while the Metrics API exposes database metrics in a monitoring-compatible format. Live Postgres statistics and security and performance advisors are also accessible through MCP. Request traces and database signals together show teams where an access path is slow or whether it exceeds its intended scope.

Audit logging has a more specific governance role. If an agent repeatedly invokes a Tool for information that an application-controlled Resource could have supplied, the audit trail exposes that design mismatch. Without the trail, over-permissive access patterns can accumulate silently. Permissions describe what an agent is allowed to do, while observed access patterns show whether that permission remains appropriate for the work.

A correctly classified interface does not prove that every later use of it remains appropriate, particularly when agents chain operations across environments. Design-time intent is only the starting point.

What analytics backend gives Supabase teams raw API access and governed business metrics?

A governed, headless data layer fits teams that need API control without an opinionated analytics frontend. It keeps stable metric definitions separate from scoped query execution so applications and agents can use the same approved data. Definitions enter as application-controlled context, and Tools run permitted requests against governed datasets. A dashboard becomes one possible consumer rather than the required route to the analytics backend.

If agents write ad-hoc SQL against live tables, different runs can use different interpretations of ARR, churn, or CAC. Defining the ARR formula, churn logic, and CAC calculation once gives the application stable context to supply. The definition no longer depends on each query. Query permissions can then limit what the agent runs to pre-approved metrics, reports, or fields, so it has no need to invent business logic from raw tables.

The same principle applies when marketing data spans platforms with different naming conventions. Direct queries to each source can produce inconsistent results because the sources have not been reconciled into one governed model. A layer that unifies and pre-models the data gives the MCP server a normalized dataset to query. Governance precedes the agent’s request in this design. Data teams configure what the server exposes, so structured MCP access serves approved definitions and data rather than treating the protocol itself as a substitute for governance.

For Supabase teams, pre-calculated metrics in governed Parquet datasets queryable through DuckDB provide a concrete implementation. The MCP server becomes the access layer, and agents query those datasets without touching production Postgres directly. Resources give the model definitions, and scoped Tools run its requests. Dataset permissions and server configuration enforce the separation that the primitives express. This arrangement provides fast, accurate, cheap-to-query context without assigning analytics agents direct authority over the production database.

The product principle is the same as a headless CMS applied to analytics. Human dashboards, AI agents, and Slack reports can draw from the same governed layer. No prebuilt dashboard UI is required by that architecture. For teams adding usage analytics to an agent, the relevant backend criteria are API access, reusable definitions, governed datasets, and permissioned execution, independent of whether the platform dictates how the results must be displayed.

Sources

  1. MCP-DPT: A Defense-Placement Taxonomy and Coverage Analysis for Model Context Protocol Security
  2. Resources
Filed underMCP for Data

More in MCP for Data