Skip to main content
Glama

Model Context Protocol (MCP)

将工具整合为面向运维工作的智能体循环:从本地知识库检索策略(RAG)、搜索模拟支付、创建工单——这与生产环境中位于核心银行/运维 API 之前的副驾驶形态一致,且不包含任何专有代码。

本仓库是 Md Tanvir Alam 的原创演示软件。仅使用通用的支付、KYC 和银行间消息传递概念。

Related MCP server: LightsOut

架构

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 智能体共享一个工具注册表。这就是生产模式:通过 stdio/SSE 为 IDE 智能体暴露相同的类型化能力,同时通过 HTTP 为产品 UI 暴露这些能力。

快速开始

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、runbook、ISO 20022 说明的策略/产品 RAG

按租户的 ACL、强制引用、过期文档 TTL

search_payments

面向支付总线或调查存储的读取 API

字段级脱敏、审计日志、查询成本限制

create_ticket

案件管理 / Jira / ServiceNow 写入路径

幂等键、maker-checker、PII 清洗

该智能体是一个小型 ReAct 循环:思考 → 选择工具 → 观察 → 重复,然后回答。使用 LLM_PROVIDER=fake 时,规划器是确定性的,因此 CI 永远不需要 OpenAI。设置 LLM_PROVIDER=llmOPENAI_API_KEY 即可替换为真实的聊天模型;工具契约保持不变。

嵌入默认使用哈希字符 n-gram(numpy 余弦相似度)。这是一个有文档记录的演示回退方案——无需更改检索器接口,即可将 HashingEmbedder 替换为句子转换器或供应商嵌入 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 Alamgithub.com/tanvir-ux

MIT 许可。与任何银行或核心银行供应商无关。

A
license - permissive license
Not graded
quality - not tested
C
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

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables local document question-answering and retrieval via MCP, supporting multi-turn conversation, intent recognition, and tools for document search, Q&A, and summarization.
    5
  • F
    license
    Not graded
    quality
    A
    maintenance
    Agent orchestration system that runs coding-agent sessions (Claude Code, Codex) with policy mediation and exposes tools via MCP.
  • 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.
  • F
    license
    Not graded
    quality
    C
    maintenance
    An MCP server exposing internal business operations as tools — task management (create, list, update status) and RAG-style semantic search over an internal knowledge base (leave, expense, and onboarding policies) that any MCP-compatible AI agent can call directly for grounded, non-hallucinated answers.

View all related MCP servers

Related MCP Connectors

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • Agentic search over your Dewey document collections from any MCP-compatible client.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

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/tanvir-ux/agentic-mcp-gateway'

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