Skip to main content
Glama

MSSQL MCP Server

by c0h1b4

MSSQL MCP 서버

Microsoft SQL Server 데이터베이스에 연결하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 SQL 쿼리 실행 및 데이터베이스 연결 관리 도구를 제공합니다.

버전 알림: 이 프로젝트는 Model Context Protocol SDK 1.9.0을 사용하도록 업그레이드되었습니다. 자세한 내용은 UPGRADE.md를 참조하세요.

설치

Smithery를 통해 설치

Smithery를 통해 Claude Desktop용 MSSQL MCP 서버를 자동으로 설치하려면:

지엑스피1

수동 설치

npm install mssql-mcp-server

용법

MCP 설정 구성 파일에 서버를 추가합니다.

{ "mcpServers": { "mssql": { "command": "mssql-mcp-server", "env": { "MSSQL_CONNECTION_STRING": "Server=localhost;Database=master;User Id=sa;Password=yourpassword;", // Or individual connection parameters: "MSSQL_HOST": "localhost", "MSSQL_PORT": "1433", "MSSQL_DATABASE": "master", "MSSQL_USER": "sa", "MSSQL_PASSWORD": "yourpassword", "MSSQL_ENCRYPT": "false", "MSSQL_TRUST_SERVER_CERTIFICATE": "true" } } } }

도구

질문

MSSQL 데이터베이스에서 SQL 쿼리를 실행합니다.

매개변수
  • connectionString (문자열, 선택 사항): 전체 연결 문자열(개별 매개변수에 대한 대안)
  • host (문자열, 선택 사항): 데이터베이스 서버 호스트 이름
  • port (숫자, 선택): 데이터베이스 서버 포트(기본값: 1433)
  • database (문자열, 선택 사항): 데이터베이스 이름(기본값: master)
  • username (문자열, 선택 사항): 데이터베이스 사용자 이름
  • password (문자열, 선택 사항): 데이터베이스 비밀번호
  • query (문자열, 필수): 실행할 SQL 쿼리
  • encrypt (부울, 선택 사항): 암호화를 활성화합니다(기본값: false)
  • trustServerCertificate (부울, 선택 사항): 신뢰 서버 인증서(기본값: true)

connectionString 또는 ( host + username + password )를 제공해야 합니다.

const result = await use_mcp_tool({ server_name: 'mssql', tool_name: 'query', arguments: { host: 'localhost', username: 'sa', password: 'yourpassword', query: 'SELECT * FROM Users', }, });

서버 실행

지역 개발

# Install dependencies npm install # Run in development mode npm run dev # Build npm run build # Run the built server npm start

Docker 사용

# Build and start services (SQL Server + MCP server) docker-compose up # Or just build the Docker image docker build -t mssql-mcp-server .

테스트

# Run tests npm test # Run tests with coverage npm run test:coverage

보안

서버에는 위험한 SQL 작업에 대한 보호 장치가 포함되어 있습니다.

  • DROP, TRUNCATE, ALTER, CREATE, EXEC 등과 같이 잠재적으로 유해한 명령을 차단합니다.
  • 모든 입력 매개변수와 데이터베이스 이름을 검증합니다.
  • 쿼리 길이와 시간 초과에 대한 합리적인 제한을 설정합니다.
  • 더 나은 성능과 보안을 위해 연결 풀링을 사용합니다.

특허

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

모델 컨텍스트 프로토콜을 통해 SQL 쿼리 실행과 Microsoft SQL Server 데이터베이스 연결 관리를 지원합니다.

  1. 설치
    1. Smithery를 통해 설치
    2. 수동 설치
  2. 용법
    1. 도구
      1. 질문
    2. 서버 실행
      1. 지역 개발
      2. Docker 사용
    3. 테스트
      1. 보안
        1. 특허

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.
            Last updated -
            20
            Python
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables SQL query execution, database management, and business intelligence capabilities through MySQL connections.
            Last updated -
            JavaScript
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
            Last updated -
            1
            108
            Python
            MIT License
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables executing SQL queries and managing connections with Microsoft SQL Server databases.
            Last updated -
            3
            TypeScript
            MIT License

          View all related MCP servers

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

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