OData Managed MCP Server
Connect agents to an OData service, such as SAP Gateway, so they can query its records and read its files as text. The server gives each entity set you choose a few tools, named after the set.
After reading this page, you will be able to:
-
Configure the OData managed MCP server against an OData v2 or v4 service
-
Configure which entity sets and operations the server exposes as tools
-
Enable agents to read an OData service’s files as text
|
The OData managed MCP server is in Preview. If you don’t see OData in the catalog, contact Redpanda Support. |
What this MCP server does
The OData managed type:
-
Reads the service’s
$metadatadocument, from the service root, from another URL, or from XML that you paste. -
Works with OData v2 and OData v4. It detects the version from
$metadata. -
Generates the discovery tools
list_entity_setsanddescribe_entity_set, plus one tool per entity set for each operation that you turn on. By default, the server generates only the read-only query and get tools. -
Lets agents narrow results with OData’s query options, such as
$filterand$select, instead of calling a separate tool for each query. -
Strips OData’s record-level control metadata, such as v2
__metadatablocks, from results, and keeps the data and the paging cues, such as@odata.nextLink. -
Returns the text of files in the entity sets and properties that you list in
Document Text, where file reading is on. See Read files as text.
The tool count grows with the number of entity sets. To expose only the entity sets that agents need, use Filter. For an HTTP API that isn’t OData, use the OpenAPI managed MCP server.
Prerequisites
-
An OData v2 or v4 service and its service root URL, as the OData documentation defines it. Redpanda Agentic Data Plane refuses a service URL on a cloud metadata, link-local, IPv6 unique local, or cluster-local host.
-
For
Bearer,API Key, orBasicauthentication, the service’s credential stored in the Agentic Data Plane secret store. See Manage Secrets. -
For
User OAuth, an OAuth provider for the service. See Configure User-Delegated OAuth.
Configure
-
Open MCP servers in the sidebar.
-
Click Add MCP server.
-
Click the OData card in the catalog.
-
Replace the suggested
Name, and optionally add aDescription. -
In the OData configuration form:
-
Service URL: The service root, such ashttps://sap.example.com/odata/PurchaseOrders. Agentic Data Plane reads$metadatafrom this URL unless you setMetadata URLorMetadata Content. -
Metadata URL(optional): The URL to read$metadatafrom, when the service doesn’t serve it at<service-url>/$metadata. -
Metadata Content(optional): The$metadataXML, up to 3 MiB, pasted or loaded from a file. Set at most one ofMetadata URLandMetadata Content. -
Version(optional): The OData version,V2orV4. Leave it unset, and the server detects the version from$metadata. -
Filter(optional): Glob patterns, matched against entity set names, inInclude Entity SetsorExclude Entity Sets. -
Operations(optional): The tools to generate for each entity set. When you turn none on, the server generates the query and get tools. -
Name Overrides(optional): A fixed tool-name prefix for an entity set, so its tool names stay the same when$metadatachanges. The server writes the prefix in lowercase snake case. -
Default Page Size(optional): The most records a query returns when the agent doesn’t settop. The default is 50. Keep it at or belowMax Page Size. -
Max Page Size(optional): The most records a query can return. The server lowers a largertopto this value. The default is 500. -
Enable Csrf(optional): Whether the server fetches a cross-site request forgery (CSRF) token and a session cookie before each write. The server sends both with each create, update, or delete. Turn it on for a service that uses theX-CSRF-Token: Fetchhandshake on writes.
-
-
Configure authentication. See Authentication.
-
Optionally, in
TLS, add the certificate authority (CA) certificate for a service that uses a private or self-signed certificate. -
Optionally, in
Document Text, list where the service keeps files for agents to read as text. See Read files as text. -
Click Create server.
Configure from the CLI
Use rpk ai to create the server with a managed configuration. This example connects with Basic authentication as a technical user, with the password stored in the secret store as ODATA_PASSWORD:
rpk ai mcp-server create purchase-orders \
--enabled \
--managed.config '{
"@type": "type.googleapis.com/redpanda.mcps.odata.v1.ODataMCPConfig",
"serviceUrl": "https://sap.example.com/odata/PurchaseOrders",
"basic": {
"username": "TECHUSER",
"passwordSecretRef": "ODATA_PASSWORD"
}
}'
Authentication
The server applies one authentication mode to its requests to the service, including the $metadata fetch:
| Mode | Use when |
|---|---|
|
The service needs no credentials. |
|
The service expects a bearer token. The server always sends it as |
|
The service expects a key in a header or query parameter. Choose the placement and the parameter name. |
|
The service expects a username and password, such as the credentials of a technical user. |
|
The service supports OAuth on behalf of users and you want each caller’s own identity. See Configure User-Delegated OAuth. |
With User OAuth, paste the $metadata document into Metadata Content, or set a Metadata URL that the service serves without a user’s token. The server fetches $metadata when Agentic Data Plane builds it, which can happen on a request that carries no user token.
The server can’t sign in with Kerberos, because it can’t take part in Kerberos single sign-on on a user’s behalf. For a service that uses Kerberos and also accepts another method, use Basic with a technical user, or User OAuth.
Test
-
Open the Inspector tab.
-
Run
list_entity_sets. It lists each entity set the server exposes, with its key fields and the prefix of its tool names. -
Run
describe_entity_setwith the name of an entity set. It returns the set’s properties with their types, its key fields, and the navigation properties thatexpandcan follow. -
Run a query tool, such as
purchase_order_set_query, withtopset to5. It returns up to five records.
See Test an MCP Server’s Tools with the Inspector for general Inspector usage.
Use with agents
After the server generates its tools, point an agent at the Server URL on the server’s Connection tab. To attach the server to a managed agent, add it in the agent’s Tools section. See Tools.
The server names each data tool <prefix>_<operation>. The prefix is the entity set’s name in snake case. The server drops a leading single letter A, C, E, I, or P that stands as its own word, such as the A in A_PurchaseOrder. For example, A_PurchaseOrder gives purchase_order_query, and PurchaseOrderSet gives purchase_order_set_query. To see each prefix exactly, run list_entity_sets.
| Operation | Tool inputs | What it does |
|---|---|---|
Query |
|
Lists records. The inputs map to OData’s |
Get |
The key fields, |
Reads one record by its key. |
Count |
|
Counts the records that match a filter. |
Create |
|
Creates a record. The |
Update |
The key fields, |
Changes the fields in |
Delete |
The key fields |
Deletes one record. |
A tool offers expand only when the entity type has navigation properties. An entity set without a key gets no get, update, or delete tool. Each tool returns the HTTP status and the service’s response. A 4xx or 5xx response is a tool error that carries the service’s error body.
Create, update, and delete change data in the service. Turn them on only on servers whose agents need to change data, and control which callers can use them with access policies. See Deny one tool on an MCP server.
Read files as text
An OData service keeps a file in one of these places, and $metadata says which:
-
A media entity: The entity type declares
HasStream. Each record holds the file’s details, such as its name, and the file itself sits at the record’s$valueaddress. -
An
Edm.Binaryproperty: The file travels as base64 inside the record. -
An
Edm.Streamproperty (OData v4 only): The file sits at the property’s own address.
The query and get tools return a record’s fields. They never return a media entity’s file or a stream property’s file. Where file reading is off, they return an Edm.Binary file only as base64, which an agent can’t read.
The Document Text setting
To let agents read these files, list them in Document Text:
-
Entity Sets: Each media entity set, by its name exactly as$metadatawrites it, such asAttachmentSet. -
Properties: EachEdm.BinaryorEdm.Streamproperty, written as<entity-set>/<property>, such asPurchaseOrderSet/PrintoutPdf.
Entries aren’t patterns. A pattern could catch a binary property that isn’t a document, such as a hash or a thumbnail.
When you paste $metadata into Metadata Content, Agentic Data Plane checks each entry when you save. It refuses an entry that $metadata doesn’t define or that Filter excludes. It also refuses an entity set that doesn’t declare HasStream, and a property that isn’t Edm.Binary or Edm.Stream. An entity set without a key, or with a key field named pages, offset, max_chars, or property, can’t have a file_text tool either. With $metadata read from a URL, it can’t check the entries when you save, and the server skips an entry that doesn’t fit.
The file_text tool
Each entity set that you list, or that holds a listed property, gets one more tool, <prefix>_file_text. It takes the record’s key fields and returns the text of the record’s file, not the file itself.
An entity set can have more than one listed file, such as its media resource and a stream property. Then the tool also takes property to choose one. Leave property out to read the media resource. If you haven’t listed the media resource, the tool requires property.
The tool also takes pages, offset, and max_chars to read part of a long file. It returns status_code and document, with the same document fields as the OpenAPI server, such as text, truncated, and page_count. See How Agents Read Files for the formats the tool reads, what each returns, and how to read a long file in parts.
The tool always builds the file’s address from Service URL and the record’s key. It never follows a media link that the record itself names, which could point at another host.
The tool returns an error when the record has no file or a key field is missing. A 4xx or 5xx response from the service is also an error. The tool reads a response of up to 10 MiB. Base64 makes a file about a third larger, so a file sent as Edm.Binary can be up to about 7.5 MiB.
Binary values in results
Where file reading is on, the server replaces each long Edm.Binary value in query, get, create, and update results with a short note. For example, the server shows PrintoutPdf as binary value of 2180 bytes, not shown; read its text with purchase_order_set_file_text. Short values, such as hashes, stay as they are. The server also hides the long value of a binary property that you haven’t listed. To let agents read it, list it in Properties. Binary values inside complex-typed or collection properties stay as they are.
With Create or Update on, an agent can copy a record from a query result, note included, into a create or update body. The server then sends the note as the property’s value.
|
Policies and availability
Access policies and data policies that name a file_text tool cover the text it returns. A grant on the whole server covers the file_text tools too. A data policy that shapes the result names fields under document, such as $.document.text.
Before you list an entry in Document Text, give the entity set’s file_text tool the same policies as its query and get tools. A policy written for a query or get tool doesn’t cover the file_text tool. For example, a policy that denies purchase_order_set_get still lets an agent read PrintoutPdf through purchase_order_set_file_text. See Deny one tool on an MCP server and Shape Tool Data with Data Policies.
File reading might not be on in your environment. To turn it on for your environment, contact Redpanda Support. Where it’s off, the server generates no file_text tools, and results keep their binary values.
When file reading turns on or off, binary values in results change right away. The file_text tools appear or go away when Agentic Data Plane rebuilds the server, usually within 10 minutes. After file reading turns off, the file_text tools refuse calls until the rebuild, and tell the agent not to retry.
Troubleshooting
| Symptom | What to check |
|---|---|
The server fails to start with an HTTP 401 or 403 from |
The server fetches |
The server fails to start, or a tool returns an error, with |
The service redirects the request to another host. The server follows a redirect only to the same scheme, host, and port. That way, it never sends credentials to another host. Set |
Tool names look shortened, or change after a |
The server drops a leading single letter A, C, E, I, or P that stands as its own word. It shortens a name only when the name would be too long or when two names collide. Run |
Writes fail with a CSRF token error while |
Turn on |
Writes fail with |
You turned on |
A result shows |
The value is a file or other binary data. To let agents read a file’s text, list the property in |
A |
The record’s property is empty, or the record has no media resource. Check the record in the service. |
No |
File reading might be off in your environment. If file reading turned on recently, the tools appear when Agentic Data Plane rebuilds the server, usually within 10 minutes. |
A |
With |
Limitations
-
Functions and actions: The server doesn’t expose OData function imports, actions, or action imports. To call one, use the OpenAPI managed MCP server with an OpenAPI spec for the service.
-
Inherited entity types: The server doesn’t follow an entity type’s base type. Keys and
HasStreamdeclared only on a base type don’t apply to the derived type. -
One service per server: Each server connects to one OData service. Create a server for each one.
-
No Kerberos: The server can’t sign in with Kerberos. See Authentication.