Create programmable tools with MCP server for clocks, notes, calculations, and real-time currency exchange integration
This project showcases an MCP (Model Context Protocol) server integrated with the FastMCP framework, providing a set of interactive tools and resources designed to work seamlessly with AI applications such as Claude Desktop. The server includes core functionalities like arithmetic operations, real-time currency exchange rate fetching, and note-taking features—each tailor-made for easy invocation via both programmatic calls or natural language instructions.
The core of this project lies in its ability to expose programmable tools and resources through a standardized Protocol. This makes it incredibly versatile for integrating with various AI platforms, including Claude Desktop, Continue, Cursor, and more. The server demonstrates a range of capabilities leveraging the mcp (Modular Claude Protocol) framework:
Arithmetic Tools: Capable of performing basic mathematical operations like addition, subtraction, multiplication, and division, all with robust error handling.
Currency Exchange Tool: Utilizes an external API to provide real-time currency exchange rates. This feature can be invaluable for applications requiring international financial transactions.
Sticky Notes Tool: Allows users to save, read, and summarize notes locally stored in a notes.txt
file. This tool is particularly useful for quick data management tasks and reminders within AI-driven workflows.
The project not only serves as a foundational building block but also acts as an exemplar of how AI application developers can leverage the MCP to create modular, highly integrated tools.
To understand how this server functions, consider the following Mermaid diagram illustrating the flow of communication between different components during a typical user interaction:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
The following Mermaid diagram provides a visual representation of the data flow and architecture within the server:
graph TD
A[User Request] --> B[MCP Client]
B --> C[MCP Server]
C --> D[Local Storage (Notes)]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
In this scenario, the server can be configured to connect with financial APIs via MCP. Users could perform real-time currency conversions and manage their portfolios by querying the server through natural language or programmatic commands.
Technical Implementation
import httpx
from mcp import run_tool
# Example function to fetch currency exchange rates using httpx
async def get_exchange_rate(base_currency, target_currency):
async with httpx.AsyncClient() as client:
response = await client.get(f'https://api.exchangerate-api.com/v4/latest/{base_currency}')
data = response.json()
return data['rates'][target_currency]
The server can act as a central hub for team collaboration, allowing members to easily save and recall notes using the sticky notes tool. This could be part of the broader infrastructure supporting AI-driven productivity tools.
Technical Implementation
def add_note(note_content):
with open('notes.txt', 'a') as file:
file.write(f"{note_content}\n")
def read_notes():
with open('notes.txt', 'r') as file:
return file.read()
Before you begin, ensure that the following dependencies are installed:
cli
and server
extras)You can install these tools using pip:
pip install -r requirements.txt
Clone the git repository.
Navigate to the project directory.
Install necessary packages:
uv update
Run the server:
npx cli run --tool [name]
The MCP Server with Claude Desktop – Interactive Tool API Demo
serves numerous use cases in AI workflows, making it a robust platform for developers aiming to integrate modular tools across AI applications. Key benefits include:
Enhanced Collaboration: Allows team members to seamlessly share and manage notes within an AI-driven environment.
Real-time Data Fetching: Utilizes external APIs like Exchangerate-API for up-to-date financial information, ensuring accuracy in dynamic scenarios.
User-friendly Interface: Facilitates quick access to tools through both programmatic calls or natural language prompts, enhancing the user experience for AI applications.
The server is compatible with multiple MCP clients, including but not limited to:
Claude Desktop: Full compatibility ensuring smooth interaction.
Continue: Also supports full-feature integration without issues.
Cursor: Only supports tool execution, indicating partial support for the protocol.
For developers looking to leverage these tools in their AI applications, the server offers a flexible and reliable platform.
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
Here’s a sample configuration for setting up the server:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
To ensure the server remains secure, you can implement authentication and authorization measures in conjunction with the mcp protocol. This might include setting up an API key for secure communication.
A1: Follow the instructions provided in the README to set up Python 3.9+, uv
, mcp
(with cli
and server
extras), and httpx
.
A2: Currently, it supports integration with Claude Desktop and Continue fully but only tools for Cursor.
A3: Yes, you need an API key from exchangerate-api.com
for full functionality. Follow the README instructions to obtain and add it to your environment variables.
A4: Implement robust error handling mechanisms like try-except blocks or custom error classes to manage errors effectively during calculations.
A5: Yes, the implementation includes basic security such as secure API key usage and can be further enhanced with additional authentication and authorization methods.
Contributions are welcome from individuals who wish to improve or expand upon this project. Please adhere to the following guidelines:
If you’re interested in contributing, please reach out on GitHub for more information under our "Issues" tab.
For developers building AI applications and MCP integrations, this project provides a blueprint. Explore the broader MCP ecosystem at GitHub for additional resources and community-driven projects.
AI Vision MCP Server offers AI-powered visual analysis, screenshots, and report generation for MCP-compatible AI assistants
Analyze search intent with MCP API for SEO insights and keyword categorization
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases
Connects n8n workflows to MCP servers for AI tool integration and data access