npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jsynowiec/mcp-server-airly

v0.1.3

Published

An MCP server for querying Airly air quality data

Downloads

340

Readme

Airly MCP Server

Sponsor License

An MCP server that integrates the Airly API, enabling natural language interaction with air quality data. Query real-time measurements, find nearby stations, and get air quality forecasts through any MCP-compatible client.

API Token

An Airly API token is required. Set it using the AIRLY_API_TOKEN environment variable.

Installing

npx (Node.js)

{
  "mcpServers": {
    "airly": {
      "command": "npx",
      "args": ["-y", "@jsynowiec/mcp-server-airly"],
      "env": {
        "AIRLY_API_TOKEN": "your-api-token"
      }
    }
  }
}

bunx (Bun)

{
  "mcpServers": {
    "airly": {
      "command": "bunx",
      "args": ["--bun", "@jsynowiec/mcp-server-airly"],
      "env": {
        "AIRLY_API_TOKEN": "your-api-token"
      }
    }
  }
}

Local development

Build the project first, then point your MCP client at the local build output:

{
  "mcpServers": {
    "airly": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-server-airly/dist/index.js"],
      "env": {
        "AIRLY_API_TOKEN": "your-api-token"
      }
    }
  }
}

Configuration

| Variable | Required | Default | Description | |---|---|---|---| | AIRLY_API_TOKEN | Yes | | Airly API key | | AIRLY_DEFAULT_LATITUDE | No | | Default latitude (decimal degrees) | | AIRLY_DEFAULT_LONGITUDE | No | | Default longitude (decimal degrees) | | AIRLY_LANGUAGE | No | en | Response language (en or pl) |

Default coordinates must be set together. When configured, location-based tools use them as a fallback when the LLM doesn't provide coordinates.

Tools

get_measurement

Get interpolated air quality measurements for any location. Returns current pollutant concentrations, air quality index with health advice, and WHO standard compliance. Includes 24-hour history and forecast.

get_nearest_installation

Find the nearest air quality monitoring stations to a given location, sorted by proximity. Returns station metadata including address, coordinates, and sensor type.

get_installation_measurements

Get measurements from a specific station by its installation ID. Same response format as get_measurement.

get_installation

Get metadata for a specific monitoring station.

Resources

| URI | Description | |---|---| | airly://meta/indexes | Air quality index types and level definitions | | airly://meta/measurements | Measurement types with labels and units | | airly://meta/standards | Air quality standards and pollutant limits |

Resources are cached for the session lifetime.

Prompts

| Prompt | Description | |---|---| | check_air_quality | Check current air quality at a location | | air_quality_forecast | Get the 24-hour air quality forecast | | find_nearest_station | Find nearby monitoring stations |

Development

Prerequisites

Setup

bun install
bun run build

Scripts

bun run build       # Compile TypeScript
bun run lint        # Run ESLint
bun run typecheck   # Type-check without emitting
bun run test        # Run tests
bun run dev:test    # Run tests in watch mode

Testing with MCP Inspector

AIRLY_API_TOKEN=your-token npx @modelcontextprotocol/inspector node dist/index.js

Release

The prepublishOnly script automatically runs build, lint, type-check, and tests before npm publish:

npm publish --access public

Disclaimer

This project is not affiliated with, endorsed by, or associated with Airly in any way. It is an independent, open-source integration built on the publicly available Airly API.

License

Released under the MIT License.