Skip to main content
Glama

Banking Model Context Protocol Server

by Abhinav-pyth

集成 MCP 的银行聊天机器人

一个复杂的银行聊天机器人应用程序,使用 Azure OpenAI 和模型上下文协议 (MCP) 实现安全高效的消息处理。

特征

  • 人工智能银行助手:使用 Azure OpenAI 为银行查询提供智能响应

  • 模型上下文协议(MCP) :实现安全消息通信协议

  • 实时聊天界面:现代、响应式的用户界面,可实现无缝的用户交互

  • 全面的日志记录:用于监控和调试的详细日志系统

  • 银行信息集成:动态显示银行详细信息和服务

  • Markdown 支持:响应的富文本格式

项目结构

. ├── app.py # Main Flask application ├── mcp_server.py # MCP server implementation ├── mcp_client.py # MCP client implementation ├── requirements.txt # Python dependencies ├── .env # Environment variables ├── templates/ # HTML templates │ └── index.html # Chat interface └── logs/ # Log files ├── client_messages.log ├── mcp_client.log └── mcp_server.log

先决条件

  • Python 3.8 或更高版本

  • Azure OpenAI API 访问

  • 所需的 Python 包(请参阅 requirements.txt)

安装

  1. 克隆存储库:

    git clone <repository-url> cd banking-chatbot
  2. 创建并激活虚拟环境:

    python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
  3. 安装依赖项:

    pip install -r requirements.txt
  4. 使用您的凭证创建一个.env文件:

    ENDPOINT_URL=your_azure_endpoint AZURE_OPENAI_API_KEY=your_api_key DEPLOYMENT_NAME=your_deployment_name

用法

  1. 启动 MCP 服务器:

    python mcp_server.py
  2. 在新的终端中,启动 Flask 应用程序:

    python app.py
  3. 访问聊天机器人界面http://localhost:5000

MCP 协议

模型上下文协议 (MCP) 用于处理聊天机器人与服务器之间的消息通信。它提供:

  • 安全消息传输

  • 消息队列和可靠性

  • 详细日志记录

  • 实时消息处理

消息类型

  • 聊天消息:用户查询和 AI 响应

  • 系统消息:管理和控制消息

日志记录

应用程序在logs目录中维护详细日志:

  • client_messages.log :聊天消息历史记录

  • mcp_client.log :客户端连接和操作日志

  • mcp_server.log :服务器操作日志

银行信息

该聊天机器人配置了全面的银行信息,包括:

  • 营业时间

  • 分支机构

  • 可用服务

  • 联系信息

  • 支持渠道

发展

添加新功能

  1. 更新app.py中的BANK_INFO字典以获取新的银行信息

  2. 修改SYSTEM_MESSAGE以更新 AI 行为

  3. mcp_client.py中添加新的消息处理程序以获得附加功能

测试

运行测试客户端来验证 MCP 功能:

python test_client.py

清除测试日志:

python clear_logs.py

安全

  • API 密钥和敏感信息存储在.env

  • MCP 提供安全的消息传输

  • 实现输入验证和错误处理

贡献

  1. 分叉存储库

  2. 创建功能分支

  3. 提交你的更改

  4. 推送到分支

  5. 创建拉取请求

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

-
security - not tested
-
license - not tested
-
quality - not tested

Related MCP Servers

  • -
    security
    -
    license
    -
    quality
    Provides chat and image analysis capabilities through OpenRouter.ai's diverse model ecosystem, enabling both text conversations and powerful multimodal image processing with various AI models.
    Last updated -
    26
    10
    • Apple
    • Linux
  • -
    security
    -
    license
    -
    quality
    This server implements the Multi-Agent Conversation Protocol for AWS SecurityHub, enabling interaction with AWS SecurityHub API through natural language commands.
    Last updated -
  • A
    security
    -
    license
    A
    quality
    A Model Context Protocol server that enables AI assistants to interact with Azure DevOps services, providing capabilities for work item management, project management, and team collaboration through natural language.
    Last updated -
    21
  • -
    security
    -
    license
    -
    quality
    A comprehensive server that enables AI applications to interact with Microsoft 365 and Azure AD services through standardized Model Context Protocol interfaces.
    Last updated -
    1
    MIT License

View all related MCP servers

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/Abhinav-pyth/Banking_assistant'

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