@cyanheads/openfec-mcp-server 0.4.6 → 0.4.7
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.
- package/CLAUDE.md +11 -4
- package/README.md +1 -1
- package/changelog/0.4.x/0.4.7.md +26 -0
- package/changelog/template.md +34 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/manifest.json +14 -4
- package/package.json +6 -3
- package/server.json +3 -3
package/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** openfec-mcp-server
|
|
4
|
-
**Version:** 0.4.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.
|
|
4
|
+
**Version:** 0.4.7
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.13`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
|
|
8
8
|
> **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.
|
|
@@ -41,6 +41,7 @@ The OpenFEC OpenAPI spec (Swagger 2.0) is at `docs/openapi-spec.json` — 100 pa
|
|
|
41
41
|
- **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
|
|
42
42
|
- **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
|
|
43
43
|
- **Secrets in env vars only** — never hardcoded.
|
|
44
|
+
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
|
|
44
45
|
|
|
45
46
|
---
|
|
46
47
|
|
|
@@ -191,6 +192,8 @@ Handlers throw — the framework catches, classifies, and formats.
|
|
|
191
192
|
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()`. The handler then receives `ctx.fail(reason, msg?, data?)` keyed against the contract reason union — `ctx.fail('typo')` is a TypeScript error. The framework auto-populates `data.reason`, the linter enforces conformance, and the `recovery` string (≥5 words) is the source of truth for the recovery hint that flows to the wire. Spread `ctx.recoveryFor('reason')` into `data` to opt the contract recovery onto the wire payload.
|
|
192
193
|
|
|
193
194
|
```ts
|
|
195
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
196
|
+
|
|
194
197
|
errors: [
|
|
195
198
|
{ reason: 'candidate_not_found', code: JsonRpcErrorCode.NotFound,
|
|
196
199
|
when: 'Single-candidate lookup returned no record',
|
|
@@ -286,11 +289,12 @@ Available skills:
|
|
|
286
289
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
287
290
|
| `tool-defs-analysis` | Read-only audit of definition language across the surface (10 categories: voice, leaks, defaults, recovery, structure, …) |
|
|
288
291
|
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
292
|
+
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
289
293
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
290
294
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
295
|
+
| `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
|
|
291
296
|
| `release-and-publish` | Post-wrapup ship workflow: verification gate, push commits/tags, publish to npm + MCP Registry + GHCR |
|
|
292
297
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills and framework scripts |
|
|
293
|
-
| `migrate-mcp-ts-template` | Migrate a legacy template fork to use `@cyanheads/mcp-ts-core` as a package dependency |
|
|
294
298
|
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
295
299
|
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
296
300
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
@@ -317,7 +321,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
317
321
|
| `bun run rebuild` | Clean + build |
|
|
318
322
|
| `bun run clean` | Remove build artifacts |
|
|
319
323
|
| `bun run devcheck` | Lint + format + typecheck + security |
|
|
320
|
-
| `bun run audit:refresh` | Delete `bun.lock`, reinstall, re-audit. Use when `devcheck` flags a transitive advisory —
|
|
324
|
+
| `bun run audit:refresh` | Delete `bun.lock`, reinstall, re-audit. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions; the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
|
|
321
325
|
| `bun run tree` | Generate directory structure doc |
|
|
322
326
|
| `bun run format` | Auto-fix formatting |
|
|
323
327
|
| `bun run lint:mcp` | Validate MCP tool/resource/prompt definitions |
|
|
@@ -382,4 +386,7 @@ import { getOpenFecService } from '@/services/openfec/openfec-service.js';
|
|
|
382
386
|
- [ ] Wrapping the OpenFEC API: tests include at least one sparse payload case with omitted upstream fields
|
|
383
387
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
384
388
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
389
|
+
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
|
|
390
|
+
- [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
|
|
391
|
+
- [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
|
|
385
392
|
- [ ] `bun run devcheck` passes
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](https://www.npmjs.com/package/@cyanheads/openfec-mcp-server) [](https://www.npmjs.com/package/@cyanheads/openfec-mcp-server) [](./CHANGELOG.md) [](https://github.com/users/cyanheads/packages/container/package/openfec-mcp-server) [](https://modelcontextprotocol.io/) [](./LICENSE) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "mcp-ts-core ^0.9.6 → ^0.9.13: HTTP 413 body cap, session-init gate, quieter 401/403/400/404 logs, GET /mcp surfaces keywords; manifest metadata; dep refresh"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.4.7 — 2026-05-28
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`MCP_HTTP_MAX_BODY_BYTES`** — configurable inbound request-body cap (default 1 MiB); oversized HTTP requests rejected with 413 before body parsing. Documented in `.env.example`. Inherited from `@cyanheads/mcp-ts-core` 0.9.13.
|
|
12
|
+
- **`landing.requireAuth: false`** — explicitly opts the public hosted endpoint into serving the full tool/resource/prompt inventory without authentication (new `mcp-ts-core` 0.9.10 default gates inventory behind auth when `MCP_AUTH_MODE` is `jwt`/`oauth`).
|
|
13
|
+
- **`GET /mcp` keywords** — `package.json` keywords (`mcp-server`, `openfec`, `fec`, `campaign-finance`, etc.) now surfaced in the HTTP status response. Inherited from `@cyanheads/mcp-ts-core` 0.9.12.
|
|
14
|
+
- **`manifest.json`** — `repository`, `homepage`, and `license` fields added.
|
|
15
|
+
- **`package.json` keywords** — `bun`, `stdio`, `streamable-http` added.
|
|
16
|
+
|
|
17
|
+
## Changed
|
|
18
|
+
|
|
19
|
+
- **HTTP session-init gate** — stateful HTTP mode now rejects non-`initialize` requests arriving without `Mcp-Session-Id` with HTTP 400. Inherited from `@cyanheads/mcp-ts-core` 0.9.10.
|
|
20
|
+
- **Expected client error log levels** — 401, 403, 400, and 404 HTTP errors use `logger.warning` instead of the full error pipeline with stack traces, reducing noise in logs. Inherited from `@cyanheads/mcp-ts-core` 0.9.10.
|
|
21
|
+
- **Skills** — bulk refresh from framework 0.9.7–0.9.13: `git-wrapup`, `release-and-publish`, `api-canvas`, `api-config`, `design-mcp-server`, `polish-docs-meta`, `report-issue-framework`; `code-simplifier` and `git-wrapup` added; `migrate-mcp-ts-template` removed.
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `@cyanheads/mcp-ts-core` ^0.9.6 → ^0.9.13
|
|
26
|
+
- `@biomejs/biome` ^2.4.15 → ^2.4.16
|
package/changelog/template.md
CHANGED
|
@@ -19,6 +19,14 @@ breaking: false
|
|
|
19
19
|
# `## Security` section below. Flagged as `Security` in the rollup so
|
|
20
20
|
# users can triage upgrade urgency at a glance.
|
|
21
21
|
security: false
|
|
22
|
+
|
|
23
|
+
# Optional free-form notes for maintenance agents processing this release.
|
|
24
|
+
# Not rendered in CHANGELOG — consumed by agents running `maintenance` on
|
|
25
|
+
# downstream servers. Use for adoption instructions that don't fit the
|
|
26
|
+
# human-facing sections: new files to create, fields to populate, one-time
|
|
27
|
+
# migration steps. Omit the field entirely when there's nothing to say.
|
|
28
|
+
# agent-notes: |
|
|
29
|
+
# <instructions for downstream maintenance agents>
|
|
22
30
|
---
|
|
23
31
|
|
|
24
32
|
# <version> — YYYY-MM-DD
|
|
@@ -66,6 +74,32 @@ security: false
|
|
|
66
74
|
Never speculate on a future number — `#42` for an upcoming PR silently
|
|
67
75
|
resolves to whatever real item already owns 42, and timeline previews pull
|
|
68
76
|
in that unrelated item's metadata.
|
|
77
|
+
|
|
78
|
+
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
79
|
+
via `gh release create --notes-from-tag`. The tag is a derivative of this
|
|
80
|
+
changelog entry — a condensed, scannable version, not a copy. Format:
|
|
81
|
+
|
|
82
|
+
<theme — omit version number, GitHub prepends it>
|
|
83
|
+
← blank line
|
|
84
|
+
<1-2 sentence context: what this release does>
|
|
85
|
+
← blank line
|
|
86
|
+
Dependency bumps: ← section header
|
|
87
|
+
← blank line
|
|
88
|
+
- `@cyanheads/mcp-ts-core` ^0.9.1 → ^0.9.6 ← bullet
|
|
89
|
+
← blank line
|
|
90
|
+
Changed: ← only sections with entries
|
|
91
|
+
← blank line
|
|
92
|
+
- `format()` output includes `query` in text mode
|
|
93
|
+
← blank line
|
|
94
|
+
Added:
|
|
95
|
+
← blank line
|
|
96
|
+
- `manifest.json` scaffolded for MCPB bundle support
|
|
97
|
+
- Install badges (Claude Desktop, Cursor, VS Code)
|
|
98
|
+
← blank line
|
|
99
|
+
<N> tests pass; `bun run devcheck` clean. ← footer
|
|
100
|
+
|
|
101
|
+
Never a flat comma-separated string. Always structured markdown with
|
|
102
|
+
sections. The tag must scan well as a rendered GitHub Release page.
|
|
69
103
|
-->
|
|
70
104
|
|
|
71
105
|
## Added
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,10 @@ await createApp({
|
|
|
14
14
|
resources: allResourceDefinitions,
|
|
15
15
|
prompts: allPromptDefinitions,
|
|
16
16
|
instructions: 'Use the openfec_* tools for US federal campaign finance data: candidates, committees, contributions (Schedule A), disbursements (Schedule B), independent expenditures (Schedule E), filings, elections, calendar, and legal documents. Candidate IDs use H/S/P prefixes (House/Senate/President); committee IDs use C. Cycles are even-year integers covering the prior 2 years (2024 = Jan 2023 – Dec 2024). Itemized contributions and disbursements scope to committee_id, not candidate_id.',
|
|
17
|
+
landing: {
|
|
18
|
+
// Public hosted catalog — serve full tool/resource/prompt inventory without auth
|
|
19
|
+
requireAuth: false,
|
|
20
|
+
},
|
|
17
21
|
setup() {
|
|
18
22
|
initOpenFecService();
|
|
19
23
|
},
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,sBAAsB;IACjC,OAAO,EAAE,oBAAoB;IAC7B,YAAY,EACV,keAAke;IACpe,KAAK;QACH,kBAAkB,EAAE,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,sBAAsB;IACjC,OAAO,EAAE,oBAAoB;IAC7B,YAAY,EACV,keAAke;IACpe,OAAO,EAAE;QACP,iFAAiF;QACjF,WAAW,EAAE,KAAK;KACnB;IACD,KAAK;QACH,kBAAkB,EAAE,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
|
package/manifest.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "openfec-mcp-server",
|
|
4
|
-
"version": "0.4.
|
|
5
|
-
"description": "Access FEC campaign finance data. Query data about candidates, money trails, and election filings.",
|
|
6
|
-
"author": {
|
|
4
|
+
"version": "0.4.7",
|
|
5
|
+
"description": "Access FEC campaign finance data through MCP. Query data about candidates, money trails, and election filings. STDIO & Streamable HTTP.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "cyanheads"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/cyanheads/openfec-mcp-server"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/cyanheads/openfec-mcp-server#readme",
|
|
14
|
+
"license": "Apache-2.0",
|
|
7
15
|
"server": {
|
|
8
16
|
"type": "node",
|
|
9
17
|
"entry_point": "dist/index.js",
|
|
@@ -18,7 +26,9 @@
|
|
|
18
26
|
}
|
|
19
27
|
},
|
|
20
28
|
"compatibility": {
|
|
21
|
-
"runtimes": {
|
|
29
|
+
"runtimes": {
|
|
30
|
+
"node": ">=24.0.0"
|
|
31
|
+
}
|
|
22
32
|
},
|
|
23
33
|
"tools_generated": true,
|
|
24
34
|
"prompts_generated": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/openfec-mcp-server",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"mcpName": "io.github.cyanheads/openfec-mcp-server",
|
|
5
5
|
"description": "Access FEC campaign finance data through MCP. Query data about candidates, money trails, and election filings. STDIO & Streamable HTTP.",
|
|
6
6
|
"type": "module",
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
"federal-elections",
|
|
51
51
|
"political-contributions",
|
|
52
52
|
"typescript",
|
|
53
|
+
"bun",
|
|
54
|
+
"stdio",
|
|
55
|
+
"streamable-http",
|
|
53
56
|
"ai-agent"
|
|
54
57
|
],
|
|
55
58
|
"repository": {
|
|
@@ -92,13 +95,13 @@
|
|
|
92
95
|
"lodash": ">=4.17.24"
|
|
93
96
|
},
|
|
94
97
|
"dependencies": {
|
|
95
|
-
"@cyanheads/mcp-ts-core": "^0.9.
|
|
98
|
+
"@cyanheads/mcp-ts-core": "^0.9.13",
|
|
96
99
|
"@opentelemetry/api": "^1.9.1",
|
|
97
100
|
"pino-pretty": "^13.1.3",
|
|
98
101
|
"zod": "^4.4.3"
|
|
99
102
|
},
|
|
100
103
|
"devDependencies": {
|
|
101
|
-
"@biomejs/biome": "^2.4.
|
|
104
|
+
"@biomejs/biome": "^2.4.16",
|
|
102
105
|
"@types/node": "^25.9.1",
|
|
103
106
|
"depcheck": "^1.4.7",
|
|
104
107
|
"ignore": "^7.0.5",
|
package/server.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/openfec-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.4.
|
|
9
|
+
"version": "0.4.7",
|
|
10
10
|
"remotes": [
|
|
11
11
|
{
|
|
12
12
|
"type": "streamable-http",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@cyanheads/openfec-mcp-server",
|
|
21
21
|
"runtimeHint": "bun",
|
|
22
|
-
"version": "0.4.
|
|
22
|
+
"version": "0.4.7",
|
|
23
23
|
"packageArguments": [
|
|
24
24
|
{
|
|
25
25
|
"type": "positional",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
55
55
|
"identifier": "@cyanheads/openfec-mcp-server",
|
|
56
56
|
"runtimeHint": "bun",
|
|
57
|
-
"version": "0.4.
|
|
57
|
+
"version": "0.4.7",
|
|
58
58
|
"packageArguments": [
|
|
59
59
|
{
|
|
60
60
|
"type": "positional",
|