Skip to main content
Glama

InterSystems IRIS MCP Server

import logging import mcp.types as types from mcp_server_iris.mcpserver import MCPServer, Context def init(server: MCPServer, logger: logging.Logger) -> None: """Initialize the SQL server with a tool to execute SQL queries.""" logger.info("Initializing SQL tool for InterSystems IRIS MCP Server") @server.tool(description="Execute an SQL query on the Server") async def execute_sql( query: str, ctx: Context, params: list[str] = [] ) -> list[types.TextContent]: # params = arguments.get("params", []) logger.info(f"Executing SQL query: {query}") conn = ctx.db with conn.cursor() as cursor: cursor.execute(query, params) # limit by 100 rows rows = cursor.fetchall()[:100] return [types.TextContent(type="text", text=str(rows))]

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caretdev/mcp-server-iris'

If you have feedback or need assistance with the MCP directory API, please join our Discord server