Overview
The Currency Converter MCP Server is a production-grade, TypeScript service that exposes currency conversion to any Model Context Protocol (MCP) client. It fetches live exchange rates from the Free Currency API and supports both real-time and historical conversions, with a single tool, a currencies resource, and an interactive prompt.
Built on the MCP v2 SDK, the server is fully stateless and runs in three modes: stdio for local desktop clients, Streamable HTTP for remote clients, and a managed AWS Lambda deployment via the Serverless Framework v4’s native mcp: property. It is published to npm (@alcorme/mcp-currency-converter) and continuously deployed to AWS through a fully automated GitHub Actions pipeline — every push to master is built, tested, deployed, and released.
Features
- MCP v2 SDK compliant — stateless server with no session handshake, built on
@modelcontextprotocol/serverand@modelcontextprotocol/node - Three transports — Stdio, Streamable HTTP, and a managed AWS Lambda endpoint (Serverless Framework v4 native
mcp:) - Real-time & historical conversion — live exchange rates or a specific date via the
dateparameter - Resource management — list supported currencies through the
list-currenciesresource - Prompt capability — interactive prompts for dynamic input
- Production CI/CD — GitHub Actions with OIDC auto-deploys to AWS and semantic-release publishes to npm
- Optimized packaging — esbuild bundles the Lambda entry into a single ~1 MB self-contained file
- Unit testing — comprehensive Vitest-powered test suite
- Type safety — strict TypeScript throughout
- Efficient dependency management — pnpm
System Design
The MCP Currency Converter Server is designed to comply with the Model Context Protocol (MCP) specification. It supports multiple transport mechanisms, including Stdio, HTTP, and Server-Sent Events (SSE), ensuring flexibility and compatibility with various client implementations. The server is built with modularity and scalability in mind, leveraging TypeScript for type safety and maintainability. Key components include:
- Transport Layer: Handles communication via Stdio, HTTP, and SSE.
- Tool Management: Provide tool to find the currency conversion amount.
- Resource Management: Provides resource to list supported currencies and manage resources dynamically.
- Prompt Handling: Supports interactive prompts for dynamic input and processing.
- Testing and Validation: Includes comprehensive unit tests powered by Vitest to ensure reliability.
- Package Management: Utilizes pnpm for efficient dependency management and faster builds.
Note: The diagram above shows the original SSE transport. SSE is now deprecated in favor of the MCP v2 Streamable HTTP transport, which the server implements today alongside Stdio and the managed AWS Lambda endpoint.
AWS Deployment (Serverless Framework v4)
The server is deployed as a managed MCP server on AWS Lambda using the Serverless Framework v4’s native mcp: property — no custom infrastructure code required. The Framework owns the entire serving layer:
- Managed REST endpoint — API Gateway is provisioned automatically; the server is served at
https://<api-id>.execute-api.us-west-2.amazonaws.com/prod/currency-converter/mcp - Streamable HTTP transport — the Framework bridges its streaming runtime to the server’s web-standard
fetchhandler, with regional endpoints that keep response streams alive through ~5 minutes of silence - Per-server configuration — timeout and environment variables (e.g.
FREE_CURRENCY_API_KEY) are declared declaratively inserverless.yml - Optimized packaging — the Lambda entry is esbuild-bundled into a single self-contained ~1 MB file, with
node_modulesexcluded from the package - Fully automated CI/CD — GitHub Actions assumes an AWS OIDC role, builds, tests, and deploys on every push to
master
How to use?
This server is compatible with any MCP client. I have primarily tested it with Claude Desktop and VS Code Copilot.
- Claude Desktop: Works only with the STDIO transport.
- VS Code Copilot: Works with both STDIO and HTTP transports.
- OpenCode: Works with both STDIO and HTTP transports.
- Any MCP client: Can connect to the hosted AWS endpoint over HTTP — the server is deployed to AWS Lambda and served at
https://<api-id>.execute-api.us-west-2.amazonaws.com/prod/currency-converter/mcp. - npm: Install directly with
npx -y @alcorme/mcp-currency-converter— no local build needed.
For detailed integration instructions, please refer to the GitHub repository.