Command-based MCP Server
AI-generatedOverview
This node executes MSSQL queries through a Model Context Protocol (MCP) server accessible over TCP. It is useful for workflows that need to interact with MSSQL databases via an MCP server, allowing users to run custom SQL queries and retrieve results in different formats. For example, it can be used to fetch data for reporting, data transformation, or integration with other systems.
Use Case Examples
- Run a SQL query to fetch the top 10 rows from a database table and return the results as a single JSON item containing an array of rows.
- Execute a SQL query and return each row as a separate item in the workflow for further processing.
Properties
| Name | Meaning |
|---|---|
| Result Format | Determines how the MCP response is formatted in the workflow output, either as a single JSON item containing an array of rows or as individual items per row. |
| Result Field Name | Specifies the field name that will contain the resulting row set when the result format is JSON. |
| Include Raw Response | Whether to attach the full MCP response payload to each output item. |
| SQL Query | The SQL query string to execute on the MSSQL database via the MCP server. |
Output
JSON
rows- Contains the array of rows returned from the SQL query when result format is JSON.rawResponse- Optional field containing the full MCP response payload if 'Include Raw Response' is enabled.
Dependencies
- Requires credentials for connecting to the MCP server, including host, port, MSSQL server details, database, username, and password.
Troubleshooting
- Common issues include connection failures to the MCP server due to incorrect host or port settings, authentication errors from invalid MSSQL credentials, and SQL query errors such as syntax mistakes or invalid table names.
- Error messages from the MCP server are propagated as node operation errors with details to help identify the cause, such as connection timeouts or query execution errors.