About MCP Server
A basic MCP server example for developers exploring the protocol. It demonstrates tools and resources, including arithmetic and weather tools.
Key features
- 01Addition and subtraction tools
- 02Weather report tool
- 03MCP server and client example
- 04Resource support
Use cases
- 01Learning core MCP server concepts
- 02Testing arithmetic tool calls
- 03Trying a weather tool in an MCP client
MCP support
Implements an MCP server and demonstrates MCP client functionality. It exposes tools and resources to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Server
This is a basic example of a Model Context Protocol (MCP) server implementation that demonstrates core functionality like MCP server and MCP client also including tools and resources.
Features
The server implements the following features:
Tools
add(a: int, b: int): Adds two numberssubtract(a: int, b: int): Subtracts second number from firstWeather: Gives the weather report of a particular place
Project Structure
mcpserver: Main server implementation with tools and resources.pyproject.toml: Project configuration and dependencies
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.