About weather-mcp-s
weather-mcp-s is an example MCP server built with mcp-framework for people learning MCP tool development. It includes a sample tool and instructions for adding tools and connecting Claude Desktop.
Key features
- 01Built with mcp-framework
- 02Includes an example tool
- 03Add tools through the CLI
- 04Builds and loads tools
Use cases
- 01Learn MCP server development
- 02Add custom MCP tools
- 03Connect to Claude Desktop
MCP support
It is an MCP server that makes tools available to MCP clients. The README shows local configuration with Claude Desktop.
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 READMEweather-mcp-s
A Model Context Protocol (MCP) server built with mcp-framework.
Quick Start
# Install dependencies
npm install
# Build the project
npm run build
Project Structure
weather-mcp-s/
├── src/
│ ├── tools/ # MCP Tools
│ │ └── ExampleTool.ts
│ └── index.ts # Server entry point
├── package.json
└── tsconfig.json
Adding Components
The project comes with an example tool in src/tools/ExampleTool.ts. You can add more tools using the CLI:
# Add a new tool
mcp add tool my-tool
# Example tools you might create:
mcp add tool data-processor
mcp add tool api-client
mcp add tool file-handler
Tool Development
Example tool structure:
import { MCPTool } from "mcp-framework";
import { z } from "zod";
interface MyToolInput {
message: string;
}
class MyTool extends MCPTool<MyToolInput> {
name = "my_tool";
description = "Describes what your tool does";
schema = {
message: {
type: z.string(),
description: "Description of this input parameter",
},
};
async execute(input: MyToolInput) {
// Your tool logic here
return `Processed: ${input.message}`;
}
}
export default MyTool;
Publishing to npm
-
Update your package.json:
- Ensure
nameis unique and follows npm naming conventions - Set appropriate
version - Add
description,author,license, etc. - Check
binpoints to the correct entry file
- Ensure
-
Build and test locally:
npm run build npm link weather-mcp-s # Test your CLI locally -
Login to npm (create account if necessary):
npm login -
Publish your package:
npm publish
After publishing, users can add it to their claude desktop client (read below) or run it with npx
## Using with Claude Desktop
### Local Development
Add this configuration to your Claude Desktop config file:
**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"weather-mcp-s": {
"command": "/absolute/path/to/node",
"args":["/absolute/path/to/weather-mcp-s/dist/index.js"]
}
}
}
After Publishing
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"weather-mcp-s": {
"command": "npx",
"args": ["weather-mcp-s"]
"env": {
"OPENWEATHERMAP_API_KEY": "your_api_key"
}
}
}
}
Building and Testing
- Make changes to your tools
- Run
npm run buildto compile - The server will automatically load your tools on startup
Learn More
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.