Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Anthropic】Model Context Protocolを知る

Last updated at Posted at 2025-01-18

概要

「Model Context Protocol」とは

コンテンツ リポジトリ、ビジネス ツール、開発環境など、データが存在するシステムに AIアシスタントを接続するための新しい標準規格

AIアシスタントの課題

  • 優秀なAIモデルでさえ、情報サイロとレガシーシステムに閉じ込められたデータへのアクセスができない
  • AIモデルごとにデータ形式や接続方法などの調整が必要となる

MCPによる解決

AIシステムとデータソースを接続するための共通の規格を提供し、独自の規格を単一のプロトコルに置き換えます。

Model Context Protocol

アーキテクチャ

  • MCPホスト: Claude Desktop、IDE、または MCP を介してデータにアクセスする AI ツールなどのプログラム
  • MCPクライアント: サーバーとの 1:1 接続を維持するプロトコル クライアント
  • MCPサーバー: 標準化されたモデル コンテキスト プロトコルを通じて特定の機能を公開する軽量プログラム
  • ローカルデータソース: MCP サーバーが安全にアクセスできるコンピューターのファイル、データベース、サービス
  • リモートサービス: MCP サーバーが接続できるインターネット経由 (API 経由など) で利用可能な外部システム

image.png

Getting Start 〜Claudeデスクトップユーザ向け for Mac〜

[1] デスクトップ版Claudeをダウンロード

[2] 設定の編集

「Claude」→「Settings」→「Developer」→「Edit Config」の順で押していくと設定ファイルが作成される

image.png

image.png

設定ファイルの内容を以下に書き換える
※usernameは自分のコンピュータのユーザ名に置き換える

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/Users/username/Downloads"
      ]
    }
  }
}

[3] Node.jsがインストールされているか確認する or インストールする、

Node.js がインストールされているか確認

node --version

されていなければインストール(以下を参考)

[4] Claude Desktopを再起動

再起動後に、入力ボックスの右下にハンマーアイコンが表示される

image.png

[5] 試してみる

できた!すごい!
image.png

次回

次は、「サーバー開発者向け」と「クライアント開発者向け」のGetting Startをやっていきたい

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?