Skip to main content
Glama
karthikeyanramu

MCP RAG Agent Server

🚀 MCP RAG エージェント – AI搭載APIテストフレームワーク

Python Flask RAG API Testing Status


📌 概要

MCP RAG エージェントは、以下を組み合わせたAI駆動型のモジュール式テストフレームワークです。

  • 🔎 RAG (検索拡張生成) – 知識ベースのコンテキスト検索

  • ⚙️ MCPレイヤー (ツール実行エンジン) – ツールを動的に実行

  • 🧪 APIテストエージェント – PostmanのようなAPI検証を自動化

これにより、自然言語 → API実行 → 検証 → インテリジェントな応答生成が可能になります。


🧠 システムアーキテクチャ

graph TD
A[User Query] --> B[API Agent - NLP Parser]
B --> C[MCP Server - Tool Router]
C --> D[RAG Engine - Knowledge Retrieval]
C --> E[API Execution Tool]
D --> C
E --> F[External API / System]
F --> G[Response Validation Layer]
G --> H[Final AI Response]

Related MCP server: sentinel-mcp

🧩 アーキテクチャの解説

1️⃣ APIエージェントレイヤー

  • 自然言語入力を受け付けます

  • リクエストを構造化されたAPIテストケースに変換します

2️⃣ MCPサーバーレイヤー

  • 中央オーケストレーションレイヤー

  • リクエストを適切なツールにルーティングします

3️⃣ RAGレイヤー

  • ドキュメントからコンテキスト知識を取得します

  • API検証ロジックを強化します

4️⃣ 実行レイヤー

  • API呼び出し (GET/POST/PUT/DELETE) を実行します

  • 応答ペイロードをキャプチャします

5️⃣ 検証レイヤー

  • 期待値と実際の応答を比較します

  • 構造化されたテスト結果を返します


🔁 エンドツーエンドフロー

User Input
   ↓
API Agent (Intent Detection)
   ↓
MCP Server (Tool Selection)
   ↓
RAG (Context Injection)
   ↓
API Execution Engine
   ↓
Response Validation
   ↓
Final Result Output

⚙️ インストールガイド

1️⃣ リポジトリのクローン

git clone https://github.com/karthikeyanramu/MCP_RAG_AGENT.git
cd MCP_RAG_AGENT

2️⃣ 仮想環境の作成

python -m venv venv

有効化:

# Windows
venv\Scripts\activate

# Mac/Linux
source venv/bin/activate

3️⃣ 依存関係のインストール

pip install -r requirements.txt

4️⃣ MCPサーバーの起動

python server/mcp_server.py

期待される出力:

MCP Server running on http://localhost:5000

5️⃣ APIエージェントの実行

python -m qa_agent.api_agent_runner

🧪 Postman統合 (手動テストサポート)

このシステムはAI駆動ですが、Postman形式のAPIテストもサポートしています。

📌 リクエスト例

🔹 エンドポイント

POST http://localhost:5000/execute

🔹 ヘッダー

{
  "Content-Type": "application/json",
  "Authorization": "Bearer <token-if-needed>"
}

🔹 サンプルペイロード

{
  "tool": "api_executor",
  "method": "POST",
  "url": "https://api.example.com/login",
  "headers": {
    "Content-Type": "application/json"
  },
  "body": {
    "username": "test_user",
    "password": "Test@123"
  }
}

📌 応答サンプル

{
  "status": 200,
  "message": "Login Successful",
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "validation": "PASSED"
}

🔄 CI/CDパイプライン (QA成熟度モデル)

このシステムは、自動API検証のためにCI/CDパイプラインに統合できます。

🚀 パイプラインフロー

graph LR
A[Code Push] --> B[CI Trigger - GitHub Actions]
B --> C[Install Dependencies]
C --> D[Run API Tests via MCP Agent]
D --> E[RAG Validation Layer]
E --> F[Test Report Generation]
F --> G[Deploy / Fail Pipeline]

🧪 CI/CDの利点

✔ 自動API回帰テスト ✔ AI駆動の検証 (手動QA工数の削減) ✔ 早期の欠陥検出 ✔ RAGによるドメイン知識の注入 ✔ スケーラブルなテスト実行


📌 GitHub Actionsワークフローのサンプル

name: MCP API Tests

on: [push]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: 3.10

      - name: Install dependencies
        run: pip install -r requirements.txt

      - name: Run MCP API Agent
        run: python -m qa_agent.api_agent_runner

🧰 利用可能なツール

ツール

目的

knowledge_search

RAGベースのドキュメント検索

calculator

算術演算

api_executor

HTTPリクエストの実行


📊 実際のユースケース

  • 銀行APIの自動化 (AML / KYC)

  • 担保管理システムのテスト

  • マイクロサービスの回帰テスト

  • AI駆動のQA自動化フレームワーク


⚠️ トラブルシューティング

❌ ポートの競合

netstat -ano | findstr :5000
taskkill /PID <pid> /F

❌ モジュールエラー

pip install -r requirements.txt

🚀 今後の拡張予定

  • OpenAI / LLM統合

  • テスト実行用UIダッシュボード

  • Kubernetesデプロイ

  • 高度な埋め込みベースのRAG

  • Postmanコレクションの自動インポート


👨💻 まとめ

このプロジェクトは以下を実証しています:

✔ AI搭載のAPIテスト ✔ MCPベースのツールオーケストレーション ✔ RAGによる検証の強化 ✔ エンタープライズグレードのQA自動化アーキテクチャ

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    QA Sphere MCP server that enables Large Language Models to interact directly with test management system test cases, supporting AI-powered development workflows and test case discovery.
    15
    101
    23
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    An MCP server for AI-powered API testing that enables automated positive, negative, and security testing directly from AI chat interfaces. It supports multiple AI providers and generates detailed security reports.
    54
    Inno Setup
  • A
    license
    -
    quality
    D
    maintenance
    A standalone MCP server for API testing and management, allowing AI assistants to interact with RESTful APIs through natural language.
    13
    28
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.

  • MCP server for AI access to Swagger by SmartBear.

  • Official MCP server for Qase — manage test cases, runs, suites, defects via AI tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/karthikeyanramu/MCP_RAG_AGENT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server