OpenBanking MCP Server
Integrates with local Ollama LLM instances to power four specialized agents (Market Analyst, Portfolio Manager, Risk Analyst, and Explainability Agent) for OpenBanking applications. Supports configuration of models like Llama 3.2 and Gemma3 for different agent roles.
Leverages Python as the runtime environment for the MCP server, requiring Python 3.8+ with a conda environment for execution of the OpenBanking functionality.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenBanking MCP Serveranalyze my portfolio's risk exposure to tech stocks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenBanking MCP Server
An MCP (Model Context Protocol) server that integrates with local Ollama LLMs for OpenBanking applications.
Features
Multiple LLM Agents: Support for 4 different specialized agents
Ollama Integration: Local LLM model support
Tool System: Comprehensive toolset for various operations
OpenBanking Focus: Specialized tools for banking and financial data
Related MCP server: Ollama MCP Proxy
Architecture
This MCP server follows the architecture shown in the diagram:
MCP Host communicates with MCP Server
4 Specialized Agents (Agent 1-4) with LLM/Model capabilities
Tool system for specific operations
Banking Services/API integration
Agents
Agent 1 - Market Analyst: Market data analysis and volatile situations
Agent 2 - Portfolio Manager: Portfolio management and strategy finding
Agent 3 - Risk Analyst: Risk analysis for users
Agent 4 - Explainability Agent: LLM for explainability and SWOT analysis
Project Structure
mcpOpenbankingMCPServer/
├── src/
│ ├── __init__.py
│ ├── main.py # Main server entry point
│ ├── agents/
│ │ ├── __init__.py
│ │ └── agent_manager.py # Agent management system
│ ├── tools/
│ │ ├── __init__.py
│ │ ├── tool_registry.py # Tool registration and management
│ │ ├── portfolio_tools.py # Portfolio analysis tools
│ │ ├── market_tools.py # Market data tools
│ │ ├── risk_tools.py # Risk assessment tools
│ │ ├── strategy_tools.py # Strategy recommendation tools
│ │ └── analysis_tools.py # SWOT and explanation tools
│ ├── config/
│ │ ├── __init__.py
│ │ └── config.py # Configuration management
│ └── utils/
│ ├── __init__.py
│ └── utils.py # Utility functions
├── config/
│ └── config.yaml # Server configuration
├── requirements.txt # Python dependencies
├── startup.py # Python startup script
├── start_server.ps1 # PowerShell startup script
├── start_server.bat # Batch file for Windows
├── demo.py # Demo examples
├── test_server.py # Test script
└── README.md # This filePrerequisites
Python 3.8+ with conda environment
Ollama installed and running locally
Conda environment named
openbanking-backend
Setup
1. Create Conda Environment (if not exists)
conda create -n openbanking-backend python=3.11
conda activate openbanking-backend2. Install Dependencies
pip install -r requirements.txt3. Install and Start Ollama
Download and install Ollama from https://ollama.ai
# Pull a model (example with Llama 3.2)
ollama pull llama3.2:latest
# Start Ollama server
ollama serve4. Configure the Server
Edit config/config.yaml to customize:
Ollama connection settings
Agent configurations
Model assignments
Tool settings
Running the Server
Option 1: Using PowerShell Script (Recommended for Windows)
.\start_server.ps1Option 2: Using Python Startup Script
python startup.pyOption 3: Direct Execution
conda activate openbanking-backend
python src/main.pyOption 4: Development Mode
python src/main.py --devTools Available
Portfolio Analysis
analyze_portfolio: Comprehensive portfolio analysisportfolio_optimization: Portfolio allocation optimization
Market Analysis
market_analysis: Current market conditions analysisvolatility_analysis: Market volatility assessment
Risk Assessment
assess_risk: User-specific risk assessmentrisk_simulation: Scenario-based risk simulation
Strategy Recommendations
recommend_strategy: Investment strategy recommendations
Analysis & Explainability
swot_analysis: SWOT analysis for any subjectexplain_concept: Explain financial concepts simplyreverse_simulation: Reverse engineering analysis
Usage Examples
Run Demo
python demo.pyTest the Server
python test_server.pyConfiguration
The server uses config/config.yaml for configuration. Key sections:
# Ollama connection
ollama:
host: "localhost"
port: 11434
timeout: 30
# Agents configuration
agents:
- name: "market_analyst"
model: "gemma3:4b"
role: "Market Data Analyst"
# ... more config
# Tools configuration
tools:
- name: "portfolio_analysis"
enabled: trueTroubleshooting
Common Issues
Ollama Connection Failed
Ensure Ollama is installed and running (
ollama serve)Check if the default port 11434 is available
Verify models are pulled (
ollama list)
Conda Environment Issues
Make sure
openbanking-backendenvironment existsActivate the environment before running
Install dependencies in the correct environment
Import Errors
Ensure all dependencies are installed
Check Python path and working directory
Logs
Check the console output for detailed error messages and debugging information.
Development
Adding New Tools
Create tool class in
src/tools/Add tool registration in
tool_registry.pyUpdate configuration if needed
Adding New Agents
Add agent configuration in
config/config.yamlImplement custom agent logic if needed
Test with demo scripts
License
MIT License
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
MCP server for AI dialogue using various LLM models via AceDataCloud
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that provides AI agents with financial tools including real-time quotes, backtesting, technical analysis, and multi-exchange data via a simple CLI interface.1MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP proxy server that bridges MCP clients with Ollama local language models, providing advanced features like RAG integration, context management, caching, and production-ready security.1MIT
- FlicenseNot gradedqualityDmaintenanceTurns financial documents into AI-generated investment briefs by exposing banking tools like search financials, compare companies, and risk flagging as an MCP server, allowing an LLM agent to discover and use them dynamically.3-
- AlicenseBqualityCmaintenanceAn enhanced MCP server that provides financial data and analysis tools for stocks, crypto, precious metals, and more, empowering AI agents with professional financial intelligence, including backtesting, ASCII charts, and simulated portfolios.586MIT