Back to Home
agntcy icon

identity-service

Verified Safe

by agntcy

Overview

Provides currency exchange rate and trading functionalities as an MCP (Model Context Protocol) server, integrating with an Identity Service for authorization and external financial APIs.

Installation

Run Command
cd samples/mcp/currency_exchange && pip install . && python main.py --host 0.0.0.0 --port 9090

Environment Variables

  • CURRENCY_EXCHANGE_API_BASE_URL
  • IDENTITY_SERVICE_API_KEY
  • IDENTITY_SERVICE_GRPC_SERVER_URL

Security Notes

The MCP server uses `IdentityServiceMCPMiddleware` for authentication with the `AGNTCY Identity Service` via an API key, enabling centralized authorization. External API calls for currency exchange are made using `httpx.get` with f-strings to construct URLs, passing `from_currency` and `to_currency` parameters. While these parameters are assumed to be validated as currency codes by the external API, careful input validation within the MCP server itself is crucial to mitigate potential injection risks (e.g., SSRF on the external API if the base URL were user-controlled, or data injection if the external API used these parameters unsafely). There are no apparent uses of `eval` or similar dangerous patterns directly in the provided source code.

Similar Servers

Stats

Interest Score59
Security Score8
Cost ClassLow
Stars60
Forks4
Last Update2025-12-10

Tags

CurrencyExchangeMCP ServerFinancialAPIAuthorization