Skip to main content
Glama

Model Context Protocol (MCP)

運用作業のためのエージェンティックループにツールを:ローカルナレッジベース(RAG)からポリシーを取得し、モック決済を検索し、チケットを起票する——これは、コアバンキング/運用APIの前面に配置される本番コパイロットと同じ形であり、独自コードは一切含まれません。

このリポジトリは、Md Tanvir Alamによるオリジナルのデモソフトウェアです。汎用的な決済、KYC、銀行間メッセージングの概念のみを使用しています。

Related MCP server: cortex

アーキテクチャ

flowchart LR
  subgraph Client
    Recruiter["CLI / curl / MCP client"]
  end

  subgraph HTTP["Optional FastAPI"]
    Chat["POST /chat"]
    Health["GET /health"]
  end

  subgraph Agent["Agent loop"]
    LLM["LLM or FakeLLM stub"]
    ReAct["ReAct planner"]
  end

  subgraph MCP["MCP server"]
    T1["retrieve_docs"]
    T2["search_payments"]
    T3["create_ticket"]
  end

  subgraph Data
    KB["Markdown KB + hash embeddings"]
    SQLite["SQLite mock ledger / tickets"]
  end

  Recruiter --> Chat
  Recruiter --> MCP
  Chat --> ReAct
  ReAct --> LLM
  ReAct --> T1 & T2 & T3
  MCP --> T1 & T2 & T3
  T1 --> KB
  T2 --> SQLite
  T3 --> SQLite

MCPサーバーとHTTPエージェントは1つのツールレジストリを共有します。これが本番パターンです。IDEエージェント向けにはstdio/SSE経由で、プロダクトUI向けにはHTTP経由で、同じ型付き機能を公開します。

クイックスタート

Python 3.11以上(3.12/3.13で問題ありません)。APIキーは不要です。

python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt

# tests — FakeLLM, hash embeddings, in-memory SQLite
pytest -q

# HTTP demo
cp .env.example .env
PYTHONPATH=src python -m uvicorn agentic_mcp_gateway.http_app:app --port 8080

セッションをお試しください:

curl -s localhost:8080/health
curl -s localhost:8080/chat -H 'content-type: application/json' \
  -d '{"message":"Find payment PMT-1002 and open a ticket if it is stuck"}'

MCP stdio(Claude Desktop / Cursorスタイルのクライアント向け):

PYTHONPATH=src python -m agentic_mcp_gateway.mcp_server

Docker:

docker compose up --build
# then the same curl against localhost:8080

MCPツールの本番環境へのマッピング方法

デモツール

実際のプラットフォームがラップするもの

追加するガードレール

retrieve_docs

Confluence、ランブック、ISO 20022ノートに対するポリシー/製品RAG

テナントごとのACL、引用必須、古いドキュメントのTTL

search_payments

決済バスまたは調査ストア上の読み取りAPI

フィールドレベルのマスキング、監査ログ、クエリコスト制限

create_ticket

ケース管理 / Jira / ServiceNowの書き込みパス

冪等性キー、メーカーチェッカー、PIIスクラビング

エージェントは小さなReActループです。考えて→ツールを選び→観察して→繰り返し、その後回答します。LLM_PROVIDER=fakeの場合、プランナーは決定論的であるため、CIでOpenAIを必要としません。LLM_PROVIDER=llmとOPENAI_API_KEYを設定すると、実際のチャットモデルに切り替えられます。ツール契約は同じままです。

埋め込みはデフォルトでハッシュ化された文字n-gram(numpyコサイン)を使用します。これは文書化されたデモ用フォールバックです。HashingEmbedderをsentence-transformerやベンダーの埋め込みAPIに、リトリーバーインターフェースを変更せずに置き換えられます。

プロジェクト構成

src/agentic_mcp_gateway/   package
  tools/                   retrieve / payments / tickets
  agent.py                 ReAct + FakeLLM
  mcp_server.py            MCP stdio server
  http_app.py              FastAPI /chat
docs/kb/                   sample ops knowledge
tests/                     tool registry, RAG, mocked agent turn

著者

Md Tanvir Alam — github.com/tanvir-ux

MITライセンスです。いかなる銀行やコアバンキングベンダーとも提携していません。

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    A production-minded RAG service for MCP that answers questions over your documents with hybrid retrieval, PII redaction, and source citations, packaged for Docker/Kubernetes.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP-native agentic platform orchestrating planner/executor/critic agents over hybrid RAG with three-tier memory, budget enforcement, safety guardrails, and full observability. It exposes all capabilities as MCP tools, enabling natural-language control of document ingestion, retrieval-augmented generation, and multi-step AI workflows.
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    MCP server that exposes life-insurance back-office tools (policy document search, application status, product/underwriting rules) to LLM agents. Enables agents to retrieve policy documents, check application status, and evaluate underwriting rules via hybrid search and rule lookup.
    3
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables local RAG orchestration with MCP, providing context retrieval, in-memory text ingestion, explicit tool invocation, and transport-neutral tool discovery.
    -