getregdata-mcp 1.0.3 → 1.0.4

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 (4) hide show
  1. package/README.md +16 -1
  2. package/actors.js +1440 -32
  3. package/index.js +31 -19
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -13,8 +13,10 @@ import {
13
13
  CallToolRequestSchema,
14
14
  ListToolsRequestSchema,
15
15
  } from "@modelcontextprotocol/sdk/types.js";
16
+ import { createRequire } from "node:module";
16
17
  import { ACTORS } from "./actors.js";
17
18
 
19
+ const pkg = createRequire(import.meta.url)("./package.json");
18
20
  const APIFY_BASE = "https://api.apify.com/v2";
19
21
  const token = () => process.env.APIFY_TOKEN || process.env.APIFY_API_TOKEN || "";
20
22
 
@@ -64,25 +66,35 @@ const bySlug = Object.fromEntries(ACTORS.map((a) => [a.slug, a]));
64
66
  const byTool = Object.fromEntries(ACTORS.map((a) => [a.tool, a]));
65
67
 
66
68
  // One tool per actor + two helpers (catalog, describe).
69
+ const MAX_ITEMS_PROP = {
70
+ type: "integer",
71
+ description: "Optional cap on billed dataset items returned.",
72
+ };
73
+
67
74
  function buildToolList() {
68
- const actorTools = ACTORS.map((a) => ({
69
- name: a.tool,
70
- description:
71
- `${a.title}. ${a.description} ` +
72
- `Pass the registry's search input as a flat object (e.g. name, tax ID, or registration number); ` +
73
- `call regdata_describe with slug "${a.slug}" first if unsure of the exact fields.`,
74
- inputSchema: {
75
- type: "object",
76
- description: `Input for regdata/${a.slug}. Freeform - matches the actor's Apify input schema.`,
77
- properties: {
78
- maxItems: {
79
- type: "integer",
80
- description: "Optional cap on billed dataset items returned.",
81
- },
82
- },
83
- additionalProperties: true,
84
- },
85
- }));
75
+ const actorTools = ACTORS.map((a) => {
76
+ // Deployed input schema baked in by scripts/gen-manifest.mjs; freeform fallback.
77
+ const schema = a.inputSchema
78
+ ? {
79
+ ...a.inputSchema,
80
+ properties: { ...a.inputSchema.properties, maxItems: MAX_ITEMS_PROP },
81
+ }
82
+ : {
83
+ type: "object",
84
+ description: `Input for regdata/${a.slug}. Freeform - matches the actor's Apify input schema.`,
85
+ properties: { maxItems: MAX_ITEMS_PROP },
86
+ additionalProperties: true,
87
+ };
88
+ const hint = a.inputSchema
89
+ ? `Advanced fields beyond this schema are also accepted (regdata_describe lists them).`
90
+ : `Pass the registry's search input as a flat object (e.g. name, tax ID, or registration number); ` +
91
+ `call regdata_describe with slug "${a.slug}" first if unsure of the exact fields.`;
92
+ return {
93
+ name: a.tool,
94
+ description: `${a.title}. ${a.description} ${hint}`,
95
+ inputSchema: schema,
96
+ };
97
+ });
86
98
 
87
99
  return [
88
100
  {
@@ -109,7 +121,7 @@ function buildToolList() {
109
121
  }
110
122
 
111
123
  const server = new Server(
112
- { name: "getregdata", version: "1.0.0" },
124
+ { name: "getregdata", version: pkg.version },
113
125
  { capabilities: { tools: {} } }
114
126
  );
115
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getregdata-mcp",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "mcpName": "io.github.Nolpak14/getregdata",
5
5
  "description": "MCP server for 29 official business-registry actors (KYC/AML, credit-risk, due-diligence, B2B data) across 11 jurisdictions - Poland, Germany, Italy, Spain, Austria, France, Belgium, Czechia, Slovakia, US (California) and UAE - plus cross-border adverse-media screening.",
6
6
  "type": "module",