mcp-server-tools-assignment
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-tools-assignmentWhat's the current weather in New York?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Assignment 2: MCP Server with 5 Tools
This project implements a small Model Context Protocol (MCP) server with five tools and a client that calls them over stdio.
What this project does
The server exposes five tools, each of which makes one GET request to a public API and returns only the relevant fields.
Tool | Input | Public API | Returned data |
|
|
|
|
|
|
|
|
|
|
| base currency + selected rates |
|
|
| list of holiday objects with |
|
|
|
|
The client starts the server as a subprocess, lists the available tools, and calls each tool with sample input.
Related MCP server: ai-mcp
Project structure
mcp-server-tools-assignment/
├── client/
│ └── client.py
├── server/
│ ├── http.py
│ ├── server.py
│ └── tools/
│ ├── country.py
│ ├── dictionary.py
│ ├── exchange.py
│ ├── holidays.py
│ └── weather.py
├── config.py
├── README.md
├── requirements.txt
└── .venv/Setup
cd mcp-server-tools-assignment
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txtRun the server directly
cd mcp-server-tools-assignment
. .venv/bin/activate
python -m server.serverThis starts the MCP server over stdio.
Run the client
cd mcp-server-tools-assignment
. .venv/bin/activate
python client/client.pyThis launches the server, lists the available tools, and calls each tool with sample data.
Notes on behavior
The project uses the
mcpPython package and communicates overstdiotransport.The server and client are separate Python programs.
Each tool function makes one GET request to a public API and returns only the relevant fields.
Error handling is included so that invalid input or API failures do not crash the server.
Section 7 test cases and output
The following are the actual validation calls and representative outputs from the working project.
1) Weather
{'city': 'Mumbai'}Output:
CASE:weather
{'meta': None, 'content': [{'type': 'text', 'text': '{\n "city": "Mumbai",\n "temp_c": 28.0,\n "condition": "Light rain shower",\n "humidity": 78\n}', 'annotations': None, 'meta': None}], 'structuredContent': None, 'isError': False}2) Country info
{'name': 'India'}Output:
CASE:country_info
{'meta': None, 'content': [{'type': 'text', 'text': '{\n "name": "India",\n "capital": "New Delhi",\n "region": "Asia",\n "population": 1380004385,\n "currencies": [\n "INR"\n ],\n "languages": [\n "Hindi",\n "English"\n ]\n}', 'annotations': None, 'meta': None}], 'structuredContent': None, 'isError': False}3) Exchange rates
{'base': 'USD'}Output:
CASE:exchange_rates
{'meta': None, 'content': [{'type': 'text', 'text': '{\n "base": null,\n "rates": {\n "USD": 1,\n "EUR": 0.862295,\n "INR": 95.581563,\n "GBP": 0.738249,\n "JPY": 160.045067,\n "AUD": 1.395915,\n "CAD": 1.389176,\n "SGD": 1.273831\n }\n}', 'annotations': None, 'meta': None}], 'structuredContent': None, 'isError': False}4) Public holidays
{'year': 2025, 'country_code': 'US'}Output:
CASE:public_holidays
{'meta': None, 'content': [{'type': 'text', 'text': '{\n "date": "2025-01-01",\n "localName": "New Year\'s Day",\n "name": "New Year\'s Day"\n}', ... ], 'structuredContent': None, 'isError': False}The output contains multiple holiday records, which confirms the tool is returning a non-empty list.
5) Dictionary lookup
{'word': 'example'}Output:
CASE:define_word
{'meta': None, 'content': [{'type': 'text', 'text': '{\n "word": "example",\n "definitions": [\n {\n "partOfSpeech": "noun",\n "meaning": "A thing characteristic of its kind or illustrating a general rule."\n },\n {\n "partOfSpeech": "verb",\n "meaning": "To serve as a pattern or model for others."\n }\n ]\n}', 'annotations': None, 'meta': None}], 'structuredContent': None, 'isError': False}6) Failure path test
{'word': 'asdfghjkl'}Output:
CASE:define_word
{'meta': None, 'content': [{'type': 'text', 'text': '{\n "word": "asdfghjkl",\n "definitions": [],\n "error": "not found"\n}', 'annotations': None, 'meta': None}], 'structuredContent': None, 'isError': False}This confirms the tool does not crash on a nonsense word; it returns a clean not found response, while valid words return real definitions.
Requirements
mcp<2
requests>=2.31.0Purpose of the assignment
This assignment demonstrates how an MCP server exposes tools, how a client discovers them, and how the client calls them over stdio. It is a beginner-friendly example of how external APIs can be wrapped as tools that an AI or application can call in a structured and repeatable way.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceAggregates multiple third-party APIs into unified MCP tools, providing out-of-the-box access to 10 popular services including OpenWeather, Google Maps, GitHub, Notion, Spotify, and more. Enables users to interact with weather data, search places, manage repositories, create content, and access various web services through a single MCP server.34MIT
- FlicenseAqualityDmaintenanceLightweight MCP server that exposes tools for system information and weather lookup, designed for agent integration via stdio.1
- FlicenseNot gradedqualityDmaintenanceProvides tools for weather, GitHub issues, and Slack messaging to MCP-compatible AI assistants.
- FlicenseNot gradedqualityCmaintenanceAn MCP server that integrates ExchangeRate-API and Open-Meteo to provide currency conversion and weather tools, enabling natural language queries for exchange rates, weather, and geocoding.
Related MCP Connectors
Exchange MCP — wraps the Frankfurter currency exchange API (free, no auth)
Official parseAPI MCP. Place, IP, email, phone, weather, currency lookups.
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nethravathik409-ui/mcp-server-tools-assignment'
If you have feedback or need assistance with the MCP directory API, please join our Discord server