home / mcp / banking assistant mcp server
Banking Chatbot with MCP Integration
Configuration
View docs{
"mcpServers": {
"abhinav-pyth-banking_assistant": {
"command": "python",
"args": [
"mcp_server.py"
],
"env": {
"ENDPOINT_URL": "your_azure_endpoint",
"DEPLOYMENT_NAME": "your_deployment_name",
"AZURE_OPENAI_API_KEY": "your_api_key"
}
}
}
}You will set up and run an MCP-enabled banking chatbot that uses a secure Model Context Protocol for messaging and Azure OpenAI for AI responses. This server coordinating the MCP client and the Flask UI lets you securely exchange messages, log interactions, and present bank information in real time.
To use this MCP-enabled banking assistant, start the MCP server first, then run the web interface. Your client will connect via MCP to send user messages and receive AI responses, with detailed logging and bank data displayed in the chat.
python mcp_server.py
```
```
python app.pyPrerequisites include Python 3.8 or higher and access to Azure OpenAI. You will install dependencies in a virtual environment and provide credentials for the OpenAI endpoint.
# Prerequisites
python --version
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create configuration file with credentials
```
```
# Example .env content
ENDPOINT_URL=your_azure_endpoint
AZURE_OPENAI_API_KEY=your_api_key
DEPLOYMENT_NAME=your_deployment_nameThe server relies on environment variables to connect to Azure and manage MCP communications. You will provide the endpoint, API key, and deployment name in a .env file at the project root.
To run the server and interface, use the exact commands below in separate terminals.
Sensitive information such as API keys is stored in the .env file and is not exposed in the UI. The MCP setup ensures secure message transmission, input validation, and comprehensive logging of client messages and server activity.
The chatbot displays bank information including business hours, branch locations, available services, contact details, and support channels. It supports Markdown for rich formatting and maintains detailed logs for debugging and auditing.
To add features or adjust AI behavior, update the bank information data structure and system messages, and extend the MCP client handlers as needed.
If you need to verify MCP functionality, you can run a test client and clear logs between tests.
Enables secure message transmission and queuing between the MCP client and server with detailed logging and reliable delivery.
Orchestrates user messages to Azure OpenAI and formats responses for the chat UI using MCP.
Provides dynamic display of bank hours, branches, services, and contact channels within the chat.