AM

akranga/mcp-workshop

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

17 stars 6 forks 品質 36 トレンド 21

モデルコンテキストプロトコルのワークショップ

概要

このコードリポジトリには、Anthropicによるモデルコンテキストプロトコルのワークショップ資料が含まれています このサーバは、指定した URL の HTML コンテンツをダウンロードします。 コンテンツをダウンロードするには httpx ライブラリを使用します。 その後、HTMLコンテンツをMarkdownテキストに変換します。 そのため、LLMがコンテンツの読み込みや理解が容易になります。 このサーバーでは、Google Programmable Search API を使用して、特定のクエリの Web を検索します。 環境変数 GOOGLE API KEY と GOOGLE SEARCH ENGINE ID で設定する API キーが必要です。 詳細については、Googleプログラム可能な検索APIを参照してください。 このサーバーは、様々なフォーマットで今日の日付を返します。 LLM は、現在の日付に関連する日付を計算するのに役立ちます。 たとえば、LLMが最後の火曜日に何が起こったのかを解決するのに役立ちますか? このMCPクライアントは、AWSのBedrockからPydantic AIモデルを使用します。 環境変数に設定するAWS資格情報が必要です.

概要(AI 翻訳)

紹介

このコードリポジトリには、Anthropicによるモデルコンテキストプロトコルのワークショップ資料が含まれています

ディレクトリ構造

MCP サーバー

ダウンロード

このサーバは、指定した URL の HTML コンテンツをダウンロードします。 [httpx]ライブラリを使ってコンテンツをダウンロードします。

その後、HTMLコンテンツをMarkdownテキストに変換します。 そのため、LLMがコンテンツの読み込みや理解が容易になります。

オンライン検索

このサーバーでは、Google Programmable Search API を使用して、特定のクエリの Web を検索します。 環境変数[GOOGLE_API_KEYと[[T2]で設定するAPIキーが必要です。

詳細については、Googleプログラム可能な検索APIを参照してください。

###今日

このサーバーは、様々なフォーマットで今日の日付を返します。 LLM は、現在の日付に関連する日付を計算するのに役立ちます。

たとえば、LM が [What happened at the last Tuesday? について回答するのに役立ちます。

MCP クライアント

##ピダンティックAI

このMCPクライアントは、AWSのBedrockからPydantic AIモデルを使用します。 環境変数に設定するAWS資格情報が必要です。

これはインタラクティブなクライアントではなく、モデルをロードし、STDOUTに存在する1つのタスクを実行します。

デフォルトでは、AWS BedrockからClaude 3.7モデルを使用します。

Slack の

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Workshop

Introduction

This code repo contains workshop materials for Model Context Protocol by Anthropic

Directory Structure

./
├── docker-compose.yaml            # Docker compose file
├── Dockerfile                     # Dockerfile
├── poetry.lock                    # Poetry lock file
├── pyproject.toml                 # Poetry project configuration file
├── README.md                      # This file
└── src
    ├── clients                    # MCP Clients code
    │   ├── pydantic_ai            # MCP  Client app with Pydantic AI and AWS Bedrock model (Requires AWS credentials)
    │   │   ├── __init__.py
    │   │   ├── main.py            # app code
    │   │   └── prompts.py         # LLM prompts
    │   ├── settings               # app configs
    │   │   ├── __init__.py
    │   │   └── main.py
    │   └── slack                  # MCP Client with Slack Bolt app (requires Slack API token)
    │       ├── __init__.py
    │       ├── main.py            # app code
    │       ├── manifest.yaml      # slack app manifest file
    │       └── prompts.py         # LLM prompts
    └── servers                    # MCP Servers code
        ├── download               # Download HTML page MCP Server
        │   ├── __init__.py
        │   ├── main.py
        │   └── utils.py
        ├── online_search          # MCP Server for Google Programmable Search (requires API key)
        │   ├── __init__.py
        │   └── main.py            # app code
        ├── settings               # app configs
        │   ├── __init__.py
        │   └── main.py
        └── today                  # MCP Server Returns today's date in various formats. Used to help LLM to calculate dates in relations to curreen date
            ├── __init__.py
            └── main.py             # app code

MCP Servers

Download

This server downloads the HTML content of a given URL. It uses the httpx library to download the content.

Then it converts the HTML content to Markdown text. So it is easier for LLM to read and understand the content.

This server uses the Google Programmable Search API to search the web for a given query. It requires an API key to be set in the environment variable GOOGLE_API_KEY and GOOGLE_SEARCH_ENGINE_ID

See Google Programmable Search API for more information.

Today

This server returns today’s date in various formats. It is used to help LLM calculate dates in relation to the current date.

For instance it will help LLM to answer about What happened at the last Tuesday?

MCP Clients

Pydantic AI

This MCP client uses the Pydantic AI model from AWS Bedrock. It requires AWS credentials to be set in the environment variables.

This is not interactive client, it loads the model and does one task to present in STDOUT.

By default it is using Claude 3.7 model from AWS Bedrock.

Slack

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →