Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official Python 3.11 image from the Python foundation.
FROM python:3.11-slim AS builder

# Set the working directory to /app
WORKDIR /app

# Copy the requirements.txt file into the image
COPY requirements.txt requirements.txt

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the entire application directory
COPY . .

# Set environment variables
ENV MSSQL_DRIVER=mssql_driver
ENV MSSQL_HOST=localhost
ENV MSSQL_USER=your_username
ENV MSSQL_PASSWORD=your_password
ENV MSSQL_DATABASE=your_database

# Command to run the MCP server
ENTRYPOINT ["python", "-m", "mssql_mcp_server"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![Tests](https://github.com/JexinSam/mssql_mcp_server/actions/workflows/test.yml/badge.svg)
[![smithery badge](https://smithery.ai/badge/@JexinSam/mssql_mcp_server)](https://smithery.ai/server/@JexinSam/mssql_mcp_server)

# MSSQL MCP Server

Expand All @@ -18,6 +19,15 @@ This ensures safer database exploration, strict permission enforcement, and logg

## Installation

### Installing via Smithery

To install MSSQL MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@JexinSam/mssql_mcp_server):

```bash
npx -y @smithery/cli install @JexinSam/mssql_mcp_server --client claude
```

### Manual Installation
```bash
pip install mssql-mcp-server
```
Expand Down
33 changes: 33 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- mssqlDriver
- mssqlHost
- mssqlUser
- mssqlPassword
- mssqlDatabase
properties:
mssqlDriver:
type: string
description: The driver for MSSQL connection.
mssqlHost:
type: string
description: The MSSQL server host.
mssqlUser:
type: string
description: The MSSQL user for authentication.
mssqlPassword:
type: string
description: The password for the MSSQL user.
mssqlDatabase:
type: string
description: The MSSQL database to connect to.
commandFunction:
# A function that produces the CLI command to start the MCP on stdio.
|-
(config) => ({command: 'python', args: ['-m', 'mssql_mcp_server'], env: {MSSQL_DRIVER: config.mssqlDriver, MSSQL_HOST: config.mssqlHost, MSSQL_USER: config.mssqlUser, MSSQL_PASSWORD: config.mssqlPassword, MSSQL_DATABASE: config.mssqlDatabase}})