@cyanheads/nws-weather-mcp-server 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CLAUDE.md +309 -0
  2. package/Dockerfile +99 -0
  3. package/LICENSE +190 -0
  4. package/README.md +249 -0
  5. package/dist/config/server-config.d.ts +12 -0
  6. package/dist/config/server-config.d.ts.map +1 -0
  7. package/dist/config/server-config.js +19 -0
  8. package/dist/config/server-config.js.map +1 -0
  9. package/dist/index.d.ts +7 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +23 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/mcp-server/resources/definitions/alert-types.resource.d.ts +7 -0
  14. package/dist/mcp-server/resources/definitions/alert-types.resource.d.ts.map +1 -0
  15. package/dist/mcp-server/resources/definitions/alert-types.resource.js +27 -0
  16. package/dist/mcp-server/resources/definitions/alert-types.resource.js.map +1 -0
  17. package/dist/mcp-server/resources/definitions/index.d.ts +6 -0
  18. package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -0
  19. package/dist/mcp-server/resources/definitions/index.js +6 -0
  20. package/dist/mcp-server/resources/definitions/index.js.map +1 -0
  21. package/dist/mcp-server/tools/definitions/find-stations.tool.d.ts +22 -0
  22. package/dist/mcp-server/tools/definitions/find-stations.tool.d.ts.map +1 -0
  23. package/dist/mcp-server/tools/definitions/find-stations.tool.js +60 -0
  24. package/dist/mcp-server/tools/definitions/find-stations.tool.js.map +1 -0
  25. package/dist/mcp-server/tools/definitions/get-forecast.tool.d.ts +33 -0
  26. package/dist/mcp-server/tools/definitions/get-forecast.tool.d.ts.map +1 -0
  27. package/dist/mcp-server/tools/definitions/get-forecast.tool.js +125 -0
  28. package/dist/mcp-server/tools/definitions/get-forecast.tool.js.map +1 -0
  29. package/dist/mcp-server/tools/definitions/get-observations.tool.d.ts +30 -0
  30. package/dist/mcp-server/tools/definitions/get-observations.tool.d.ts.map +1 -0
  31. package/dist/mcp-server/tools/definitions/get-observations.tool.js +177 -0
  32. package/dist/mcp-server/tools/definitions/get-observations.tool.js.map +1 -0
  33. package/dist/mcp-server/tools/definitions/index.d.ts +10 -0
  34. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
  35. package/dist/mcp-server/tools/definitions/index.js +10 -0
  36. package/dist/mcp-server/tools/definitions/index.js.map +1 -0
  37. package/dist/mcp-server/tools/definitions/list-alert-types.tool.d.ts +10 -0
  38. package/dist/mcp-server/tools/definitions/list-alert-types.tool.d.ts.map +1 -0
  39. package/dist/mcp-server/tools/definitions/list-alert-types.tool.js +28 -0
  40. package/dist/mcp-server/tools/definitions/list-alert-types.tool.js.map +1 -0
  41. package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts +51 -0
  42. package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts.map +1 -0
  43. package/dist/mcp-server/tools/definitions/search-alerts.tool.js +242 -0
  44. package/dist/mcp-server/tools/definitions/search-alerts.tool.js.map +1 -0
  45. package/dist/mcp-server/tools/format-utils.d.ts +11 -0
  46. package/dist/mcp-server/tools/format-utils.d.ts.map +1 -0
  47. package/dist/mcp-server/tools/format-utils.js +27 -0
  48. package/dist/mcp-server/tools/format-utils.js.map +1 -0
  49. package/dist/services/nws/nws-service.d.ts +62 -0
  50. package/dist/services/nws/nws-service.d.ts.map +1 -0
  51. package/dist/services/nws/nws-service.js +372 -0
  52. package/dist/services/nws/nws-service.js.map +1 -0
  53. package/dist/services/nws/types.d.ts +96 -0
  54. package/dist/services/nws/types.d.ts.map +1 -0
  55. package/dist/services/nws/types.js +6 -0
  56. package/dist/services/nws/types.js.map +1 -0
  57. package/package.json +82 -0
  58. package/server.json +101 -0
package/CLAUDE.md ADDED
@@ -0,0 +1,309 @@
1
+ # Agent Protocol
2
+
3
+ **Server:** nws-weather-mcp-server
4
+ **Version:** 0.3.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
6
+
7
+ > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
8
+
9
+ ---
10
+
11
+ ## Domain
12
+
13
+ Full design in `docs/design.md`. Key constraints:
14
+
15
+ - **API base:** `https://api.weather.gov` — no auth, but requires a `User-Agent` header (403 without it).
16
+ - **Coordinate-centric:** Most workflows start with `GET /points/{lat},{lon}`, which returns a grid cell with URLs for forecast, hourly forecast, observation stations, and zones. This is the routing layer — follow the returned URLs rather than constructing grid endpoints manually.
17
+ - **Grid caching:** `/points` responses are highly cacheable (grid cells don't change). Cache via `ctx.state` with long TTL to avoid redundant lookups.
18
+ - **Units are metric:** Temperature in Celsius, wind in km/h, pressure in Pa. Convert to readable format in `format()` (show both F/C, mph, inHg/hPa).
19
+ - **No geocoding:** API is coordinates-only. Tools accept lat/lon directly.
20
+ - **Alert quirks:** `/alerts/active` has no `limit` param (returns 400). Filter by area/severity instead.
21
+ - **Transient 500s:** Grid forecast endpoints occasionally fail. Retry with backoff.
22
+ - **Hourly = 156 periods:** Truncate in `format()` to avoid flooding context (next 24-48h, note remainder).
23
+
24
+ ### Tools (5)
25
+
26
+ | Tool | Purpose |
27
+ |:-----|:--------|
28
+ | `nws_get_forecast` | 7-day or hourly forecast for coordinates (resolves grid internally) |
29
+ | `nws_search_alerts` | Active weather alerts filtered by area, point, zone, event, severity |
30
+ | `nws_get_observations` | Current conditions from nearest station (by coordinates or station ID) |
31
+ | `nws_find_stations` | Discover nearby observation stations sorted by proximity |
32
+ | `nws_list_alert_types` | List all valid alert event type names (for `event` filter discovery) |
33
+
34
+ ### Resources (1)
35
+
36
+ | Resource | Purpose |
37
+ |:---------|:--------|
38
+ | `nws://alert-types` | Static list of alert event type names (convenience for resource-capable clients) |
39
+
40
+ ---
41
+
42
+ ## What's Next?
43
+
44
+ When the user asks what to do next, what's left, or needs direction, suggest relevant options based on the current project state:
45
+
46
+ 1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
47
+ 2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
48
+ 3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-resource`, `add-prompt` skills
49
+ 4. **Add services** — scaffold domain service integrations using the `add-service` skill
50
+ 5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
51
+ 6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
52
+ 7. **Run `devcheck`** — lint, format, typecheck, and security audit
53
+ 8. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
54
+ 9. **Run the `maintenance` skill** — sync skills and dependencies after framework updates
55
+
56
+ Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
57
+
58
+ ---
59
+
60
+ ## Core Rules
61
+
62
+ - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
63
+ - **Use `ctx.log`** for request-scoped logging. No `console` calls.
64
+ - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
65
+ - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
66
+ - **Secrets in env vars only** — never hardcoded.
67
+
68
+ ---
69
+
70
+ ## Patterns
71
+
72
+ ### Tool
73
+
74
+ ```ts
75
+ import { tool, z } from '@cyanheads/mcp-ts-core';
76
+ import { getNwsService } from '@/services/nws/nws-service.js';
77
+
78
+ export const findStationsTool = tool('nws_find_stations', {
79
+ description: 'Find weather observation stations near a location.',
80
+ annotations: { readOnlyHint: true },
81
+ input: z.object({
82
+ latitude: z.number().min(-90).max(90).describe('Center latitude for proximity search.'),
83
+ longitude: z.number().min(-180).max(180).describe('Center longitude for proximity search.'),
84
+ limit: z.number().int().min(1).max(50).default(10).describe('Max stations to return (1-50).'),
85
+ }),
86
+ output: z.object({
87
+ stations: z.array(z.object({
88
+ stationId: z.string().describe('Station identifier (e.g., "KSEA")'),
89
+ name: z.string().describe('Station name'),
90
+ distance: z.number().describe('Distance from query point in km'),
91
+ bearing: z.string().describe('Compass bearing from query point'),
92
+ })).describe('Nearby stations sorted by distance'),
93
+ }),
94
+
95
+ async handler(input, ctx) {
96
+ const result = await getNwsService().findStations(input.latitude, input.longitude, input.limit, ctx);
97
+ return { stations: result.stations.map((s) => ({ /* ... */ })) };
98
+ },
99
+
100
+ // format() populates content[] — the only field most LLM clients forward to
101
+ // the model. Render all data the LLM needs, not just a count or title.
102
+ format: (result) => {
103
+ const lines = [`## ${result.stations.length} Nearby Stations\n`];
104
+ lines.push('| Station | Name | Distance | Bearing |');
105
+ lines.push('|:--------|:-----|:---------|:--------|');
106
+ for (const s of result.stations) {
107
+ lines.push(`| ${s.stationId} | ${s.name} | ${s.distance} km | ${s.bearing} |`);
108
+ }
109
+ return [{ type: 'text', text: lines.join('\n') }];
110
+ },
111
+ });
112
+ ```
113
+
114
+ ### Resource
115
+
116
+ ```ts
117
+ import { resource, z } from '@cyanheads/mcp-ts-core';
118
+ import { getNwsService } from '@/services/nws/nws-service.js';
119
+
120
+ export const alertTypesResource = resource('nws://alert-types', {
121
+ name: 'NWS Alert Event Types',
122
+ description: 'Static list of all valid NWS alert event type names.',
123
+ mimeType: 'application/json',
124
+ params: z.object({}),
125
+
126
+ async handler(_params, ctx) {
127
+ const types = await getNwsService().listAlertTypes(ctx);
128
+ return { count: types.length, eventTypes: [...types].sort() };
129
+ },
130
+
131
+ list: async () => ({
132
+ resources: [{
133
+ uri: 'nws://alert-types',
134
+ name: 'NWS Alert Event Types',
135
+ description: 'All valid alert event type names for filtering.',
136
+ mimeType: 'application/json',
137
+ }],
138
+ }),
139
+ });
140
+ ```
141
+
142
+ ### Server config
143
+
144
+ ```ts
145
+ // src/config/server-config.ts — lazy-parsed, separate from framework config
146
+ const ServerConfigSchema = z.object({
147
+ userAgent: z
148
+ .string()
149
+ .default('(nws-weather-mcp-server, github.com/cyanheads/nws-weather-mcp-server)')
150
+ .describe('User-Agent header for NWS API requests. Required by the API — 403 without it.'),
151
+ });
152
+ let _config: z.infer<typeof ServerConfigSchema> | undefined;
153
+ export function getServerConfig() {
154
+ _config ??= ServerConfigSchema.parse({
155
+ userAgent: process.env.NWS_USER_AGENT,
156
+ });
157
+ return _config;
158
+ }
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Context
164
+
165
+ Handlers receive a unified `ctx` object. Key properties:
166
+
167
+ | Property | Description |
168
+ |:---------|:------------|
169
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
170
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Used for grid cell caching. |
171
+ | `ctx.signal` | `AbortSignal` for cancellation. |
172
+ | `ctx.requestId` | Unique request ID. |
173
+ | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
174
+
175
+ ---
176
+
177
+ ## Errors
178
+
179
+ Handlers throw — the framework catches, classifies, and formats. Three escalation levels:
180
+
181
+ ```ts
182
+ // 1. Plain Error — framework auto-classifies from message patterns
183
+ throw new Error('Item not found'); // → NotFound
184
+ throw new Error('Invalid query format'); // → ValidationError
185
+
186
+ // 2. Error factories — explicit code, concise
187
+ import { notFound, validationError, forbidden, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
188
+ throw notFound('Item not found', { itemId });
189
+ throw serviceUnavailable('API unavailable', { url }, { cause: err });
190
+
191
+ // 3. McpError — full control over code and data
192
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
193
+ throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
194
+ ```
195
+
196
+ Plain `Error` is fine for most cases. Use factories when the error code matters. See framework CLAUDE.md for the full auto-classification table and all available factories.
197
+
198
+ ---
199
+
200
+ ## Structure
201
+
202
+ ```text
203
+ src/
204
+ index.ts # createApp() entry point
205
+ config/
206
+ server-config.ts # Server-specific env vars (Zod schema)
207
+ services/
208
+ nws/
209
+ nws-service.ts # NWS API client (init/accessor pattern)
210
+ types.ts # NWS API response types
211
+ mcp-server/
212
+ tools/definitions/
213
+ [tool-name].tool.ts # Tool definitions
214
+ resources/definitions/
215
+ [resource-name].resource.ts # Resource definitions
216
+ ```
217
+
218
+ ---
219
+
220
+ ## Naming
221
+
222
+ | What | Convention | Example |
223
+ |:-----|:-----------|:--------|
224
+ | Files | kebab-case with suffix | `get-forecast.tool.ts` |
225
+ | Tool/resource/prompt names | snake_case | `nws_get_forecast` |
226
+ | Directories | kebab-case | `src/services/nws/` |
227
+ | Descriptions | Single string or template literal, no `+` concatenation | `'Get the weather forecast for a US location.'` |
228
+
229
+ ---
230
+
231
+ ## Skills
232
+
233
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
234
+
235
+ **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). This makes skills available as context without needing to reference `skills/` paths manually. After framework updates, re-copy to pick up changes.
236
+
237
+ Available skills:
238
+
239
+ | Skill | Purpose |
240
+ |:------|:--------|
241
+ | `setup` | Post-init project orientation |
242
+ | `design-mcp-server` | Design tool surface, resources, and services for a new server |
243
+ | `add-tool` | Scaffold a new tool definition |
244
+ | `add-resource` | Scaffold a new resource definition |
245
+ | `add-prompt` | Scaffold a new prompt definition |
246
+ | `add-service` | Scaffold a new service integration |
247
+ | `add-test` | Scaffold test file for a tool, resource, or service |
248
+ | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
249
+ | `devcheck` | Lint, format, typecheck, audit |
250
+ | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
251
+ | `maintenance` | Sync skills and dependencies after updates |
252
+ | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
253
+ | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
254
+ | `api-auth` | Auth modes, scopes, JWT/OAuth |
255
+ | `api-config` | AppConfig, parseConfig, env vars |
256
+ | `api-context` | Context interface, logger, state, progress |
257
+ | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
258
+ | `api-services` | LLM, Speech, Graph services |
259
+ | `api-testing` | createMockContext, test patterns |
260
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling |
261
+ | `api-workers` | Cloudflare Workers runtime |
262
+
263
+ When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
264
+
265
+ ---
266
+
267
+ ## Commands
268
+
269
+ | Command | Purpose |
270
+ |:--------|:--------|
271
+ | `bun run build` | Compile TypeScript |
272
+ | `bun run rebuild` | Clean + build |
273
+ | `bun run clean` | Remove build artifacts |
274
+ | `bun run devcheck` | Lint + format + typecheck + security |
275
+ | `bun run tree` | Generate directory structure doc |
276
+ | `bun run format` | Auto-fix formatting |
277
+ | `bun run lint:mcp` | Validate MCP tool/resource definitions |
278
+ | `bun run test` | Run tests |
279
+ | `bun run dev:stdio` | Dev mode (stdio) |
280
+ | `bun run dev:http` | Dev mode (HTTP) |
281
+ | `bun run start:stdio` | Production mode (stdio) |
282
+ | `bun run start:http` | Production mode (HTTP) |
283
+
284
+ ---
285
+
286
+ ## Imports
287
+
288
+ ```ts
289
+ // Framework — z is re-exported, no separate zod import needed
290
+ import { tool, z } from '@cyanheads/mcp-ts-core';
291
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
292
+
293
+ // Server's own code — via path alias
294
+ import { getNwsService } from '@/services/nws/nws-service.js';
295
+ ```
296
+
297
+ ---
298
+
299
+ ## Checklist
300
+
301
+ - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, etc.)
302
+ - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`)
303
+ - [ ] JSDoc `@fileoverview` + `@module` on every file
304
+ - [ ] `ctx.log` for logging, `ctx.state` for storage
305
+ - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
306
+ - [ ] `format()` renders all data the LLM needs — `content[]` is the only field most clients forward to the model
307
+ - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
308
+ - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
309
+ - [ ] `bun run devcheck` passes
package/Dockerfile ADDED
@@ -0,0 +1,99 @@
1
+ # ==============================================================================
2
+ # Build Stage
3
+ #
4
+ # This stage installs all dependencies (including dev), builds the TypeScript
5
+ # source code into JavaScript, and prepares the production assets.
6
+ # ==============================================================================
7
+ FROM oven/bun:1 AS build
8
+
9
+ WORKDIR /usr/src/app
10
+
11
+ # Copy dependency manifests for optimized layer caching
12
+ COPY package.json bun.lock ./
13
+
14
+ # Install all dependencies (including dev dependencies for building)
15
+ RUN bun install --frozen-lockfile
16
+
17
+ # Copy the rest of the source code
18
+ COPY . .
19
+
20
+ # Build the application
21
+ RUN bun run build
22
+
23
+
24
+ # ==============================================================================
25
+ # Production Stage
26
+ #
27
+ # This stage creates a minimal, optimized, and secure image for running the
28
+ # application. It uses a slim base image and only includes production
29
+ # dependencies and build artifacts.
30
+ # ==============================================================================
31
+ FROM oven/bun:1-slim AS production
32
+
33
+ WORKDIR /usr/src/app
34
+
35
+ # Set the environment to production for performance and to ensure only
36
+ # production dependencies are installed.
37
+ ENV NODE_ENV=production
38
+
39
+ # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
40
+ LABEL org.opencontainers.image.title="nws-weather-mcp-server"
41
+ LABEL org.opencontainers.image.description="Real-time US weather data via the National Weather Service API. Forecasts, alerts, and observations with zero auth."
42
+ LABEL org.opencontainers.image.source="https://github.com/cyanheads/nws-weather-mcp-server"
43
+ LABEL org.opencontainers.image.licenses="Apache-2.0"
44
+
45
+ # Copy dependency manifests
46
+ COPY package.json bun.lock ./
47
+
48
+ # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
49
+ # that are not needed in the final production image.
50
+ RUN bun install --production --frozen-lockfile --ignore-scripts
51
+
52
+ # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
53
+ # These are not bundled by default to keep the base image lean. Enable at build time
54
+ # with: docker build --build-arg OTEL_ENABLED=true
55
+ ARG OTEL_ENABLED=true
56
+ RUN if [ "$OTEL_ENABLED" = "true" ]; then \
57
+ bun add @hono/otel \
58
+ @opentelemetry/instrumentation-http \
59
+ @opentelemetry/exporter-metrics-otlp-http \
60
+ @opentelemetry/exporter-trace-otlp-http \
61
+ @opentelemetry/instrumentation-pino \
62
+ @opentelemetry/resources \
63
+ @opentelemetry/sdk-metrics \
64
+ @opentelemetry/sdk-node \
65
+ @opentelemetry/sdk-trace-node \
66
+ @opentelemetry/semantic-conventions; \
67
+ fi
68
+
69
+ # Copy the compiled application code from the build stage
70
+ COPY --from=build /usr/src/app/dist ./dist
71
+
72
+ # The 'oven/bun' image already provides a non-root user named 'bun'.
73
+ # We will use this existing user for enhanced security.
74
+
75
+ # Create and set permissions for the log directory, assigning ownership to the 'bun' user.
76
+ RUN mkdir -p /var/log/nws-weather-mcp-server && chown -R bun:bun /var/log/nws-weather-mcp-server
77
+
78
+ # Switch to the non-root user
79
+ USER bun
80
+
81
+ # Define an argument for the port, allowing it to be overridden at build time.
82
+ # The `PORT` variable is often injected by cloud environments at runtime.
83
+ ARG PORT
84
+
85
+ # Set runtime environment variables
86
+ # Note: PORT is an automatic variable in many cloud environments (e.g., Cloud Run)
87
+ ENV MCP_HTTP_PORT=${PORT:-3010}
88
+ ENV MCP_HTTP_HOST="0.0.0.0"
89
+ ENV MCP_TRANSPORT_TYPE="http"
90
+ ENV MCP_SESSION_MODE="stateless"
91
+ ENV MCP_LOG_LEVEL="info"
92
+ ENV LOGS_DIR="/var/log/nws-weather-mcp-server"
93
+ ENV MCP_FORCE_CONSOLE_LOGGING="true"
94
+
95
+ # Expose the port the server listens on
96
+ EXPOSE ${MCP_HTTP_PORT}
97
+
98
+ # The command to start the server
99
+ CMD ["bun", "run", "dist/index.js"]
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 cyanheads
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.