Investec API MCP Server
This is a Model Context Protocol (MCP) server that provides tools for interacting with the Investec SA Private Banking API.
Design Philosophy
This MCP server has been intentionally designed with simplicity in mind. The entire implementation is contained in a single file (server.py) without unnecessary abstractions or layers. This approach was deliberately chosen for security reasons to make it easy to audit and review the full codebase without exessive effort.
Installation
- Clone this repository
- Install dependencies using the
uvpackage manager:# Install uv if you don't have it yet curl -sSf https://astral.sh/uv/install.sh | bash # Create virtual environment and activate it uv venv source .venv/bin/activate # Install dependencies uv sync - Create your environment file from the example:
cp .env.example .env - Edit the
.envfile and add your Investec API credentials:CLIENT_ID=your-client-id CLIENT_SECRET=your-client-secret API_KEY=your-api-key USE_SANDBOX=true # or false for production TIMEOUT=30 # seconds
Running the Server
Test the server by running it using:
python server.py
Compatible MCP Clients
This server implements the Model Context Protocol (MCP) and can be used with any compatible client. Some recommended clients include:
- Claude Desktop App - Anthropic's desktop client with full MCP support
- Cursor - An AI-native code editor with MCP tools support
For a full list of compatible clients, visit the MCP Clients page.
Connecting to Claude Desktop
To connect this MCP server to Claude Desktop:
- Download and install Claude Desktop
- Configure Claude Desktop to use this MCP server by editing the configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%AppData%\\Claude\\claude_desktop_config.json - Add the server configuration:
- macOS:
{
"mcpServers": {
"investec-banking": {
"command": "~/.local/bin/uv",
"args": [
"--directory",
"/path/to/mcp-investec-sapb-simple",
"run",
"server.py"
]
}
}
}
For macOS users, this configuration:
- Uses the uv CLI tool to run the Python script
- Specifies the project directory with
--directory - Runs the server directly with
run server.py
- Save the file and restart Claude Desktop
- You should now see the Investec tools available in Claude
For more detailed instructions, see the MCP Quickstart Guide.
Connecting to Cursor
Alternatively, you can use Cursor as your MCP client:
- Download and install Cursor
- Open Cursor and follow their MCP integration instructions
Available Tools
The server provides the following tools:
Account Information
get_accounts: Get a list of accountsget_account_balance: Get the balance of a specific accountget_account_transactions: Get transactions for a specific accountget_pending_transactions: Get pending transactions for a specific accountget_profiles: Get a list of profilesget_profile_accounts: Get accounts for a specific profile
Beneficiaries
get_beneficiaries: Get a list of beneficiariesget_beneficiary_categories: Get a list of beneficiary categoriesget_profile_beneficiaries: Get beneficiaries for a specific profile and accountget_authorisation_setup_details: Get authorisation setup details
Transfers
transfer_multiple: Transfer funds to one or multiple accountspay_multiple: Pay funds to one or multiple beneficiaries
Documents
get_documents: Get a list of documents for a specific accountget_document: Get a specific document
Contributing
Contributions are welcome to improve this MCP server. Beyond bug fixes, key areas for enhancement include:
- Error handling refinements
- Logging improvements
- Test coverage expansion
- Documentation enhancements
- Supporting credential retrieval from keyvaults or other secure sources
- Anything else that you consider to be needed or valuable
Please submit a pull request with your improvements.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommend MCP Servers 💡
alpaca-mcp-server
Alpaca's official MCP server enables LLMs to interact with Alpaca's Trading API for stock and options trading, portfolio management, and real-time market data access using natural language.
payup
A personal MCP server designed to replace Splitwise for managing trip expenses.
Trade Agent MCP Server
Guide to connect to Trade It's MCP server and trade stocks and crypto
Veenoway/monad-mcp-server
A MCP server for interacting with the Monad blockchain, providing DeFi tools and blockchain functionalities.
mcp-yfinance-server
Real-time stock API with Python, MCP server example, yfinance stock analysis dashboard
Octagon
Real-Time Market Intelligence for AI. Instant access to public & private market data through one simple API