mcp-odbc-server logo

mcp-odbc-server基于TypeScript的模式上下文协议服务器(MCP)为开放数据库连接(ODBC)提供类型脚本

(0)
Daniel Nikulshyn审阅者 Daniel Nikulshyn·更新 2026年7月

概览

mcp-odbc-server 是一个基于 TypeScript 的 Model Context Protocol(MCP)服务器,为大型语言模型(LLM)提供对 ODBC 可访问数据源的透明访问。它充当 MCP 客户端与宿主系统本地 ODBC Driver Manager 之间的桥梁,通过 node.js 路由调用。该服务器构建于 node-odbc 之上,支持多种 ODBC 连接器,示例主要针对 Virtuoso ODBC Connector。 服务器为 MCP 客户端应用程序提供多种工具,包括列出数据库模式、表和表描述的功能,以及执行 SQL 查询、SPASQL 查询和 SPARQL 查询。它以 JSON Lines(JSONL)和 Markdown 表格格式等多种格式返回结果。 要设置服务器,用户需要安装 node.js 21.1.0 或更高版本,然后使用 npm 安装 MCP 组件。服务器的配置通过在 .env 文件中设置环境变量来管理,其中包括 ODBC Data Source Name、User、Password、ODBC INI 以及 Large Language Model API Key 的绑定。 mcp-odbc-server 设计用于与不同的数据库管理系统(DBMS)配合使用,并鼓励对其他 DBMS 的代码贡献和使用演示,以便将其集成到项目中。 该服务器的核心功能包括能够与 ODBC 访问的数据源交互、支持多种查询类型,以及可扩展性以兼容不同的 ODBC 连接器和 DBMS。

主要功能

  • get_schemas:列出连接的DBMS可访问的数据库模式
  • get_tables:列出与特定数据库模式相关的表信息
  • describe_table:提供表的描述,包括列名称、数据类型和键
  • filter_table_names:根据子串模式列出表信息
  • query_database:执行SQL查询并在JSON Lines格式下返回结果
  • execute_query:执行SQL查询并在JSON Lines格式下返回结果

价格

模型
Free
评分
暂无评价

使用场景

大型语言模型数据访问

为训练、推理或数据检索任务使大型语言模型可以访问ODBC可访问的数据源

数据库集成

集成mcp-odbc-server与多种数据库管理系统和ODBC连贯器,提供统一的数据访问层

优点 & 缺点

优点

  • 为大型语言模型提供了对可通过ODBC访问的数据源的透明访问
  • 支持多种ODBC连贯器和数据库管理系统
  • 为MCP客户端应用程序提供了多种工具,包括模式和表格检索、查询执行等功能

缺点

  • 需要node.js 21.1.0或更高版本
  • 需要在环境变量中设置ODBC数据源名称、用户、密码和ODBC INI以配置服务器

评测

登录以留下评测。

暂无评测。来当第一个吧!

问答

Can I retrieve schema information before running queries?

Yes, the server exposes functions like get_schemas, get_tables, describe_table, and filter_table_names, letting clients list available schemas, tables, and their metadata before executing any SQL or SPARQL queries.

Asked by Ludovic Girard · Feb 17, 2026

What are the minimum requirements to run the mcp-odbc-server?

You need a recent Node.js runtime—version 21.1.0 or higher—plus environment variables for the ODBC Data Source Name, user credentials, and an ODBC INI configuration file. The server relies on node-odbc for driver communication.

Asked by Gustav Lindberg · Dec 12, 2025

How does the server return query results?

SQL, SPASQL, and SPARQL queries are executed through the server and the results are returned in either JSON Lines (JSONL) or a Markdown table format, depending on the client request.

Asked by Noelia Campos · Dec 11, 2025

What ODBC drivers are compatible with the mcp-odbc-server?

The server is built on node-odbc and supports any ODBC connector that works with node-odbc. Examples in the documentation focus on the Virtuoso ODBC Connector, but it can be used with other ODBC drivers that expose the required DSN, user, and password settings.

Asked by Bilal Choudhury · Nov 4, 2025

提问

服务配缩器 的替代品