Rabobank Demo MCP Server
Demonstrates how to expose approved internal banking tools to AI assistants via MCP, enabling secure lookups of account balances, customer names, branch details, and live exchange rate conversions.
README
Rabobank Demo MCP Server Lab
This project demonstrates how to expose approved internal business functionality to an AI client through MCP.
Goal
Understand how an MCP server works and how AI assistants can securely interact with internal systems through approved tools.
Learning Objectives
- Explain the MCP client-server model.
- Create MCP tools with FastMCP.
- Run an MCP server locally over HTTP.
- Connect GitHub Copilot (Agent mode) to the MCP server.
- Test tool invocation through natural language prompts.
Scenario
In this fictional banking scenario, the MCP server exposes demo operations:
get_account_balance— look up a hardcoded internal account balance.get_customer_name— look up a hardcoded customer name by ID.get_branch_information— look up hardcoded branch details.get_exchange_rate— live rate from a currency to EUR (uses ExchangeRate-API).get_live_exchange_rate— live rate between any two currencies (defaults target to EUR).convert_currency— convert an amount between two currencies at the live rate.
Prerequisites
1. Install uv
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS (Homebrew):
brew install uv
macOS (official script):
curl -LsSf https://astral.sh/uv/install.sh | sh
Verify installation:
uv --version
Optional Python install via uv:
uv python install 3.12
2. Create a new MCP project (already done in this repo)
uv init first-mcp-server
cd first-mcp-server
3. Add dependencies (already done in this repo)
uv add fastmcp httpx python-dotenv
Exchange Rate API Setup
The get_exchange_rate, get_live_exchange_rate, and convert_currency tools call
ExchangeRate-API for live rates. They need an API key.
1. Get a free API key
- Sign up at https://app.exchangerate-api.com/.
- Confirm your email and open the dashboard.
- Copy your API key (looks like
1234567890abcdef12345678).
The key is used to build the request URL:
https://v6.exchangerate-api.com/v6/<API_KEY>/latest/<BASE_CURRENCY>
2. Create your .env file
This repo includes an .env.example. Copy it to .env and insert your own key.
Windows (PowerShell):
Copy-Item .env.example .env
macOS / Linux:
cp .env.example .env
Then edit .env:
EXCHANGE_RATE_API_KEY=your_real_key_here
main.py loads this automatically via python-dotenv (load_dotenv()), and .env
is listed in .gitignore so your key is not committed.
Security note:
.env.examplecurrently contains a real-looking key. Treat it as compromised — revoke/rotate it in the ExchangeRate-API dashboard and keep only a placeholder in.env.example. Never commit a real key.
3. Behavior without a key
If EXCHANGE_RATE_API_KEY is missing, the currency tools return:
API key is missing. Set EXCHANGE_RATE_API_KEY as an environment variable.
The account, customer, and branch tools work without any key (they use hardcoded data).
Main Command Flow
- Project setup:
uv init first-mcp-server - Dependency install:
uv add fastmcp - Run server:
uv run fastmcp run main.py:mcp --transport http --port 8000 - VS Code config:
.vscode/mcp.json
Run the MCP Server
Start HTTP transport:
uv run fastmcp run main.py:mcp --transport http --port 8000
The server is running when you see output like:
Uvicorn running on http://127.0.0.1:8000
Leave this terminal open.
If port 8000 is in use, run on 8001:
uv run fastmcp run main.py:mcp --transport http --port 8001
Then update .vscode/mcp.json to use port 8001.
Important Endpoint Note
/mcp is not a normal webpage or REST endpoint. Browsing to it directly can return:
{
"jsonrpc": "2.0",
"id": "server-error",
"error": {
"code": -32600,
"message": "Not Acceptable: Client must accept text/event-stream"
}
}
This is expected. MCP clients use the proper protocol headers.
Connect to VS Code
Open this project folder in VS Code (folder open is required, not a single file).
The project includes:
.vscode/mcp.json
With configuration:
{
"servers": {
"rabobank-demo": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}
Connection steps:
- Open
.vscode/mcp.json. - Click
Startabove the server entry. - Open GitHub Copilot Chat.
- Switch to
Agent mode. - Click the
Select toolsicon (plus icon). - Confirm
rabobank-demoappears with available tools.
Test Prompts
Use prompts like:
What is the balance of account 12345?
What is the name of customer 1001?
Show information about branch BR001.
What is the USD to EUR exchange rate?
What is the live exchange rate from GBP to USD?
Convert 100 USD to EUR.
Demo data available for the prompts above:
- Accounts:
12345,67890 - Customers:
1001(John Smith),1002(Aisha Khan) - Branch:
BR001(Utrecht)
Demo Script
This is a minimal internal MCP server.
It exposes approved tools to an AI client.
The AI assistant cannot directly access internal systems.
It can only call tools that the MCP server exposes.
In this example, approved tools include account, customer, branch, and exchange rate lookups.
Reflection Questions
- Why use an MCP server instead of direct database access from an AI assistant?
- What advantages does MCP provide over hardcoding business logic in prompts?
- What security benefits come from exposing only approved tools?
- Which internal systems in your organization could benefit from MCP?
Key Takeaway
An MCP server is a secure integration layer between AI assistants and internal systems. By exposing carefully designed tools, organizations can provide useful business functionality without directly exposing databases, internal APIs, or sensitive infrastructure.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。