@blen/fedreg-mcp-server 2.0.4 → 2.0.6
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/CHANGELOG.md +14 -1
- package/README.md +6 -4
- package/SECURITY.md +9 -2
- package/dist/sdk/bindings.d.ts +2 -1
- package/dist/sdk/bindings.d.ts.map +1 -1
- package/dist/sdk/bindings.js +6 -2
- package/dist/sdk/bindings.js.map +1 -1
- package/dist/sdk/runtime.d.ts +2 -2
- package/dist/sdk/runtime.d.ts.map +1 -1
- package/dist/sdk/runtime.js +14 -13
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/sources/ecfr.d.ts.map +1 -1
- package/dist/sdk/sources/ecfr.js +19 -1
- package/dist/sdk/sources/ecfr.js.map +1 -1
- package/dist/sdk/sources/fr.d.ts.map +1 -1
- package/dist/sdk/sources/fr.js +20 -1
- package/dist/sdk/sources/fr.js.map +1 -1
- package/dist/sdk/sources/regs.d.ts.map +1 -1
- package/dist/sdk/sources/regs.js +10 -1
- package/dist/sdk/sources/regs.js.map +1 -1
- package/dist/sdk/sources/source.d.ts +2 -0
- package/dist/sdk/sources/source.d.ts.map +1 -1
- package/dist/server/mcpServer.d.ts.map +1 -1
- package/dist/server/mcpServer.js +3 -1
- package/dist/server/mcpServer.js.map +1 -1
- package/dist/server/toolCatalog.d.ts +3 -0
- package/dist/server/toolCatalog.d.ts.map +1 -1
- package/dist/server/toolCatalog.js +10 -2
- package/dist/server/toolCatalog.js.map +1 -1
- package/dist/tools/execute.js +2 -2
- package/dist/tools/execute.js.map +1 -1
- package/dist/tools/searchApi.js +1 -1
- package/dist/tools/searchApi.js.map +1 -1
- package/package.json +1 -1
- package/schema/ecfr.json +16 -0
- package/schema/fr.json +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,17 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [2.0.6] - 2026-09-23
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- describe execute as plain JavaScript and sync docs with the SDK surface
|
|
19
|
+
- restrict RPC dispatch and advertise tool safety metadata
|
|
20
|
+
## [2.0.5] - 2026-08-06
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- move to Node 24 action runtimes and document the branch-only policy
|
|
13
24
|
## [2.0.4] - 2026-08-06
|
|
14
25
|
|
|
15
26
|
### Changed
|
|
@@ -164,7 +175,9 @@ Initial public release.
|
|
|
164
175
|
→ notifications/initialized → tools/list → tools/call → sandbox → SDK
|
|
165
176
|
→ mocked upstream).
|
|
166
177
|
|
|
167
|
-
[Unreleased]: https://github.com/blen-labs/fedreg-mcp-server/compare/v2.0.
|
|
178
|
+
[Unreleased]: https://github.com/blen-labs/fedreg-mcp-server/compare/v2.0.6...HEAD
|
|
179
|
+
[2.0.6]: https://github.com/blen-labs/fedreg-mcp-server/compare/v2.0.5...v2.0.6
|
|
180
|
+
[2.0.5]: https://github.com/blen-labs/fedreg-mcp-server/compare/v2.0.4...v2.0.5
|
|
168
181
|
[2.0.4]: https://github.com/blen-labs/fedreg-mcp-server/compare/v2.0.3...v2.0.4
|
|
169
182
|
[2.0.3]: https://github.com/blen-labs/fedreg-mcp-server/compare/v2.0.2...v2.0.3
|
|
170
183
|
[2.0.2]: https://github.com/blen-labs/fedreg-mcp-server/compare/v2.0.1...v2.0.2
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ This is a [Model Context Protocol](https://modelcontextprotocol.io) server that
|
|
|
18
18
|
- **[Electronic Code of Federal Regulations (eCFR)](https://www.ecfr.gov)** — the current, continuously updated text of the Code of Federal Regulations.
|
|
19
19
|
- **[regulations.gov](https://www.regulations.gov)** — public comments, dockets, and live comment-period status for federal rulemakings.
|
|
20
20
|
|
|
21
|
-
Instead of bolting on dozens of rigid, narrow tools, it hands the model a small, well-
|
|
21
|
+
Instead of bolting on dozens of rigid, narrow tools, it hands the model a small, well-documented SDK and lets it write the exact query it needs in JavaScript — then runs that code in a locked-down sandbox. This is the **code-mode** pattern, and it makes wide government APIs usable without overwhelming the model with tool definitions.
|
|
22
22
|
|
|
23
23
|
> Independent open-source project. It calls public U.S. government APIs and is not affiliated with or endorsed by the U.S. government.
|
|
24
24
|
|
|
@@ -50,7 +50,7 @@ const rules = await fr.documents.search({
|
|
|
50
50
|
## Features
|
|
51
51
|
|
|
52
52
|
- **Three official sources, one server** — the full Federal Register v1 (`fr.*`), eCFR (`ecfr.*`), and regulations.gov v4 (`regs.*`) APIs behind one server.
|
|
53
|
-
- **Code mode, not tool sprawl** — the model writes
|
|
53
|
+
- **Code mode, not tool sprawl** — the model writes JavaScript against the `fr` / `ecfr` / `regs` SDKs instead of juggling dozens of single-purpose tools.
|
|
54
54
|
- **Safe by construction** — user code runs in an `isolated-vm` (or Deno) sandbox with **no network, filesystem, env, or subprocess access**. The only way out is to the three upstream government APIs.
|
|
55
55
|
- **Runs anywhere MCP does** — stdio for Claude Desktop, or a remote Streamable HTTP server with OAuth, rate limiting, and quotas.
|
|
56
56
|
- **Discovery built in** — `search_api` and `describe_schema` help the model (and you) find the right call fast.
|
|
@@ -126,9 +126,11 @@ Three tools, in the order the model uses them:
|
|
|
126
126
|
|
|
127
127
|
| Tool | What it does |
|
|
128
128
|
|---|---|
|
|
129
|
-
| `search_api(query, k?)` | Finds the right endpoint/field via BM25 over the SDK docs. Returns ready-to-run
|
|
129
|
+
| `search_api(query, k?)` | Finds the right endpoint/field via BM25 over the SDK docs. Returns signatures and ready-to-run JavaScript snippets. |
|
|
130
130
|
| `describe_schema({ path? \| prefix? })` | Looks up an exact call or lists a whole namespace. |
|
|
131
|
-
| `execute({ code, timeoutMs?, memoryMb? })` | Runs
|
|
131
|
+
| `execute({ code, timeoutMs?, memoryMb? })` | Runs JavaScript (no type annotations; top-level `await`/`return` allowed) in the sandbox, with `fr`, `ecfr`, and `regs` as globals. (`regs` is always defined; without `FEDREG_REGS_API_KEY` its calls return a `SourceUnavailable` error rather than a `ReferenceError`.) |
|
|
132
|
+
|
|
133
|
+
All three tools carry MCP annotations marking them read-only and non-destructive (`execute` is additionally `openWorldHint: true`, since it reaches the upstream APIs), so clients that honor annotations can auto-approve them.
|
|
132
134
|
|
|
133
135
|
A request flows from the MCP client through `execute` into the sandbox; the `fr.*` / `ecfr.*` / `regs.*` globals are thin proxies that marshal each call across a host-side RPC bridge to the real APIs:
|
|
134
136
|
|
package/SECURITY.md
CHANGED
|
@@ -44,7 +44,7 @@ Out of scope (please file a normal issue instead):
|
|
|
44
44
|
|
|
45
45
|
## Sandbox guarantees
|
|
46
46
|
|
|
47
|
-
The `execute` tool runs user-supplied
|
|
47
|
+
The `execute` tool runs user-supplied JavaScript with two layered defenses:
|
|
48
48
|
|
|
49
49
|
1. **AST preflight** (`acorn` + `acorn-walk`, see `src/sandbox/policy.ts`):
|
|
50
50
|
rejects `import` / `import()` / `eval` / `new Function` and references to
|
|
@@ -54,7 +54,8 @@ The `execute` tool runs user-supplied TypeScript with two layered defenses:
|
|
|
54
54
|
concatenation) is the next layer's job.
|
|
55
55
|
2. **Runtime isolation** — one of:
|
|
56
56
|
- `isolated-vm`: a fresh V8 isolate, **no host references** other than
|
|
57
|
-
a
|
|
57
|
+
a Reference to the RPC dispatcher and a log sink for `console.*`;
|
|
58
|
+
heap cap, wall-clock cap.
|
|
58
59
|
- `deno run --no-prompt <runner>`: subprocess with **no `--allow-*` flags**,
|
|
59
60
|
so no net/fs/env/ffi/subprocess access; wall-clock cap. The runner is a
|
|
60
61
|
temporary file so stdin stays free for the host RPC channel.
|
|
@@ -65,6 +66,12 @@ calls through a host-side RPC and execute them against the configured URL
|
|
|
65
66
|
allowlist (`FEDREG_FR_BASE_URL`, `FEDREG_ECFR_BASE_URL`,
|
|
66
67
|
`FEDREG_REGS_BASE_URL`).
|
|
67
68
|
|
|
69
|
+
The dispatcher resolves exact method names from each source's explicit, frozen
|
|
70
|
+
`methods` table. It never traverses the host client object or inherited
|
|
71
|
+
properties. Only the registered read methods are callable; HTTP clients,
|
|
72
|
+
caches, and other host internals are outside the RPC surface. New SDK methods
|
|
73
|
+
must be explicitly registered before sandboxed code can call them.
|
|
74
|
+
|
|
68
75
|
The regulations.gov API key (`FEDREG_REGS_API_KEY`) is held host-side in the
|
|
69
76
|
`HttpClient` and is **never exposed to sandboxed user code**: it is injected
|
|
70
77
|
into the upstream request on the host side of the RPC bridge, not passed into
|
package/dist/sdk/bindings.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type SourceConfig } from './sources/index.js';
|
|
2
|
-
import type { SourceMeta } from './sources/source.js';
|
|
2
|
+
import type { RpcMethods, SourceMeta } from './sources/source.js';
|
|
3
3
|
export interface Sdk {
|
|
4
4
|
clients: Record<string, object>;
|
|
5
|
+
methods: Readonly<Record<string, RpcMethods>>;
|
|
5
6
|
meta: SourceMeta[];
|
|
6
7
|
registeredNames: string[];
|
|
7
8
|
version: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../src/sdk/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../src/sdk/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAElE,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC9C,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,GAAG,CAe/C"}
|
package/dist/sdk/bindings.js
CHANGED
|
@@ -2,14 +2,18 @@ import { getSources } from './sources/index.js';
|
|
|
2
2
|
export function buildSdk(cfg) {
|
|
3
3
|
const sources = getSources(cfg);
|
|
4
4
|
const clients = {};
|
|
5
|
+
const methods = Object.create(null);
|
|
5
6
|
for (const s of sources)
|
|
6
|
-
if (s.enabled)
|
|
7
|
+
if (s.enabled) {
|
|
7
8
|
clients[s.name] = s.client;
|
|
9
|
+
methods[s.name] = s.methods;
|
|
10
|
+
}
|
|
8
11
|
return {
|
|
9
12
|
clients,
|
|
13
|
+
methods: Object.freeze(methods),
|
|
10
14
|
meta: sources.map(({ name, label, enabled, disabledReason }) => ({ name, label, enabled, disabledReason })),
|
|
11
15
|
registeredNames: sources.map(s => s.name),
|
|
12
|
-
version: () => '2.0.
|
|
16
|
+
version: () => '2.0.6', // x-release-version
|
|
13
17
|
};
|
|
14
18
|
}
|
|
15
19
|
//# sourceMappingURL=bindings.js.map
|
package/dist/sdk/bindings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../src/sdk/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../src/sdk/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,oBAAoB,CAAC;AAWnE,MAAM,UAAU,QAAQ,CAAC,GAAiB;IACxC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,MAAM,OAAO,GAA+B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChE,KAAK,MAAM,CAAC,IAAI,OAAO;QAAE,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;YACvC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;YAC3B,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;QAC9B,CAAC;IACD,OAAO;QACL,OAAO;QACP,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QAC/B,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;QAC3G,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACzC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,oBAAoB;KAC7C,CAAC;AACJ,CAAC"}
|
package/dist/sdk/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceMeta } from './sources/source.js';
|
|
1
|
+
import type { RpcMethods, SourceMeta } from './sources/source.js';
|
|
2
2
|
export interface RpcRequest {
|
|
3
3
|
binding: string;
|
|
4
4
|
path: string[];
|
|
@@ -14,7 +14,7 @@ export interface RpcResponse {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
export interface DispatchRegistry {
|
|
17
|
-
|
|
17
|
+
methods: Readonly<Record<string, RpcMethods>>;
|
|
18
18
|
meta: SourceMeta[];
|
|
19
19
|
}
|
|
20
20
|
export declare function dispatch(reg: DispatchRegistry, req: RpcRequest): Promise<RpcResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/sdk/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/sdk/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5D;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC9C,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAED,wBAAsB,QAAQ,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CA6B3F"}
|
package/dist/sdk/runtime.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export async function dispatch(reg, req) {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// Validate the RPC envelope independently of AST preflight. Dotted keys inside
|
|
3
|
+
// a single path segment must not alias an explicitly registered method.
|
|
4
|
+
if (!req || typeof req.binding !== 'string' || !Array.isArray(req.path)
|
|
5
|
+
|| req.path.length === 0 || !req.path.every(p => typeof p === 'string' && /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(p))
|
|
6
|
+
|| !Array.isArray(req.args)) {
|
|
7
|
+
return { ok: false, error: { name: 'TypeError', message: 'Invalid SDK call' } };
|
|
8
|
+
}
|
|
9
|
+
const methods = Object.getOwnPropertyDescriptor(reg.methods, req.binding)?.value;
|
|
10
|
+
if (!methods) {
|
|
4
11
|
const m = reg.meta.find(x => x.name === req.binding);
|
|
5
12
|
if (m && !m.enabled) {
|
|
6
13
|
return { ok: false, error: { name: 'SourceUnavailable', message: m.disabledReason ?? `${m.label} is unavailable` } };
|
|
@@ -8,19 +15,13 @@ export async function dispatch(reg, req) {
|
|
|
8
15
|
return { ok: false, error: { name: 'TypeError', message: `Cannot resolve binding '${req.binding}'` } };
|
|
9
16
|
}
|
|
10
17
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return { ok: false, error: { name: 'TypeError', message: `Cannot resolve ${req.binding}.${req.path.join('.')}` } };
|
|
16
|
-
}
|
|
17
|
-
parent = cur;
|
|
18
|
-
cur = cur[seg];
|
|
19
|
-
}
|
|
20
|
-
if (typeof cur !== 'function') {
|
|
18
|
+
// Resolve only an own data property in the source's explicit registry.
|
|
19
|
+
// Never walk the client object: TypeScript `private` is not a runtime boundary.
|
|
20
|
+
const method = Object.getOwnPropertyDescriptor(methods, req.path.join('.'))?.value;
|
|
21
|
+
if (typeof method !== 'function') {
|
|
21
22
|
return { ok: false, error: { name: 'TypeError', message: `${req.binding}.${req.path.join('.')} is not a function` } };
|
|
22
23
|
}
|
|
23
|
-
const value = await
|
|
24
|
+
const value = await method(...req.args);
|
|
24
25
|
return { ok: true, value };
|
|
25
26
|
}
|
|
26
27
|
catch (err) {
|
package/dist/sdk/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/sdk/runtime.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,GAAqB,EAAE,GAAe;IACnE,
|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MAAM,aAAa,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"ecfr.d.ts","sourceRoot":"","sources":["../../../src/sdk/sources/ecfr.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAyB1D"}
|
package/dist/sdk/sources/ecfr.js
CHANGED
|
@@ -7,6 +7,24 @@ export function createEcfrSource(cfg) {
|
|
|
7
7
|
retries: cfg.retries, cacheTtlMs: cfg.cacheTtlMs, cacheMaxItems: cfg.cacheMaxItems,
|
|
8
8
|
...(cfg.dispatcher ? { dispatcher: cfg.dispatcher } : {}),
|
|
9
9
|
});
|
|
10
|
-
|
|
10
|
+
const client = new EcfrClient(http);
|
|
11
|
+
return {
|
|
12
|
+
name: 'ecfr', label: 'eCFR', enabled: true, client, corpus: loadSourceCorpus('ecfr'),
|
|
13
|
+
methods: Object.freeze({
|
|
14
|
+
'admin.agencies': client.admin.agencies,
|
|
15
|
+
'admin.corrections': client.admin.corrections,
|
|
16
|
+
'admin.corrections_for_title': client.admin.corrections_for_title,
|
|
17
|
+
'titles.list': client.titles.list,
|
|
18
|
+
structure: client.structure,
|
|
19
|
+
ancestry: client.ancestry,
|
|
20
|
+
versions: client.versions,
|
|
21
|
+
full: client.full,
|
|
22
|
+
'search.results': client.search.results,
|
|
23
|
+
'search.counts_daily': client.search.counts_daily,
|
|
24
|
+
'search.counts_titles': client.search.counts_titles,
|
|
25
|
+
'search.counts_hierarchy': client.search.counts_hierarchy,
|
|
26
|
+
'search.suggestions': client.search.suggestions,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
11
29
|
}
|
|
12
30
|
//# sourceMappingURL=ecfr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecfr.js","sourceRoot":"","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AExD,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../src/sdk/sources/fr.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CA0BxD"}
|
package/dist/sdk/sources/fr.js
CHANGED
|
@@ -7,6 +7,25 @@ export function createFrSource(cfg) {
|
|
|
7
7
|
retries: cfg.retries, cacheTtlMs: cfg.cacheTtlMs, cacheMaxItems: cfg.cacheMaxItems,
|
|
8
8
|
...(cfg.dispatcher ? { dispatcher: cfg.dispatcher } : {}),
|
|
9
9
|
});
|
|
10
|
-
|
|
10
|
+
const client = new FederalRegisterClient(http);
|
|
11
|
+
return {
|
|
12
|
+
name: 'fr', label: 'Federal Register', enabled: true, client, corpus: loadSourceCorpus('fr'),
|
|
13
|
+
methods: Object.freeze({
|
|
14
|
+
'documents.search': client.documents.search,
|
|
15
|
+
'documents.get': client.documents.get,
|
|
16
|
+
'documents.getMany': client.documents.getMany,
|
|
17
|
+
'documents.facets': client.documents.facets,
|
|
18
|
+
'publicInspection.current': client.publicInspection.current,
|
|
19
|
+
'publicInspection.search': client.publicInspection.search,
|
|
20
|
+
'publicInspection.get': client.publicInspection.get,
|
|
21
|
+
'publicInspection.getMany': client.publicInspection.getMany,
|
|
22
|
+
'agencies.list': client.agencies.list,
|
|
23
|
+
'agencies.get': client.agencies.get,
|
|
24
|
+
'issues.get': client.issues.get,
|
|
25
|
+
'suggestedSearches.list': client.suggestedSearches.list,
|
|
26
|
+
'suggestedSearches.get': client.suggestedSearches.get,
|
|
27
|
+
'images.get': client.images.get,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
11
30
|
}
|
|
12
31
|
//# sourceMappingURL=fr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.js","sourceRoot":"","sources":["../../../src/sdk/sources/fr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,UAAU,cAAc,CAAC,GAAiB;IAC9C,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC;QAC1B,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS;QAC1E,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa;QAClF,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1D,CAAC,CAAC;IACH,
|
|
1
|
+
{"version":3,"file":"fr.js","sourceRoot":"","sources":["../../../src/sdk/sources/fr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,UAAU,cAAc,CAAC,GAAiB;IAC9C,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC;QAC1B,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS;QAC1E,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa;QAClF,GAAG,CAAC,G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mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"regs.d.ts","sourceRoot":"","sources":["../../../src/sdk/sources/regs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CA4B1D"}
|
package/dist/sdk/sources/regs.js
CHANGED
|
@@ -12,12 +12,21 @@ export function createRegsSource(cfg) {
|
|
|
12
12
|
...(cfg.regsPreflightLimiter ? { preflightLimiter: cfg.regsPreflightLimiter } : {}),
|
|
13
13
|
...(cfg.dispatcher ? { dispatcher: cfg.dispatcher } : {}),
|
|
14
14
|
});
|
|
15
|
+
const client = new RegulationsClient(http);
|
|
15
16
|
return {
|
|
16
17
|
name: 'regs',
|
|
17
18
|
label: 'Regulations.gov',
|
|
18
19
|
enabled,
|
|
19
20
|
disabledReason: enabled ? undefined : 'regulations.gov requires an API key. Set FEDREG_REGS_API_KEY (free at https://open.gsa.gov/api/regulationsgov/).',
|
|
20
|
-
client
|
|
21
|
+
client,
|
|
22
|
+
methods: Object.freeze({
|
|
23
|
+
'documents.search': client.documents.search,
|
|
24
|
+
'documents.get': client.documents.get,
|
|
25
|
+
'comments.search': client.comments.search,
|
|
26
|
+
'comments.get': client.comments.get,
|
|
27
|
+
'dockets.search': client.dockets.search,
|
|
28
|
+
'dockets.get': client.dockets.get,
|
|
29
|
+
}),
|
|
21
30
|
corpus: loadSourceCorpus('regs'),
|
|
22
31
|
};
|
|
23
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regs.js","sourceRoot":"","sources":["../../../src/sdk/sources/regs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA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AE,MAAM,CAAC,MAAM,CAAC;YACrB,kBAAkB,EAAE,MAAM,CAAC,SAAS,CAAC,MAAM;YAC3C,eAAe,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG;YACrC,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;YACzC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG;YACnC,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM;YACvC,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG;SAClC,CAAC;QACF,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -8,11 +8,13 @@ export interface SourceMeta {
|
|
|
8
8
|
}
|
|
9
9
|
export interface Source extends SourceMeta {
|
|
10
10
|
client: object;
|
|
11
|
+
methods: RpcMethods;
|
|
11
12
|
corpus: {
|
|
12
13
|
endpoints: CorpusEntry[];
|
|
13
14
|
fields: CorpusEntry[];
|
|
14
15
|
};
|
|
15
16
|
}
|
|
17
|
+
export type RpcMethods = Readonly<Record<string, (...args: any[]) => unknown>>;
|
|
16
18
|
export interface SourceConfig {
|
|
17
19
|
frBaseUrl: string;
|
|
18
20
|
ecfrBaseUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/sdk/sources/source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE;Q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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpServer.d.ts","sourceRoot":"","sources":["../../src/server/mcpServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuC,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,eAAe,CAAC;AA2BjD,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"mcpServer.d.ts","sourceRoot":"","sources":["../../src/server/mcpServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuC,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,eAAe,CAAC;AA2BjD,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAuCpF"}
|
package/dist/server/mcpServer.js
CHANGED
|
@@ -34,14 +34,16 @@ function cachedInputSchema(name, jsonSchema) {
|
|
|
34
34
|
return converted;
|
|
35
35
|
}
|
|
36
36
|
export function buildMcpServer(deps, requestCtx) {
|
|
37
|
-
const server = new McpServer({ name: 'fedreg-mcp-server', version: '2.0.
|
|
37
|
+
const server = new McpServer({ name: 'fedreg-mcp-server', version: '2.0.6' }, // x-release-version
|
|
38
38
|
{
|
|
39
39
|
capabilities: { tools: {} },
|
|
40
40
|
cacheHints: { 'tools/list': LIST_CACHE_HINT, 'server/discover': LIST_CACHE_HINT },
|
|
41
41
|
});
|
|
42
42
|
for (const tool of buildCatalog(deps, requestCtx)) {
|
|
43
43
|
server.registerTool(tool.name, {
|
|
44
|
+
title: tool.title,
|
|
44
45
|
description: tool.description,
|
|
46
|
+
annotations: tool.annotations,
|
|
45
47
|
// The catalog emits JSON Schema; `fromJsonSchema` attaches the SDK's default Ajv
|
|
46
48
|
// validator, so arguments are checked here BEFORE the handler re-parses with Zod.
|
|
47
49
|
// Note `zodToJsonSchema` emits `additionalProperties: false`, so unknown argument
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpServer.js","sourceRoot":"","sources":["../../src/server/mcpServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAuB,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAoB,MAAM,kBAAkB,CAAC;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAEjD,wFAAwF;AACxF,sFAAsF;AACtF,MAAM,eAAe,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAiB,EAAE,CAAC;AAE1E;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA6C,CAAC;AAE9E,SAAS,iBAAiB,CAAC,IAAY,EAAE,UAAmB;IAC1D,IAAI,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,SAAS,GAAG,cAAc,CAAC,UAA4B,CAAC,CAAC;QACzD,gBAAgB,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAiB,EAAE,UAAuB;IACvE,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,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
|
|
|
1
|
+
import type { ToolAnnotations } from '@modelcontextprotocol/server';
|
|
1
2
|
import { type RequestCtx } from '../tools/execute.js';
|
|
2
3
|
import type { Sdk } from '../sdk/bindings.js';
|
|
3
4
|
import type { SandboxRunner } from '../sandbox/types.js';
|
|
@@ -5,7 +6,9 @@ import type { Corpus } from '../search/corpus.js';
|
|
|
5
6
|
import type { SubjectQuota } from '../util/quotas.js';
|
|
6
7
|
export interface ToolDescriptor {
|
|
7
8
|
name: string;
|
|
9
|
+
title: string;
|
|
8
10
|
description: string;
|
|
11
|
+
annotations: ToolAnnotations;
|
|
9
12
|
inputSchema: Record<string, unknown>;
|
|
10
13
|
handler: (args: unknown) => Promise<unknown>;
|
|
11
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolCatalog.d.ts","sourceRoot":"","sources":["../../src/server/toolCatalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toolCatalog.d.ts","sourceRoot":"","sources":["../../src/server/toolCatalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpE,OAAO,EAAyB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,YAAY,CAAC;CAChC;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,cAAc,EAAE,CAkCzF"}
|
|
@@ -8,19 +8,27 @@ export function buildCatalog(deps, requestCtx) {
|
|
|
8
8
|
return [
|
|
9
9
|
{
|
|
10
10
|
name: 'search_api',
|
|
11
|
-
|
|
11
|
+
title: 'Search Regulatory API Documentation',
|
|
12
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
13
|
+
description: `BM25 search over the API endpoints and curated field dictionary for all bound sources (${names}). Returns method signatures and JavaScript examples for use in execute.`,
|
|
12
14
|
inputSchema: zodToJsonSchema(SearchApiInput),
|
|
13
15
|
handler: async (args) => searchApi(SearchApiInput.parse(args), deps.corpus),
|
|
14
16
|
},
|
|
15
17
|
{
|
|
16
18
|
name: 'describe_schema',
|
|
19
|
+
title: 'Describe Regulatory API Schema',
|
|
20
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
17
21
|
description: `Look up an endpoint or field by exact dotted id (path) or by namespace prefix. Use to drill into the bound source surfaces (${namespaces}).`,
|
|
18
22
|
inputSchema: zodToJsonSchema(DescribeSchemaInput),
|
|
19
23
|
handler: async (args) => describeSchema(DescribeSchemaInput.parse(args), deps.corpus.entries),
|
|
20
24
|
},
|
|
21
25
|
{
|
|
22
26
|
name: 'execute',
|
|
23
|
-
|
|
27
|
+
title: 'Query Federal Regulatory Data',
|
|
28
|
+
// The sandbox SDK only reads upstream data. Idempotence describes external
|
|
29
|
+
// effects, not identical results; annotations do not enforce permissions.
|
|
30
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
31
|
+
description: `Run JavaScript inside a sandbox (no net, fs, env, or subprocess). Plain JS only — TypeScript type annotations are rejected. Globals: ${names}. Top-level await is allowed; \`return\` the value you want as the result.`,
|
|
24
32
|
inputSchema: zodToJsonSchema(ExecuteInput),
|
|
25
33
|
handler: async (args) => execute(ExecuteInput.parse(args), deps, requestCtx),
|
|
26
34
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolCatalog.js","sourceRoot":"","sources":["../../src/server/toolCatalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toolCatalog.js","sourceRoot":"","sources":["../../src/server/toolCatalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAmB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAuBvD,MAAM,UAAU,YAAY,CAAC,IAAiB,EAAE,UAAuB;IACrE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1E,OAAO;QACL;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,qCAAqC;YAC5C,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;YACv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|
4
|
-
code: z.string().min(1).describe('
|
|
4
|
+
code: z.string().min(1).describe('JavaScript to run inside the sandbox (plain JS: TypeScript type annotations are rejected; top-level await/return are allowed). SDK globals are bound per source (e.g. `fr`, `ecfr`, `regs`).'),
|
|
5
5
|
timeoutMs: z.number().int().min(100).max(60_000).default(15_000),
|
|
6
6
|
memoryMb: z.number().int().min(16).max(256).default(64),
|
|
7
7
|
});
|
|
@@ -21,7 +21,7 @@ export async function execute(input, deps, requestCtx) {
|
|
|
21
21
|
}
|
|
22
22
|
regsCalls++;
|
|
23
23
|
}
|
|
24
|
-
return dispatch(
|
|
24
|
+
return dispatch(deps.sdk, req);
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../src/tools/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../src/tools/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8LAA8L,CAAC;IAChO,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAA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+DAA+D,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;oBACnM,CAAC;gBACH,CAAC;gBACD,SAAS,EAAE,CAAC;YACd,CAAC;YACD,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/searchApi.js
CHANGED
|
@@ -9,6 +9,6 @@ export function searchApi(input, corpus) {
|
|
|
9
9
|
const e = corpus.entries.get(s.id);
|
|
10
10
|
return { id: e.id, kind: e.kind, binding: e.binding, description: e.description, signature: e.signature, example: e.example, score: Math.round(s.score * 1000) / 1000 };
|
|
11
11
|
});
|
|
12
|
-
return { hits, note: 'Use describe_schema with `path` for exact lookup or `prefix` to explore a namespace. Use execute to run
|
|
12
|
+
return { hits, note: 'Use describe_schema with `path` for exact lookup or `prefix` to explore a namespace. Use execute to run JavaScript (no type annotations) against the bound source globals.' };
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=searchApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchApi.js","sourceRoot":"","sources":["../../src/tools/searchApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,wGAAwG,CAAC;IAC3I,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CAC3F,CAAC,CAAC;AAQH,MAAM,UAAU,SA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AAsB,EAAE,MAAc;IAC9D,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzD,MAAM,IAAI,GAAgB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QACvC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAE,CAAC;QACpC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;IAC1K,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,4KAA4K,EAAE,CAAC;AACtM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blen/fedreg-mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Code-mode MCP server for the U.S. Federal Register, Electronic Code of Federal Regulations, and regulations.gov APIs.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "BLEN, Inc. (https://blenlabs.com)",
|
package/schema/ecfr.json
CHANGED
|
@@ -8,6 +8,22 @@
|
|
|
8
8
|
"description": "Get the full agency hierarchy in the eCFR (parent/child relationships, slugs, CFR references).",
|
|
9
9
|
"example": "await ecfr.admin.agencies()"
|
|
10
10
|
},
|
|
11
|
+
{
|
|
12
|
+
"id": "ecfr.admin.corrections",
|
|
13
|
+
"kind": "endpoint",
|
|
14
|
+
"binding": "ecfr",
|
|
15
|
+
"signature": "ecfr.admin.corrections(query?: { date?, title?, error_corrected_date? })",
|
|
16
|
+
"description": "List eCFR corrections (editorial fixes to published CFR text), optionally filtered by date, title, or the date the error was corrected.",
|
|
17
|
+
"example": "await ecfr.admin.corrections({ title: 40 })"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "ecfr.admin.corrections_for_title",
|
|
21
|
+
"kind": "endpoint",
|
|
22
|
+
"binding": "ecfr",
|
|
23
|
+
"signature": "ecfr.admin.corrections_for_title(title, query?: { date? })",
|
|
24
|
+
"description": "List eCFR corrections for a single CFR title.",
|
|
25
|
+
"example": "await ecfr.admin.corrections_for_title(40)"
|
|
26
|
+
},
|
|
11
27
|
{
|
|
12
28
|
"id": "ecfr.titles.list",
|
|
13
29
|
"kind": "endpoint",
|
package/schema/fr.json
CHANGED
|
@@ -56,6 +56,14 @@
|
|
|
56
56
|
"description": "Fetch one public inspection document by document number.",
|
|
57
57
|
"example": "await fr.publicInspection.get('2024-99999')"
|
|
58
58
|
},
|
|
59
|
+
{
|
|
60
|
+
"id": "fr.publicInspection.getMany",
|
|
61
|
+
"kind": "endpoint",
|
|
62
|
+
"binding": "fr",
|
|
63
|
+
"signature": "fr.publicInspection.getMany(documentNumbers, fields?)",
|
|
64
|
+
"description": "Fetch several public inspection documents by document number in one request.",
|
|
65
|
+
"example": "await fr.publicInspection.getMany(['2024-99998', '2024-99999'])"
|
|
66
|
+
},
|
|
59
67
|
{
|
|
60
68
|
"id": "fr.agencies.list",
|
|
61
69
|
"kind": "endpoint",
|