Skip to main content
Glama

mcp-sqlserver

by bilims
QUICK-START.mdβ€’3.01 kB
# MCP SQL Server - Quick Start Guide ## πŸš€ Get Started in 3 Minutes ### 1. Install ```bash npm install -g @bilims/mcp-sqlserver ``` ### 2. Configure Claude Desktop Add to `~/Library/Application Support/Claude/claude_desktop_config.json`: ```json { "mcpServers": { "sqlserver": { "command": "mcp-sqlserver", "env": { "SQLSERVER_HOST": "your-server", "SQLSERVER_USER": "your-username", "SQLSERVER_PASSWORD": "your-password", "SQLSERVER_DATABASE": "your-database" } } } } ``` ### 3. Test in Claude Desktop ``` "Test the SQL Server connection" ``` ## πŸ“‹ Essential Commands ### First Time Setup - `"Test the SQL Server connection"` - `"Show me server information"` - `"List all databases"` ### Database Discovery - `"What tables are in this database?"` - `"Describe the Users table structure"` - `"Show me foreign key relationships"` ### Data Exploration - `"Give me a sample from the Orders table"` - `"What are the largest tables?"` - `"Show me tables with the most rows"` ## πŸ”§ Common Configurations ### Azure SQL Database ```json "env": { "SQLSERVER_HOST": "myserver.database.windows.net", "SQLSERVER_ENCRYPT": "true", "SQLSERVER_TRUST_CERT": "false" } ``` ### On-Premises SQL Server ```json "env": { "SQLSERVER_HOST": "sql-server.company.com", "SQLSERVER_ENCRYPT": "true", "SQLSERVER_TRUST_CERT": "true" } ``` ### Local SQL Server Express ```json "env": { "SQLSERVER_HOST": "localhost\\SQLEXPRESS", "SQLSERVER_ENCRYPT": "false", "SQLSERVER_TRUST_CERT": "true" } ``` ## πŸ› οΈ Available Tools | Tool | Purpose | |------|---------| | `test_connection` | Test connectivity and permissions | | `list_databases` | Show all databases | | `list_tables` | Show tables in database/schema | | `describe_table` | Get table structure details | | `execute_query` | Run SELECT queries safely | | `get_foreign_keys` | Show table relationships | | `get_server_info` | Get SQL Server version info | | `get_table_stats` | Get table size and row counts | ## πŸ”’ Security Features βœ… **Read-only operations only** βœ… **SQL injection protection** βœ… **Query validation** βœ… **Encrypted connections** βœ… **Row limits enforced** ## πŸ†˜ Troubleshooting ### Connection Failed 1. Check server hostname/IP 2. Verify username/password 3. Confirm network access 4. Check firewall settings ### Permission Denied 1. Ensure user has SELECT permissions 2. Check database exists 3. Verify schema access ### Slow Queries 1. Use LIMIT in queries 2. Focus on specific tables 3. Check table sizes first ## πŸ“š More Help - **Full Documentation**: [README.md](./README.md) - **Usage Examples**: [examples/usage-examples.md](./examples/usage-examples.md) - **Installation Guide**: [INSTALL.md](./INSTALL.md) - **GitHub**: https://github.com/bilims/mcp-sqlserver - **npm**: https://www.npmjs.com/package/@bilims/mcp-sqlserver --- **Need help?** Open an issue on [GitHub](https://github.com/bilims/mcp-sqlserver/issues)

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/bilims/mcp-sqlserver'

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