はじめに — MCPが変えるAIツール統合のパラダイム
Model Context Protocol(MCP)は Anthropic が提案したオープンスタンダードで、AIモデルと外部ツール・データソースを統一的に接続するためのプロトコルです。2025年後半からエコシステムが急速に拡大し、2026年現在では数百のMCPサーバーが公開されています。
Antigravity は MCP をネイティブサポートしており、MCPサーバーを通じてブラウザ操作・コード実行・データベースアクセス・クラウドサービス連携などを AI に委任できます。ここで扱うのは2026年のMCPエコシステムを Antigravity で最大限に活用するための実践的なアプローチを解説します。
Antigravity のカスタムMCPサーバー構築ガイドも合わせてご確認ください。
1. MCP の基本アーキテクチャ
クライアント・サーバーモデル
Antigravity(MCPクライアント)
↓ JSON-RPC 2.0 over stdio / SSE
[MCPサーバー]
↓
外部サービス(GitHub / Slack / DB / ブラウザ等)
MCP の通信は以下の3つのプリミティブで構成されます:
- Tools: AIが呼び出せる関数(
search_github, send_slack_message 等)
- Resources: AIが読み取れるデータ(ファイル・DBレコード・ウェブページ等)
- Prompts: 再利用可能なプロンプトテンプレート
2. 2026年主要MCPサーバーカタログ
開発・コード管理系
GitHub MCP Server(公式)
{
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_TOKEN" }
}
}
主なツール: search_repositories, get_file_contents, create_issue, create_pull_request, list_commits
GitLab MCP Server
{
"gitlab": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-gitlab"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "YOUR_GITLAB_TOKEN",
"GITLAB_API_URL": "https://gitlab.com"
}
}
}
データベース系
PostgreSQL MCP Server(公式)
{
"postgres": {
"command": "npx",
"args": [
"-y", "@modelcontextprotocol/server-postgres",
"postgresql://user:pass@localhost/mydb"
]
}
}
主なツール: query(読み取り専用SQLクエリ実行)
SQLite MCP Server
{
"sqlite": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sqlite", "--db-path", "./data.db"]
}
}
コミュニケーション・コラボレーション系
Slack MCP Server
{
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-YOUR_SLACK_BOT_TOKEN",
"SLACK_TEAM_ID": "T_YOUR_TEAM_ID"
}
}
}
主なツール: slack_post_message, slack_get_channel_history, slack_list_channels
Notion MCP Server
{
"notion": {
"command": "npx",
"args": ["-y", "@notionhq/client-mcp"],
"env": { "NOTION_API_KEY": "YOUR_NOTION_KEY" }
}
}
ブラウザ・ウェブ系
Puppeteer MCP Server
{
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
主なツール: puppeteer_navigate, puppeteer_screenshot, puppeteer_click, puppeteer_fill
Brave Search MCP Server
{
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": { "BRAVE_API_KEY": "YOUR_BRAVE_API_KEY" }
}
}
3. 複数MCP統合の実践パターン
パターン①: リサーチ → コード生成 → PR 自動化
# Antigravity への指示例
「以下のタスクを実行してください:
1. Brave Search で "React Server Components best practices 2026" を検索
2. 上位3つの記事の要点をまとめる
3. プロジェクトの src/components/ ディレクトリを確認
4. 要点に基づいてベストプラクティスを適用したコンポーネントを実装
5. GitHubに新しいブランチを作成してPRを出す
タイトル: 'feat: Apply RSC best practices'」
このような複合タスクが、Brave Search + Filesystem + GitHub MCPの組み合わせで実行できます。
パターン②: データ分析 → Slack報告の自動化
「毎週月曜日の朝9時に以下を実行してください:
1. PostgreSQL の orders テーブルから先週の売上を集計
2. 前週比と目標達成率を計算
3. Slack の #weekly-report チャンネルに整形してレポートを投稿」
PostgreSQL MCP + Slack MCPの組み合わせで、定期レポートを完全自動化できます。
パターン③: ドキュメント自動生成
「このPRの変更内容を分析して、以下を自動生成してください:
1. Notion の "Engineering Docs" データベースに新規ページを作成
2. 変更点・設計の意図・影響範囲をMarkdownで記述
3. 関連するGitHub Issueをリンクして閉じる
4. Slack の #engineering チャンネルに完了通知を送る」
4. MCPサーバーの選定基準
評価チェックリスト
公開MCPサーバーを選ぶ際は以下の基準で評価します。
信頼性
- 公式サーバー(
@modelcontextprotocol/server-*)か、実績あるベンダー提供か
- GitHub のスター数・最終更新日・Issue 対応状況
セキュリティ
- APIキー・認証情報の取り扱い(環境変数経由か)
- 最小権限の原則(必要なスコープのみ要求するか)
- サードパーティサーバーのコードを必ず確認する
機能カバレッジ
- ユースケースに必要なツールが揃っているか
- レート制限・ページネーションへの対応
パフォーマンス
- 応答速度(長時間ブロッキングしないか)
- キャッシュ対応
5. カスタムMCPサーバーの構築
1時間で作るカスタムMCPサーバー
既存のMCPサーバーでカバーされていない社内APIや独自サービスには、カスタムサーバーを構築します。
// my-custom-mcp-server/src/index.ts
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
const server = new Server(
{ name: "my-company-api", version: "1.0.0" },
{ capabilities: { tools: {} } }
);
// ツール一覧の定義
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "get_product_inventory",
description: "商品の在庫数を取得します",
inputSchema: {
type: "object",
properties: {
productId: {
type: "string",
description: "商品ID",
},
warehouseId: {
type: "string",
description: "倉庫ID(省略時は全倉庫の合計)",
},
},
required: ["productId"],
},
},
{
name: "create_support_ticket",
description: "サポートチケットを作成します",
inputSchema: {
type: "object",
properties: {
title: { type: "string" },
description: { type: "string" },
priority: {
type: "string",
enum: ["low", "medium", "high", "critical"],
},
assigneeEmail: { type: "string" },
},
required: ["title", "description", "priority"],
},
},
],
}));
// ツール実行ハンドラー
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
switch (name) {
case "get_product_inventory": {
const { productId, warehouseId } = args as {
productId: string;
warehouseId?: string;
};
// 社内APIを呼び出す
const inventory = await fetchInventory(productId, warehouseId);
return {
content: [
{
type: "text",
text: JSON.stringify(inventory, null, 2),
},
],
};
}
case "create_support_ticket": {
const ticket = args as {
title: string;
description: string;
priority: string;
assigneeEmail?: string;
};
const result = await createTicket(ticket);
return {
content: [
{
type: "text",
text: `チケット #${result.id} を作成しました。URL: ${result.url}`,
},
],
};
}
default:
throw new Error(`未知のツール: ${name}`);
}
});
// サーバー起動
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("MCP Server running on stdio");
Antigravity の設定ファイルに追加
// .antigravity/settings.json または ~/.antigravity/settings.json
{
"mcpServers": {
"my-company-api": {
"command": "node",
"args": ["/path/to/my-custom-mcp-server/dist/index.js"],
"env": {
"COMPANY_API_KEY": "YOUR_INTERNAL_API_KEY",
"API_BASE_URL": "https://api.internal.company.com"
}
}
}
}
6. 本番環境でのMCPセキュリティ
環境変数の安全な管理
# 推奨: .env.antigravity(.gitignoreに追加必須)
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_YOUR_PERSONAL_ACCESS_TOKEN
SLACK_BOT_TOKEN=xoxb_YOUR_BOT_TOKEN
NOTION_API_KEY=secret_YOUR_NOTION_KEY
POSTGRES_URL=postgresql://user:pass@host/db
権限の最小化原則
# GitHub トークンのスコープ
✅ repo(プライベートリポジトリへの読み書き)のみ
❌ admin:org(組織管理)は不要
❌ delete_repo(リポジトリ削除)は絶対に付与しない
# Slackアプリのスコープ
✅ chat:write(メッセージ送信)
✅ channels:read(チャンネル一覧取得)
❌ admin(Workspace管理者権限)は不要
個人開発者の視点から(実体験メモ)
ここまでの要点
2026年のMCPエコシステムを Antigravity で活用するためのポイントをまとめます。
- 公式・実績あるMCPサーバーを選定基準(信頼性・セキュリティ・機能)で評価して採用する
- 複数MCPの組み合わせ(検索+コード+GitHub、DB+Slack等)で複合業務フローを自動化
- 最小権限の原則を徹底し、各MCPサーバーに必要なスコープのみを付与する
- カスタムMCPサーバーで社内APIを統合し、Antigravityが到達できる範囲を拡張する