SPIP SQL MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SPIP SQL MCP ServerShow me the schema of the Invoices table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🗄️ SPIP System - SQL Server Model Context Protocol (MCP) Server
Part of the SPIP (Smart Procurement & Invoice Processing) Ecosystem.
A production-ready Model Context Protocol (MCP) Server for Microsoft SQL Server built with Node.js and TypeScript. This server exposes 5 read-only database tools to AI Agents (execute_select, list_tables, describe_table, get_relationships, get_database_info) while enforcing database kernel-level Row-Level Security (RLS) using atomic SQL batch execution.
✨ Key Features
Model Context Protocol (MCP) Compliance: Standard SSE transport and direct HTTP tool execution APIs using
@modelcontextprotocol/sdk.Atomic Session Context & Row-Level Security (RLS): Combines
sp_set_session_contextwithSELECTqueries in a single atomic SQL batch execution, guaranteeing same-connection RLS isolation for multi-tenant users.AST SQL Query Validation: Restricts query execution strictly to read-only
SELECTstatements, blockingINSERT,UPDATE,DELETE,DROP, or DDL operations.5 Built-In Tools:
execute_select: Runs validated SELECT queries with dynamic RLS user context (userId).list_tables: Returns all database table names and schemas.describe_table: Returns column names, data types, primary keys, and nullability for a table.get_relationships: Returns foreign key relationships between database tables.get_database_info: Returns database version and metadata overview.
Related MCP server: Microsoft SQL Server MCP Server
🛠️ Tech Stack
Runtime: Node.js v20+ / v22+
Language: TypeScript
Framework: Express.js
SDK:
@modelcontextprotocol/sdkDatabase Driver:
node-mssql(Microsoft SQL Server 2019/2022)
🚀 Quick Start (Without Docker)
1. Installation
git clone https://github.com/MahmoudNour2003/spip-sql-mcp-server.git
cd spip-sql-mcp-server
npm install2. Environment Setup (.env)
Create a .env file in the project root:
MCP_PORT=3001
DB_HOST=127.0.0.1
DB_PORT=1433
DB_NAME=SPIP_DB
DB_USER=AI_CHAT
DB_PASSWORD=AI@123
DB_ENCRYPT=false
DB_TRUST_SERVER_CERT=true3. Build & Run
# Build TypeScript to JavaScript
npm run build
# Start the MCP Server
node dist/server.js🧪 Testing & Verification
Run the built-in standalone test suite:
node dist/standalone-test.jsExpected Output:
✅ Successfully connected to SQL Server (SPIP_DB)!
Tables count: 41🔒 Row-Level Security (RLS) Execution Details
When execute_select is called with a userId parameter (e.g. userId = 5), the MCP Server executes the following atomic batch query:
EXEC sp_set_session_context @key = N'UserId', @value = 5;
SELECT TOP 1000 Id, InvoiceNumber, TotalAmount, Status FROM dbo.Invoices ORDER BY InvoiceDate DESC;SQL Server Security Policies (Security.InvoiceSecurityPolicy) intercept the query and return only the rows belonging to User 5.
📄 License
MIT License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
- dataOAuthco.thinair
Read-only PostgreSQL, MySQL, SQL Server access via MCP — 24 dialect-aware hosted tools.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides read-only access to Microsoft SQL Server databases using Windows Authentication, enabling AI assistants to safely explore schemas and query data with built-in security controls.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to connect and query Microsoft SQL Server databases using natural language, executing read-only SQL queries for safe data inspection and analysis.MIT
- FlicenseNot gradedqualityDmaintenanceEnables secure interaction with Microsoft SQL Server databases, allowing schema exploration, metadata retrieval, and read-only query execution through natural language.1-
- AlicenseNot gradedqualityBmaintenanceProvides read-only access to databases for MCP-compatible AI tools, allowing schema exploration and SELECT queries without exposing credentials or risking data changes.833MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/MahmoudNour2003/spip-sql-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server