Skip to main content
Glama
dev484p

Agentic AI with MCP

by dev484p

モデルコンテキストプロトコル(MCP)を備えたエージェント型AI

このプロジェクトは、Groqホスト型LLM(qwen-qwq-32bモデル)をカスタムモデルコンテキストプロトコル(MCP)サーバーを介して様々なツールに接続するエージェント型AIシステムを実装します。このシステムは、Wikipedia、インターネット検索(Tavily API経由)、金融データ(Yahoo Finance API経由)からのコンテキスト情報を提供することで、LLMの機能を強化します。

MCPについて

モデルコンテキストプロトコル(MCP)は、Anthropicが開発したオープンスタンダードであり、アプリケーションが大規模言語モデル(LLM)にコンテキストを提供する方法を標準化します。MCPは、LLMアプリケーションと外部データソースおよびツールとのシームレスな統合を促進し、AIシステムが標準化されたインターフェースを介して様々なサービスと動的に連携することを可能にします。

MCP の主な機能:

  • 標準化: AI アシスタントを構造化されたツールおよびデータ レイヤーとインターフェイスするための汎用プロトコルを提供します。

  • モジュラー アーキテクチャ: 通常はホスト AI システムによって仲介される永続ストリーム上のクライアント サーバー パターンに従います。

  • 動的イントロスペクション: tools/list や resources/list などのメソッドを通じてツールとリソースの動的な検出をサポートします。

セキュリティ: ホストを介した認証を組み込み、安全なトランスポート プロトコルをサポートします。MCP を採用することで、開発者は相互運用性とセキュリティが向上し、複雑なワークフローに対応できる AI アプリケーションを構築できます。

MCP サーバーに新しいツールを追加するには:​

  • ツールを定義する: 特定のタスクまたはデータの取得を処理する新しい関数を作成します。

  • ツールを登録する: ツールの名前と説明を指定して、新しい機能が含まれるようにサーバーのツール レジストリを更新します。​

  • リクエストの処理: サーバーがクエリに基づいて受信リクエストを適切なツールにルーティングできるようにします。このモジュール式のアプローチにより、サーバーの機能を簡単に拡張でき、言語モデルがより広範なコンテキスト情報にアクセスできるようになります。

Related MCP server: Wikipedia MCP Server

特徴

  • MCP サーバー: さまざまなツールへのアクセスを提供する中央ハブ

  • 3つの統合ツール:

    1. Wikipedia検索 - 事実情報の検索

    2. インターネット検索 - Tavily API を活用した包括的なウェブ検索結果

    3. Yahoo Finance API - リアルタイムの株価と金融データ

  • Groq API 統合: qwen-qwq-32b モデルを使用した超高速 LLM 処理

  • クライアントサーバーアーキテクチャ: ツール管理とLLMの相互作用を明確に分離

前提条件

始める前に、次のものがあることを確認してください。

インストール

  1. リポジトリをクローンします。

    git clone https://github.com/dev484p/AgenticAI_MCP
    cd AgenticAI_MCP
  2. 依存関係をインストールします:

    uv add "mcp[cli]"
  3. 環境変数を設定します:keys.json の Groq および Tavily API キーを更新します

  4. オプション (開発用に MCP Inspector を使用してサーバーを実行する場合):

uv run mcp dev server.py
  1. チャットボットを開始するには、次のコマンドを実行します。

    uv run client.py

利用可能なツール

システムは、MCP サーバーを通じて次の 3 つのツールを提供します。

  1. ウィキ検索:

  • Wikipediaの情報にアクセスする

  • クエリ例:「人工知能の歴史について教えてください」

  1. インターネット検索(Tavily):

  • 包括的なウェブ検索結果を取得する

  • クエリの例: 「量子コンピューティングの最新の開発状況は何ですか?」

  1. ヤフーファイナンス:

  • 株価や財務データにアクセスする

  • クエリの例: 「AAPL 株の現在の価格はいくらですか?」

参照

Available Tools

3 tools

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updates
    • First observedinternet_search
    • First observedwiki_search
    • First observedyahoo_finance_search

TDQS

B3.1/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: internet_search uses Tavily API for general web searches, wiki_search targets Wikipedia articles specifically, and yahoo_finance_search focuses on stock information from Yahoo Finance. There is no overlap in functionality or ambiguity between these three tools.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with a clear verb_noun structure: internet_search, wiki_search, and yahoo_finance_search. The naming is uniform and predictable across the entire set.

Tool Count3/5

With only 3 tools, the server feels thin for the broad domain implied by 'Agentic AI with MCP', which suggests a more comprehensive set of capabilities. While each tool is distinct, the count is borderline low for typical agentic AI tasks that might require more varied operations.

Completeness2/5

The tool surface is severely incomplete for an 'Agentic AI' server, as it only provides search functionalities without any CRUD operations, data processing, or other AI-related actions. There are significant gaps that will limit agent effectiveness, such as missing tools for data manipulation, analysis, or interaction with AI models.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    A Model Context Protocol server providing real-time stock data and options analysis through Yahoo Finance, enabling LLMs to access market data, analyze stocks, and evaluate options strategies.
    3
    27
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol server that retrieves information from Wikipedia to provide context to LLMs, allowing users to search articles, get summaries, full content, sections, and links from Wikipedia.
    22
    2,859 PyPI
    299
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    A Model Context Protocol server that enables interaction with Yahoo Finance to retrieve stock pricing, company information, and historical financial data through natural language queries.
    21
    1,290 PyPI
    28
    MIT
  • A
    license
    C
    quality
    Not graded
    maintenance
    A Model Context Protocol server that provides tools for interacting with Yahoo Finance, allowing users to retrieve stock prices, company information, and perform financial data comparisons.
    11
    MIT