ClaudeからSQL Serverへアクセスしたい!
試したリポジトリ
GitHub - RichardHan/mssql_mcp_server: A Model Context Protocol (MCP) server for Microsoft SQL Server that enables secure database interactions through a controlled interface. Allows AI assistants to safely list tables, read data, and execute SQL queries while maintaining security and structure.
A Model Context Protocol (MCP) server for Microsoft SQL Server that enables secure database interactions through a contr...
環境
- MacOS Tahoe
- node v22.17.1
README.md 通りにやってもエラーになる
試してうまくいかなかったこと
- claude_desktop_config.json に設定
pip install microsoft_sql_server_mcpでインストールする
うまく行った方法 issue#15
issue#15 の先にあったリポジトリですんなりいきました
wode/packages/wener-mssql-mcp at develop · wenerme/wode
Wener Node, Bun, NestJS, React Utils, Hooks & Demos - wenerme/wode
jsonを編集
{
"mcpServers": {
"mssql": {
"command": "npx",
"args": ["@wener/mssql-mcp", "--env-file", "/path/to/your/.env", "--stdio"]
}
}
}.env にサーバーの設定を入れる
MSSQL_SERVER=localhost
MSSQL_DATABASE=your_database
MSSQL_USER=your_username
MSSQL_PASSWORD=your_passwordClaude Desktopを再起動する
mssql-conf のエラーが出ますが使えてます


コメント