
MCP-Adonet-Server
C# -Serbasierter Modellkontext Procotol (MCP) -Server für ADO.NET ODBC -Anbieter
3 years
Works with Finder
0
Github Watches
0
Github Forks
0
Github Stars
C# based Model Context Procotol (MCP) Server for ADO.NET
A lightweight MCP (Model Context Protocol) server for ADO.NET . This server is compatible with Virtuoso DBMS and other DBMS backends that has ODBC driver.
Features
- Get Schemas: Fetch and list all schema names from the connected database.
- Get Tables: Retrieve table information for specific schemas or all schemas.
-
Describe Table: Generate a detailed description of table structures, including:
- Column names and data types
- Nullable attributes
- Primary and foreign keys
- Search Tables: Filter and retrieve tables based on name substrings.
- Execute Stored Procedures: In the case of Virtuoso, execute stored procedures and retrieve results.
-
Execute Queries:
- JSONL result format: Optimized for structured responses.
- Markdown table format: Ideal for reporting and visualization.
Prerequisites
- NET.8 or above
- Check that the project file (
MCP_AdoNet_Server.csproj
) is compatible with your environment by running:dotnet run --project /path/to/mcp-adonet-server/MCP_AdoNet_Server.csproj
- If need be, you can also attempt to rebuild
MCP_AdoNet_Server.csproj
by running:dotnet clean /path/to/mcp-adonet-server/MCP_AdoNet_Server.csproj dotnet build /path/to/mcp-adonet-server/MCP_AdoNet_Server.csproj
- unixODBC Runtime Environment Checks:
- Check installation configuration (i.e., location of key INI files) by running:
odbcinst -j
- List available data source names by running:
odbcinst -q -s
-
ODBC DSN Setup: Configure your ODBC Data Source Name (
~/.odbc.ini
) for the target database. Example for Virtuoso DBMS:[VOS] Description = OpenLink Virtuoso Driver = /path/to/virtodbcu_r.so Database = Demo Address = localhost:1111 WideAsUTF16 = Yes
Installation
Clone this repository:
git clone https://github.com/OpenLinkSoftware/mcp-adonet-server.git
cd mcp-adonet-server
Environment Variables
Update your .env
by overriding the defaults to match your preferences
ADO_URL=DSN=VOS;UID=demo;PWD=demo
API_KEY=xxx
Configuration
For Claude Desktop users:
Add the following to claude_desktop_config.json
:
{
"mcpServers": {
"my_database": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/mcp-adonet-server/MCP_AdoNet_Server.csproj"],
"env": {
"ADO_URL": "DSN=VOS;UID=demo;PWD=demo",
"API_KEY": "sk-xxx"
}
}
}
}
Usage
Tools Provided
After successful installation, the following tools will be available to MCP client applications.
Overview
name | description |
---|---|
ado_get_schemas | List database schemas accessible to connected database management system (DBMS). |
ado_get_tables | List tables associated with a selected database schema. |
ado_describe_table | Provide the description of a table associated with a designated database schema. This includes information about column names, data types, nulls handling, autoincrement, primary key, and foreign keys |
ado_filter_table_names | List tables, based on a substring pattern from the q input field, associated with a selected database schema. |
ado_query_database | Execute a SQL query and return results in JSONL format. |
ado_execute_query | Execute a SQL query and return results in JSONL format. |
ado_execute_query_md | Execute a SQL query and return results in Markdown table format. |
ado_spasql_query | Execute a SPASQL query and return results. |
ado_sparql_query | Execute a SPARQL query and return results. |
ado_virtuoso_support_ai | Interact with the Virtuoso Support Assistant/Agent -- a Virtuoso-specific feature for interacting with LLMs |
Detailed Description
-
ado_get_schemas
- Retrieve and return a list of all schema names from the connected database.
- Input parameters:
-
url
(string, optional): ADO.NET URL connection string.
-
- Returns a JSON string array of schema names.
-
ado_get_tables
- Retrieve and return a list containing information about tables in a specified schema. If no schema is provided, uses the connection's default schema.
- Input parameters:
-
schema
(string, optional): Database schema to filter tables. Defaults to connection default. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns a JSON string containing table information (e.g., TABLE_CAT, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE).
-
ado_filter_table_names
- Filters and returns information about tables whose names contain a specific substring.
- Input parameters:
-
q
(string, required): The substring to search for within table names. -
schema
(string, optional): Database schema to filter tables. Defaults to connection default. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns a JSON string containing information for matching tables.
-
ado_describe_table
- Retrieve and return detailed information about the columns of a specific table.
- Input parameters:
-
schema
(string, required): The database schema name containing the table. -
table
(string, required): The name of the table to describe. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns a JSON string describing the table's columns (e.g., COLUMN_NAME, TYPE_NAME, COLUMN_SIZE, IS_NULLABLE).
-
ado_query_database
- Execute a standard SQL query and return the results in JSON format.
- Input parameters:
-
query
(string, required): The SQL query string to execute. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns query results as a JSON string.
-
ado_query_database_md
- Execute a standard SQL query and return the results formatted as a Markdown table.
- Input parameters:
-
query
(string, required): The SQL query string to execute. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns query results as a Markdown table string.
-
ado_query_database_jsonl
- Execute a standard SQL query and return the results in JSON Lines (JSONL) format (one JSON object per line).
- Input parameters:
-
query
(string, required): The SQL query string to execute. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns query results as a JSONL string.
-
ado_spasql_query
- Execute a SPASQL (SQL/SPARQL hybrid) query return results. This is a Virtuoso-specific feature.
- Input parameters:
-
query
(string, required): The SPASQL query string. -
max_rows
(number, optional): Maximum number of rows to return. Defaults to 20. -
timeout
(number, optional): Query timeout in milliseconds. Defaults to 30000. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns the result from the underlying stored procedure call (e.g.,
Demo.demo.execute_spasql_query
).
-
ado_sparql_query
- Execute a SPARQL query and return results. This is a Virtuoso-specific feature.
- Input parameters:
-
query
(string, required): The SPARQL query string. -
format
(string, optional): Desired result format. Defaults to 'json'. -
timeout
(number, optional): Query timeout in milliseconds. Defaults to 30000. -
url
(string, optional): ADO.NET URL connection string.
-
- Returns the result from the underlying function call (e.g.,
"UB".dba."sparqlQuery"
).
-
ado_virtuoso_support_ai
- Utilizes a Virtuoso-specific AI Assistant function, passing a prompt and optional API key. This is a Virtuoso-specific feature.
- Input parameters:
-
prompt
(string, required): The prompt text for the AI function. -
api_key
(string, optional): API key for the AI service. Defaults to "none". -
url
(string, optional): ADO.NET URL connection string.
-
- Returns the result from the AI Support Assistant function call (e.g.,
DEMO.DBA.OAI_VIRTUOSO_SUPPORT_AI
).
Troubleshooting
For easy troubleshooting:
-
Install the MCP Inspector:
npm install -g @modelcontextprotocol/inspector
-
Start the inspector:
- for Windows, Linux
npx @modelcontextprotocol/inspector dotnet run --project /path/to/mcp-adonet-server/MCP_AdoNet_Server.csproj -e ADO_URL="DSN=MyDSN;UID=username;PWD=password" -e API_KEY="sk-xxx-myapikey-xxx"
- for macOS
npx @modelcontextprotocol/inspector dotnet run --project /path/to/mcp-adonet-server/MCP_AdoNet_Server.csproj -e DYLD_LIBRARY_PATH=/opt/homebrew/lib -e ADO_URL="DSN=MyDSN;UID=username;PWD=password" -e API_KEY="sk-xxx-myapikey-xxx"
Access the provided URL to troubleshoot server interactions.
相关推荐
🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.
⛓️Rugele ist ein leichter, leistungsstarker, leistungsstarker, eingebetteter Komponenten-Orchestrierungsregel-Motor-Rahmen für GO.
🧑🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.
PDF wissenschaftliche Papierübersetzung mit erhaltenen Formaten - 基于 ai 完整保留排版的 pdf 文档全文双语翻译 , 支持 支持 支持 支持 google/deeptl/ollama/openai 等服务 提供 cli/gui/mcp/docker/zotero
Fair-Code-Workflow-Automatisierungsplattform mit nativen KI-Funktionen. Kombinieren Sie visuelles Gebäude mit benutzerdefiniertem Code, SelbstHost oder Cloud, 400+ Integrationen.
Erstellen Sie einfach LLM -Tools und -Argarten mit einfachen Bash/JavaScript/Python -Funktionen.
😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / diskord / telegram / slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Diffy 、 Claude 、 Gemini 、 xai 、 ppio 、 、 ulama 、 lm Studio 、阿里云百炼、火山方舟、 siliconflow 、 qwen 、 mondshot 、 chatglm 、 sillytraven 、 mcp 等 llm 的机器人 / agent | LLM-basierte Instant Messaging Bots-Plattform, unterstützt Zwietracht, Telegramm, Wechat, Lark, Dingtalk, QQ, Slack
Reviews

user_OcvpWL8C
As a dedicated user of mcp-adonet-server by OpenLinkSoftware, I am extremely satisfied with its robust performance. It seamlessly integrates ADO.NET with our applications, enhancing data management efficiency. The user-friendly interface and comprehensive documentation make it easy to deploy and maintain. Highly recommend this for anyone needing reliable database connectivity solutions!

user_zj4b8ihq
I have been using mcp-adonet-server by OpenLinkSoftware for a while now, and it has significantly streamlined my database connectivity processes. The efficiency and reliability of this product are outstanding. It seamlessly integrates with my existing development environment, making data manipulation and retrieval faster and easier. Highly recommended for anyone looking to enhance their database operations.

user_bjOh9Tv2
As a dedicated user of mcp-adonet-server by OpenLinkSoftware, I can confidently say it is a robust and efficient solution for managing ADO.NET data connections. Its seamless integration and comprehensive support streamline database operations, making it an indispensable tool for any developer working with .NET environments. Highly recommend it!

user_OvrVZ8Lo
As a loyal user of MCP and having extensively used mcp-adonet-server, I am extremely impressed with its performance and reliability. Developed by OpenLinkSoftware, this product has seamlessly integrated into my workflow, providing robust data access and management capabilities. Its intuitive design and powerful features make it a must-have for any data-driven application. Highly recommended!

user_vIqsZ6Km
As a devoted user of the mcp-adonet-server by OpenLinkSoftware, I am thoroughly impressed with its robust performance and seamless integration capabilities. This server has significantly enhanced our database connectivity and streamlined operations. The comprehensive documentation and support provided are invaluable, making it an essential tool for any developer working with ADO.NET.

user_HafNO4bB
As a dedicated user of the mcp-adonet-server by OpenLinkSoftware, I am thoroughly impressed with its efficiency and reliability. This server has seamlessly integrated with our existing systems, enhancing our data connectivity and performance. The user-friendly interface and excellent support from OpenLinkSoftware have made our experience exceptional. Highly recommend it to anyone in need of a robust adonet server solution!

user_2T9zgkjV
As a dedicated user of mcp-adonet-server by OpenLinkSoftware, I must say I'm thoroughly impressed. This product’s performance and reliability have significantly enhanced my data management tasks. With its seamless integration and robust features, it’s become a crucial part of my workflow. I highly recommend mcp-adonet-server to anyone in need of a dependable data server solution.

user_rGfvdaw3
As a loyal user of mcp-adonet-server by OpenLinkSoftware, I highly recommend this product for anyone working with data connectivity solutions. Its seamless integration and robust performance make it an essential tool for developers. The ease of use and reliability have significantly improved my workflow. Highly impressed!

user_AmGInWi7
As a dedicated user of mcp-adonet-server by OpenLinkSoftware, I can confidently say it has revolutionized my workflow. The server's robust performance and reliability are unmatched. The seamless integration capabilities with ADO.NET make data management a breeze. Highly recommended for anyone needing a powerful and efficient server solution!