mcpField
W
weather-mcp-s

weather-mcp-s

Local
github.com/bee1194Media & Design0Updated 81w ago

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

  1. 01Built with mcp-framework
  2. 02Includes an example tool
  3. 03Add tools through the CLI
  4. 04Builds and loads tools

Use cases

  1. 01Learn MCP server development
  2. 02Add custom MCP tools
  3. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

weather-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

  1. Update your package.json:

    • Ensure name is unique and follows npm naming conventions
    • Set appropriate version
    • Add description, author, license, etc.
    • Check bin points to the correct entry file
  2. Build and test locally:

    npm run build
    npm link
    weather-mcp-s  # Test your CLI locally
    
  3. Login to npm (create account if necessary):

    npm login
    
  4. 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

  1. Make changes to your tools
  2. Run npm run build to compile
  3. The server will automatically load your tools on startup

Learn More

Comments

Markdown supported

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.