Currency Convert MCP Server

Typescript based scalable MCP server for real-time currency conversion using the Free Currency API.

Tech Stack: modelcontextprotocol/sdk , Typescript , Express , Zod , Semantic Release , Vitest , pnpm

Overview

The Currency Converter MCP Server is a robust and scalable service designed to handle real-time currency conversion requests. It leverages the Free Currency API to fetch the latest exchange rates and provides a seamless interface for converting between various currencies. Built with modern technologies modelcontextprotocol/sdk with Typescript, it ensures high performance and reliability.

Features

  • MCP-compliant server using @modelcontextprotocol/sdk
  • Transport Support: Stdio, HTTP, and SSE
  • Currency Conversion: Real-time exchange rates or mock data
  • Resource Management: List supported currencies via resources
  • Prompt Capability: Interactive prompts for dynamic input
  • Unit Testing: Vitest powered unit testing
  • Type Safety: Built with TypeScript
  • Package Management: Uses pnpm for efficient dependency management

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.
Architecture Design

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.

For detailed integration instructions, please refer to the GitHub repository

View on Github