smhi-mcp-server: Instructions file for Claude Code

CLAUDE.md

smhi-mcp-server CLAUDE.md is an instructions file for Claude Code from LittleAndi/smhi-mcp-server. It costs 1,656 tokens per session, scanned B, original, MIT.

A set of Claude Code instructions for a server that provides Swedish weather data from SMHI, Sweden’s national meteorological institute. It documents the project’s commands, structure, tests, and release process.

In plain words
What is it for?
Use it when developing, testing, building, or releasing the smhi-mcp-server project.
Why use it?
It gives a coding agent the project-specific rules needed to work on the server consistently.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; reads ~/.codex paths.

This is LittleAndi/smhi-mcp-server's own configuration. It tells Claude Code how to work on smhi-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything smhi-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LittleAndi/smhi-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LittleAndi/smhi-mcp-server/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/LittleAndi/smhi-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for smhi-mcp-server CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/littleandi/smhi-mcp-server/claude-md/github.svg)](https://agentmods.dev/instructions/littleandi/smhi-mcp-server/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/littleandi/smhi-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/littleandi/smhi-mcp-server/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for smhi-mcp-server CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/littleandi/smhi-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/littleandi/smhi-mcp-server/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,656 This file is loaded in full into every session.
When invoked 1,656 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01656 $0.01656
Opus 5.5 $0.00662 $0.00662
Sonnet 5.5 $0.00331 $0.00331
Haiku 4.5 $0.00166 $0.00166

Measured 2mo ago against content hash ea816886594c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

smhi-mcp-server CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

This machine also has a Codex config (`~/.codex/config.toml`) and a Gemini CLI config (`~/.gemini/`, `GEMINI.md`) at the user level. If you want to bring over MCP servers, slash commands, or instructions from those into
CLAUDE.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

An MCP (Model Context Protocol) server exposing SMHI (Swedish Meteorological and Hydrological Institute) weather data as tools, built against SMHI's current snow1g point-forecast API. SMHI retired the older pmp3g API on 2026-03-31; this is a fresh implementation, not a migration.

Commands

npm install
npm run typecheck      # tsc --noEmit
npm test                # vitest run (all tests, single run)
npm run test:watch      # vitest (watch mode)
npm run test:coverage   # vitest run --coverage
npm run build            # tsc -> dist/
npm start                 # node dist/index.js

Run a single test file: npx vitest run src/__tests__/tools.test.ts Run tests matching a name: npx vitest run -t "getFireRisk"

CI (.github/workflows/ci.yml) runs on Node 20.x/22.x/24.x: npm ci, npm run typecheck, npm test, npm run build. Match this locally before pushing.

Architecture

Request flow: src/index.ts (MCP server, stdio transport) → tool module in src/tools/*.ts (zod schema + handler) → src/smhi-client.ts (fetches SMHI APIs, shapes raw responses) → lookup tables (weather-symbols.ts, fire-risk-classes.ts) for human-readable descriptions.

Adding a new tool touches four places:

  1. src/smhi-client.ts — fetch function against the relevant SMHI API/category, plus a converter from the raw SMHI shape to a processed type.
  2. src/types.ts — raw API response types and processed output types for the new data.
  3. src/tools/<name>.ts — zod input schema (z.object with .describe() on each field) + async handler calling the client function. Exports the schema, the handler, and the inferred input type.
  4. src/tools/index.ts — re-export the new schema/handler/type.
  5. src/index.ts — call server.registerTool(name, { description, inputSchema, annotations: { title, ...READONLY_ANNOTATIONS } }, handler), passing the zod schema straight through as inputSchema (it doubles as the wire-format JSON Schema, generated automatically) and wrapping the handler in withErrorHandling unless it needs a non-JSON content block (see get_radar_image, which returns an image block alongside text and so wires its own try/catch).

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 65 lines · 1,656 tokens per session scan B ea816886594c

Subscribe to this mod's changes

smhi-mcp-server CLAUDE.md is an instructions file published in the GitHub repository LittleAndi/smhi-mcp-server (1 stars, last pushed 23d ago), licensed MIT. It adds 1,656 tokens to every session, about $0.0066 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

smhi-mcp-server CLAUDE.md compared with instructions from other repositories

smhi-mcp-server CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
smhi-mcp-server CLAUDE.mdLittleAndi/smhi-mcp-serverInstructions file123d agoMITB1,656Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot
generative-ai-for-beginners AGENTS.mdmicrosoft/generative-ai-for-beginnersInstructions file124ktodayMITA2,981Codex, OpenCode