Skip to main content

A weather application using MCP

Project description

Weather001 MCP Application

A simple weather application built with the Model Context Protocol (MCP).

Installation

To install and run this application, you need Python 3.8 or later.

Using uvx

uvx weather001

Using pip

pip install weather001

Local Development

  1. Clone the repository:

    git clone <repository-url>
    cd weather001
    
  2. Install in development mode:

    pip install -e .
    
  3. Run the application:

    weather001
    

Usage

This application provides a simple weather tool that can be used in MCP-compatible environments.

Tools

  • get_weather: Get weather information for a specific location
    • Arguments:
      • location (string, required): The location for which to get weather information

Example

{
  "tool": "get_weather",
  "arguments": {
    "location": "北京"
  }
}

Publishing to PyPI

To publish this package to PyPI, follow these steps:

  1. Create accounts on PyPI and TestPyPI:

  2. Install build tools:

    pip install build twine
    
  3. Build the package:

    python -m build
    
  4. Upload to TestPyPI first (recommended):

    twine upload -r testpypi dist/*
    
  5. If everything works, upload to PyPI:

    twine upload dist/*
    

Dependency Notes

This project requires pydantic>=1.5.0 to ensure compatibility with various environments. The direct dependency on pydantic has been relaxed from >=2.0.0 to >=1.5.0 to address compatibility issues in some environments where only older versions of pydantic are available.

The fastmcp library, which this project depends on, is compatible with both pydantic 1.x and 2.x, so this change should not affect functionality.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weather001-0.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weather001-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file weather001-0.1.1.tar.gz.

File metadata

  • Download URL: weather001-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for weather001-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2c05ad0835003038b671f7ce254bc3274d1af1d39adf5fea9ccdcff6917666b4
MD5 17e72314d40f1bb2fb18535767c25b5e
BLAKE2b-256 9a78b5e696e93f3f7a3e0ab2de8b1b229612777de5cc548a68baeacf26b68490

See more details on using hashes here.

File details

Details for the file weather001-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: weather001-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for weather001-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4747fbf9c66057217489cee23b0b9a4d2c598e4d0f1478f0b9989e2b84573465
MD5 c1d026fc8a4d9f0875774c011ef87112
BLAKE2b-256 85cadeb66734bef9f2342bdf1e5d043a6dfd3e545bd166798cbcf1886fda7376

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page