Back to Home
Harikapudotam icon

mcp-server-cap-odata

by Harikapudotam

Overview

An MCP server for CAP OData services that translates natural language requests into JSON-RPC calls for OData CRUD operations using Google Gemini, acting as an AI gateway to enterprise data.

Installation

Run Command
node index.js

Environment Variables

  • GEMINI_API_KEY
  • GEMINI_MODEL
  • PORT

Security Notes

1. **Critical Vulnerability (`rejectUnauthorized: false`):** The `https.Agent` is configured with `rejectUnauthorized: false`. This disables SSL certificate validation for all outgoing HTTPS requests made via `axios`. In a production environment, this is a severe security risk, making the application vulnerable to Man-in-the-Middle (MITM) attacks where an attacker could intercept and potentially alter communication with the backend OData service. 2. **Functional Mismatch in OData Query Construction:** There is a discrepancy between the structured filter and sort parameters defined in `srv/rpcSchema.js` and the format expected by `srv/tools/read.js` and `srv/tools/query.js`. The tool functions appear to expect OData query string components (e.g., `filter` as a string), but `normalizeToJsonRpc` and the `RPC_SCHEMA` define these as structured objects. This functional bug will likely lead to runtime errors or incorrect query results for complex read/query operations. 3. **Good Input Validation:** The server uses `Ajv` and a well-defined `RPC_SCHEMA` for validating incoming JSON-RPC requests, and Google Gemini's structured output feature is leveraged to ensure natural language inputs are transformed into schema-compliant JSON-RPC. This is a good practice for mitigating injection risks from malformed requests.

Similar Servers

Stats

Interest Score0
Security Score6
Cost ClassMedium
Avg Tokens750
Stars0
Forks0
Last Update2025-12-08

Tags

AI GatewayODataSAP CAPJSON-RPCNatural Language ProcessingGemini