Currency Agent MCP Server

Currency Agent MCP Server

MCP server for currency conversion with real-time exchange rates via the Frankfurter API. Enables agents to retrieve latest currency data and perform conversions.

Category
访问服务器

README

Currency Agent

An AI agent implementation built on Google Cloud, featuring MCP (Model Context Protocol) for tool integration, ADK (Agent Development Kit) for orchestration, and A2A (Agent-to-Agent) protocol for inter-agent communication.


Setup & Google Cloud Configuration

1. Authenticate & Verify Project

Open the Cloud Shell and verify your active account:

gcloud auth list

Display the active Google Cloud project ID:

gcloud config list project

2. Configure Environment Variables

Export your Project ID to an environment variable and configure gcloud:

export PROJECT_ID="<YOUR_PROJECT_ID>"
gcloud config set project $PROJECT_ID

3. Enable Required Google Cloud APIs

Enable all required Google Cloud service APIs for the project:

gcloud services enable \
  cloudresourcemanager.googleapis.com \
  servicenetworking.googleapis.com \
  run.googleapis.com \
  cloudbuild.googleapis.com \
  artifactregistry.googleapis.com \
  aiplatform.googleapis.com \
  compute.googleapis.com

Installation & Local Setup

This project requires Python 3.10+. Verify your Python version in Cloud Shell:

python3 --version

1. Clone the Repository

Clone the repository to your environment:

git clone https://github.com/jackwotherspoon/currency-agent.git
cd currency-agent

2. Install Dependency Manager (uv)

This project uses uv to manage Python dependencies. Install uv using the following curl command:

curl -LsSf https://astral.sh/uv/install.sh | bash

To verify the installation in a new terminal, check the version and executable location:

uv --version
which uv

3. Configure Environment Variables

Create and configure your .env file to supply the necessary variables:

echo "GOOGLE_GEN_AI_USE_VERTEXAI=True" >> .env \
  && echo "GOOGLE_CLOUD_LOCATION=us-central1" >> .env \
  && echo "GOOGLE_CLOUD_PROJECT=$PROJECT_ID" >> .env

Verify that the .env file has been populated correctly:

cat .env

Running and Testing the Server Locally

1. Start the MCP Server

Run the following command in your Cloud Shell terminal to start the server:

uv run mcp-server/server.py

2. Test the MCP Server

Open a new Cloud Shell terminal and run the test script. This will query the server's API and output the result:

uv run mcp-server/test_server.py

Deployment to Google Cloud Run

To make the tool permanent, reliable, and benefit from automatic scaling, deploy the MCP server to Google Cloud Run.

1. Deploy the Service

Stop the local server and run the following deployment command from within the mcp-server directory:

gcloud run deploy mcp-server \
  --no-allow-unauthenticated \
  --region=us-central1 \
  --source .

[!IMPORTANT] The --no-allow-unauthenticated flag is critical for security. It ensures that only authorized accounts can access the deployed server.

2. Authenticate and Proxy Deployed Calls

To securely access and test the live Cloud Run service locally, start a local proxy tunnel:

gcloud run services proxy mcp-server --region=us-central1

This establishes a secure tunnel between your local machine (or Cloud Shell) and the Cloud Run service.

alt text

3. Test the Deployed Service

With the proxy running, open a new Cloud Shell terminal and run the test script:

uv run mcp-server/test_server.py

4. View Deployment Logs

To monitor the service and verify requests, stream the logs from the command line:

gcloud run services logs read mcp-server --region=us-central1 --limit=5

alt text

You are now ready to build and run agents interacting with your deployed tools!


External APIs & Data Sources

Currency Converter Endpoint

The agent utilizes the Frankfurter API for real-time exchange rates:

  • Endpoint: https://api.frankfurter.dev/v2/latest
  • Sample Request:
    GET https://api.frankfurter.dev/v2/latest?base=USD&symbols=INR,EUR
    

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选