sql2odata-mcp

sql2odata-mcp

An MCP server that translates SQL statements into OData v4 query syntax, supporting SELECT, INSERT, UPDATE, and DELETE operations. It enables users to convert complex SQL queries into OData-compliant requests through single or batch translation tools.

Category
Visit Server

README

sql2odata-mcp

MCP server that translates SQL statements into OData v4 query syntax.

Use this as a tool in Claude Desktop, Cursor, Windsurf, or any MCP-compatible LLM client.

Install

npm install -g sql2odata-mcp

Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "sql2odata": {
      "command": "npx",
      "args": ["-y", "sql2odata-mcp"]
    }
  }
}

Claude Code

claude mcp add sql2odata -- npx -y sql2odata-mcp

Cursor

Add to Cursor MCP settings:

{
  "mcpServers": {
    "sql2odata": {
      "command": "npx",
      "args": ["-y", "sql2odata-mcp"]
    }
  }
}

Available Tools

translate-sql

Translate a single SQL statement to OData v4.

Parameters:

  • sql (string, required) — SQL statement (SELECT, INSERT, UPDATE, DELETE)
  • encode (boolean, optional) — URL-encode the output

Example:

translate-sql({ sql: "SELECT Name, Age FROM Users WHERE Country = 'Germany' ORDER BY Name LIMIT 10" })

Returns:

GET /Users?$select=Name,Age&$filter=Country eq 'Germany'&$orderby=Name asc&$top=10

Parameters:
  $select = Name,Age
  $filter = Country eq 'Germany'
  $orderby = Name asc
  $top = 10

translate-batch

Translate multiple SQL statements at once.

Parameters:

  • queries (string[], required) — Array of SQL statements
  • encode (boolean, optional) — URL-encode the output

sql-syntax-help

Show all supported SQL syntax and their OData v4 equivalents.

Parameters: none

Available Prompts

sql-to-odata

Pre-built prompt template that translates SQL and explains the result.

Parameters:

  • sql (string) — SQL statement to translate

Supported SQL

SQL OData v4
SELECT col1, col2 $select=col1,col2
SELECT COUNT(*) $count=true
FROM Table /Table
WHERE col = 'val' $filter=col eq 'val'
WHERE LIKE '%text%' contains(col,'text')
WHERE IN ('a','b') (col eq 'a' or col eq 'b')
WHERE BETWEEN 1 AND 10 col ge 1 and col le 10
IS NULL / IS NOT NULL eq null / ne null
ORDER BY col ASC $orderby=col asc
LIMIT n / OFFSET n $top=n / $skip=n
JOIN Table ON ... $expand=Table
GROUP BY + aggregates $apply=groupby(...)
INSERT INTO ... VALUES POST + JSON body
UPDATE ... SET ... WHERE PATCH + JSON body
DELETE FROM ... WHERE DELETE

Related

License

MIT

Author

Ulrich Waldmannmoonraker@magenta.de

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured