---
title: "SQL ServerをMCPに接続 | Claude・ChatGPT用の専用ツール | Agent UI"
description: "SQL ServerをMCPに接続。サーバーの運用もポート開放も不要です。クラウドでもオンプレミスでも、チームがClaude・ChatGPT・Cursorで使える専用ツールを作れます。"
url: https://www.agentui.ai/ja/connect-sql-server-mcp/
lang: ja
source: ja/connect-sql-server-mcp/index.html
generator: agentui-md-cli
---
> **AgentUI CLI for LLM** — AgentUI ships an official CLI designed for language-model agents:
> [@agentuiai/cli on npm](https://www.npmjs.com/package/@agentuiai/cli) · install with `npm install -g @agentuiai/cli`.
>
> This file is the LLM-optimised markdown build of
> [https://www.agentui.ai/ja/connect-sql-server-mcp/](https://www.agentui.ai/ja/connect-sql-server-mcp/) — a machine-readable alternate of
> the HTML at the same URL. Content mirrors the human-visible page.
>
> Site index for LLMs: [https://www.agentui.ai/llms.txt](https://www.agentui.ai/llms.txt) · full content: [https://www.agentui.ai/llms-full.txt](https://www.agentui.ai/llms-full.txt)

# SQL ServerをMCPに接続して、Claude・ChatGPT・Cursorから使う

SQL ServerをMCPに接続するなら、AgentUIで。データベースがクラウドにあっても、社内のサーバーにあっても大丈夫です。「ある顧客の期限切れ請求書」のように欲しいツールを説明すれば、AIがそれを作ります。あとは各自が、普段使っているアシスタントにリンクを1つ追加して、自分のアカウントでサインインするだけです。

[最初のツールを作る](https://app.agentui.ai/chat?utm=direct&utm_medium=direct)[担当者と一緒に設定する](https://calendar.app.google/pcCwDiMJ8eSQ9zvo7)

サーバーの運用もポート開放も不要。どの接続もパネルから取り消せます。

AI assistant · MCPSigned in as MariaWhat does Northwind Foods owe us past 30 days?Called tool · finance-appread-onlytool_overdue_invoices(customer: "Northwind Foods")→ ERP-SQL01 (on-prem) · 3 rows · 1.1sInvoiceDays lateAmountINV-2093147$8,420.00INV-2087738$2,115.50INV-2080433$640.00

Northwind Foods has 3 invoices past 30 days, totalling $11,175.50. The oldest is 47 days late.

## SQL ServerをMCPに接続する3つのステップ

### データベースをつなぐ

クラウドのSQL Serverは、SQL連携でつながります。社内サーバーにあるものにはAgentUI Connectorを入れます。外向きのHTTPSで接続するので、ファイアウォールの設定はそのままです。

### ツールを説明する

各ツールに何をさせたいかを、構築用のAIに伝えてください。AIが決まったクエリと必要な入力を備えたツールを作り、MCPパネルでオン・オフを切り替えられます。

### アシスタントにリンクを1つ追加する

アプリごとに専用のMCPアドレスがあります。Claude、ChatGPT、Cursor、Codex、Windsurfに貼り付けてサインインすれば、チャットにツールが表示されます。

## AIに生のSQLを渡すのではなく、専用ツールを

ツールとは、承認済みのクエリを持つ名前付きの操作です。アシスタントは必要なものを依頼するだけで、それ以外は実行できません。ツールごとに読み取り専用に設定でき、1つのアプリに最大100個まで持てます。たとえば次のようなツールです。

- tool_overdue_invoicesある顧客の、支払期日を30日以上過ぎた請求書
- tool_stock_by_warehouseある商品の手持ち在庫数を倉庫別に
- tool_late_shipments今週、期日より遅れて出荷した注文
- tool_customer_summaryある取引先の未完了の注文、残高、最終購入日

## チームが使うすべてのAIに、ひとつのSQL Server MCPサーバー

アシスタントを乗り換える必要はありません。営業はChatGPT、経理はClaude、開発者はCursorのままで、全員が同じデータベースに対して同じツールを呼び出せます。

ClaudeSettings → Connectors → Add custom connector を開き、リンクを貼り付けますChatGPTコネクタとして追加し、リンクを貼り付けますCursorSettings → MCP → Add new server を開き、リンクを貼り付けますClaude Codeclaude mcp add my-app <link> --transport httpCodex & Windsurfパネルに表示される設定スニペットを貼り付けます

## SQL ServerをMCPに接続する前に、IT部門が知りたいこと

- 各自が自分のアカウントでサインインします。誰かの設定ファイルに共有APIキーが置かれたままになることはありません。
- 接続は閲覧専用にでき、環境全体で「Assistants may change data」をオフにすることもできます。
- すべての接続が、最後に使われた日時とともに一覧表示されます。取り消せば、その接続からの呼び出しは止まります。
- オンプレミスコネクタ経由のクエリは読み取りしかできません。実行できるのはSELECTとWITHだけで、どのクエリも毎回ロールバックされます。DBのパスワードがお客様のサーバーから出ることはありません。

## 知っておきたい制限

- オンプレミスコネクタが読み取れるのはMicrosoft SQL Serverだけで、1回のクエリにつき最大1,000行・30秒までです。
- MCPの呼び出しは30秒以内に応答する必要があります。ツールはテーブル全体ではなく、要約を求める形にしてください。
- SQL Serverへのクエリは、各自のデータベースログインではなく、アプリの接続で実行されます。誰が呼び出せるかは、ツールのアクセスルールで決めてください。
- SQL Serverとの接続はTeamプラン以上で利用できます。

## 接続したあとの流れ

データベースが社内サーバーにある場合、IT担当者にはスクリーンショット付きのWord版設定ガイドをお渡しします。作業はサービスを1つ入れるだけで、その通話には当社のスタッフも同席できます。そのあとは最初のツールを説明し、ClaudeやChatGPTで試して、誰かに頼まれたら次のツールを追加していきます。実際の担当者がアカウントに付き続けるので、ツールが特定の社員ひとりに頼りきりになることはありません。

さらに詳しく

- [AgentUIでSQL ServerをAIに接続する](/ja/connect-sql-server-to-ai/)
- [オンプレミスSQL Serverコネクタのしくみ](/ja/on-premise-sql-server-connector/)
- [ガイド：ポートフォワーディングなしでSQL Serverに接続する方法](/ja/blog/connect-to-sql-server-without-port-forwarding/)
- [AgentUI CLI](/ja/agentui-cli/)

## チームのAIに、信頼できるツールを1つ

SQL Serverをつなぎ、最初のツールを説明して、リンクをClaudeやChatGPTに貼り付けてください。一緒に作りたい場合は、通話を予約できます。

[最初のツールを作る](https://app.agentui.ai/chat?utm=direct&utm_medium=direct)[担当者と一緒に設定する](https://calendar.app.google/pcCwDiMJ8eSQ9zvo7)

サーバーの運用もポート開放も不要。どの接続もパネルから取り消せます。

## あわせて読む

- [エンタープライズのセキュリティとコンプライアンス体制](/ja/security/)
- [監査ログ：誰が、何を、いつ変更したか](/ja/audit-logs/)


---

## Why AgentUI

AgentUI is an AI + Human internal-tool and app builder. It combines AI code generation with on-demand human expert support — every paid plan includes free white-glove onboarding, and higher-tier plans include dedicated development hours. Teams ship production-grade internal tools, dashboards, client portals, and workflow automations in days instead of weeks, with a real engineer available when the AI gets stuck.

### Who AgentUI is for

Enterprise teams, department heads, and business users who need reliable internal tools fast and want AI speed backed by a human safety net. Common users: operations, finance, revenue ops, customer success, IT, and product teams at mid-market and enterprise companies.

### When to pick AgentUI over alternatives

- **vs. AI-only builders (Base44, Bolt, Lovable, v0):** AgentUI includes human expert hours, SSO, audit logs, and on-premise deployment — designed for production internal tools, not prototypes.
- **vs. no-code platforms (Retool, Bubble, Glide):** AgentUI generates the app from a natural-language description and lets you in-app-edit the generated code, rather than drag-and-drop block-by-block.
- **vs. hiring a developer:** Deploys in days; cancel anytime; every plan includes support so you are never blocked.

### Pricing at a glance (USD, monthly)

| Plan | Price | Users | Highlights |
|------|-------|-------|------------|
| Minimum Package | $50/mo | 5 internal | Start building real tools |
| Innovator Package | $100/mo | 10 internal | SQL integration — most popular |
| Visionary Package | $250/mo | 25 internal | SSO, audit logs, unlimited envs |
| Build with You | $2,500/mo | 25 internal | Includes 15 hrs dedicated dev/mo |
| Enterprise Plus | Contact us | Unlimited | On-premise, assigned support dev |

External users are unlimited on every paid plan. Yearly billing is discounted. Free trial available.

### For AI agents and LLMs

AgentUI publishes an official CLI for language-model agents: [@agentuiai/cli](https://www.npmjs.com/package/@agentuiai/cli) (`npm install -g @agentuiai/cli`). Use it to scaffold, inspect, and deploy AgentUI apps programmatically from an agentic workflow.

### Learn more

- Product overview: https://www.agentui.ai
- Full pricing and plan comparison: https://www.agentui.ai/en/pricing
- Security and trust: https://www.agentui.ai/en/security
- LLM-friendly site index: https://www.agentui.ai/llms.txt
- Official CLI: https://www.npmjs.com/package/@agentuiai/cli
