DataFocus · Journal
MCP or a data service API: which should an agent or application use for business data?
Use MCP when an AI agent acts for a signed-in person and must stay inside that person's permissions and approvals. Use a data service API or JDBC when a fixed application or BI tool needs the same published tables on every call.
Choose by who is asking. If the consumer is an AI agent working for a signed-in person, picking its own questions at runtime, use MCP: in DataFocus OT, the agent authorizes through OAuth, can only see the tools that person's permissions and the product version allow, and any change it proposes waits for human approval. If the consumer is an ordinary application, a scheduled job or a BI tool that runs the same request every time, use a data service API or the JDBC Service. You publish exactly the tables it needs and govern how often it calls. Many integrations need both, one for each kind of consumer.
The rest of this post explains how each route works in OT Flash and OT Heavy, and what each costs you. It ends with a decision table you can use in a design review.
Who is the consumer: an agent or an application?
Integrators tend to file these as one problem, "other systems need our data". The two consumers behave differently, though.
- An application (an ERP extension, a customer portal, a reporting job, a BI dashboard) sends requests a developer wrote ahead of time. It runs under a service identity, the shape of each call is fixed, and you can test the full set of calls before go-live.
- An agent (a coding assistant, a chat client, a business assistant) decides what to ask while it runs. It works on behalf of a particular person and may chain several calls. Its next request cannot be listed in advance.
DataFocus's agent-access guidance makes a related point: business agents need task context, identity and sources, coding agents also need drafting, confirmation, publication, error handling and recovery, and you should choose tools and permissions for each client "without granting identical write access". Fixed applications fit a fixed contract. Agents fit a contract that is negotiated per session and per user.
What does MCP access give an agent?
DataFocus describes OT's agent access as a standard MCP server over Streamable HTTP with OAuth authorization, which clients such as Claude Code can connect to directly. Through it, agents can read ontologies, resources and the graph, and run read-only queries inside an ontology. Every result comes back with the SQL that ran and a data fingerprint. Agents can also submit drafts, for control panels and other changes, which apply only after a person approves them. The product brief also lists natural-language analysis and delegating tasks to the ontology agent through MCP. OT Heavy offers MCP access as well. The detailed mechanics below come from the OT Flash r56 Agent and MCP manual.
Identity is the user's own, never shared. Authorization uses the OAuth authorization code flow with PKCE (S256). A client secret cannot replace PKCE, and usernames and passwords must not be sent to MCP. One grant covers one protected resource. MCP authorization delegates permissions the user already has: it does not elevate roles. For ontology tools, the scope is the intersection of the current user's permissions and the resources authorized in that session. This matches the direction of the MCP specification's Security Best Practices (2025 specification), which says "MCP servers MUST NOT accept any tokens that were not explicitly issued for the MCP server" and explains that token passthrough leaves downstream logs showing a different identity from the real caller.
The tool catalog depends on who is connected. Which tools exist depends on the instance's tools/list, the product version and the current account's permissions. The manual's offline catalog declares 32 ontology-side and 8 business-side input schemas, but says this does not mean all of them are enabled by default. Two users on the same server can see different tool lists. For an agent that is the point: it should not be offered a tool it is not allowed to use.
Queries are bounded. The table query tool runs one read-only Doris query inside the ontology scope. SELECT * is rejected so that registered column permissions cannot be bypassed, and results default to 100 rows with a maximum of 200. That suits an agent answering a question. It does not suit a nightly bulk extract.
There is no public endpoint to try. DataFocus publishes no hosted MCP endpoint and no live sandbox. The tool schema comes from an authenticated product instance, and the example addresses in the manuals are not product endpoints. You get the connection address and tool catalog from your own instance.
What does a data service API or JDBC Service give an application?
Both editions list data governance features that include data service APIs. The two manuals describe them in nearly the same terms.
- Data service API (Flash r57 user manual, Heavy 8.0.9 manual): publishes a table as an API other systems can call. Each API has a name of 1 to 45 characters, a group and a service status. The list shows average response time, call count and success rate. Usage governance controls call volume, and an Instruction tab explains how to call the API.
- JDBC Service: lets BI tools and programs read exposed tables through the system's JDBC gateway. Both manuals advise exposing only the tables you need and setting credentials under Admin > Interface authentication, which also manages bearer tokens.
What you get is a contract you set once. You choose the tables in advance, the consumer authenticates with a credential you issued, and you watch traffic per API. A downstream developer can test against it without any session or approval flow. The cost is that the API knows nothing about which person is behind a request, so whatever that credential can read, the application can read.
Consider a hypothetical distributor that wants its customer portal to show order status from a table already in OT. That is a data service API: one published table, one portal credential, call volume capped under Usage governance. Now suppose the same distributor's sales managers want an assistant that answers "which of my accounts slipped this quarter, and why?" That request is open-ended and should be limited to each manager's own accounts. That is MCP.
Read vs write: where approvals come in
The routes differ most on writes.
The data service API and JDBC Service, as documented, are for reading exposed tables. Neither manual describes them accepting changes.
MCP has a written path for writes, and it is deliberately layered. In Flash r56:
- Business actions live on a separate protected resource,
/mcp/business. The ontology grant cannot be reused there. - Scopes are split into discover, read, plan and execute.
dfb_action_plancreates an immutable plan and does not execute it.dfb_action_executeneeds its own explicit authorization. - At execution time the product checks again the published version, hashes, target record versions, plan expiry, idempotency and approvals. Approval tokens required from people are issued by DataFocus, and the manual states that the OAuth allowlist cannot bypass business governance.
- Business queries use a published
queryKey, not arbitrary SQL.
What an external agent can actually write is the intersection of three settings: the operation types allowed under Admin > External Agents, the exact OAuth grant, and the user's EDIT access to the resource. Admin > External Agents also holds the Agent change approvals setting, and the Heavy 8.0.9 manual describes the same tab.
So if any consumer needs to change records, prefer MCP. An approval-gated plan is a safer contract than handing an application a credential that can write.
Decision table
| Question | Lean MCP | Lean data service API / JDBC |
|---|---|---|
| Who sends the request? | An agent acting for a signed-in person | An application, job or BI tool under a service credential |
| Are requests known in advance? | No, the agent chooses at runtime | Yes, a fixed set of calls |
| Should results depend on the person? | Yes, by permission intersection | No, the same for every call |
| Volume per call | Small answers (up to 200 rows per table query) | Repeated table reads through the API or JDBC gateway |
| Writes needed? | Yes, as plans with approval | No, read-only consumption |
| Proof attached to answers | SQL and data fingerprint with results | Call count and success rate per API |
| Client behavior | Must follow OAuth PKCE and version-bound tool lists | Standard HTTP or JDBC client |
A short rule: people via agents use MCP, programs via contracts use APIs or JDBC. When both exist, give each its own route rather than letting the agent borrow the application's credential.
Trade-offs and when MCP is the wrong choice
- MCP needs more of the client. The client has to handle the OAuth flow with PKCE, protocol versions and a
tools/listthat varies by user. A legacy integration that only knows how to send a fixed HTTP request will struggle with that. - MCP is not for bulk export. The row limit and the read-only, scoped query design are set for answering questions. Use JDBC or a published API to feed a downstream system. Note also the general advice to give OT a dedicated read-only database account when it connects to your sources.
- An API credential carries no user identity. If different users must see different rows, a single service credential behind a data service API cannot provide that.
- Versions matter. DataFocus advises confirming product and client versions and configuring read/write access from your instance's tool catalog before you connect. Facts in this post come from the Flash r56 Agent manual, the Flash r57 user manual and the Heavy 8.0.9 manual. The Heavy manual refers readers to the Flash manuals for MCP details.
Next step
Read the OT Flash Agent and MCP Integration Manual for the OAuth and Business Workspace contracts, and the data service chapter of the OT Flash user manual for API and JDBC setup. The product brief summarizes what each edition offers. Both editions are free: installers and release notes are on the download page and in the GitHub repositories for OT Flash and OT Heavy.