diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c081bc2 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md index 02ff4f4..064091e 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 ``` diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..1c144f1 --- /dev/null +++ b/smithery.yaml @@ -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}})