Skip to main content
Glama

Microsoft SQL Server MCP Server (MSSQL)

import fetch from 'node-fetch'; const SERVER_URL = 'http://localhost:3333'; const MESSAGES_ENDPOINT = `${SERVER_URL}/messages`; async function main() { console.log('Sending SQL query directly to the messages endpoint...'); try { const response = await fetch(MESSAGES_ENDPOINT, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ jsonrpc: '2.0', id: '123', method: 'tools/call', params: { name: 'SQL_execute_query', parameters: { sql: 'SELECT TOP 5 name FROM sys.tables' } } }) }); const responseStatus = response.status; const responseText = await response.text(); console.log(`Response status: ${responseStatus}`); console.log(`Response text: ${responseText}`); if (responseStatus === 202) { console.log('Request accepted. Response should be delivered over SSE connection.'); } else { console.log('Unexpected response. Check server configuration.'); } } catch (err) { console.error('Error:', err.message); } } main().catch(console.error);

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/dperussina/mssql-mcp-server'

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