score-mcp-quickstart 0.0.0-stage → 0.1.0
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/LICENSE +9 -0
- package/README.md +21 -2
- package/mcp-score.mjs +34 -0
- package/package.json +12 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 S.C.A.L.A. (Alessandro Binda)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Quickstart: company data for your AI agent in 5 minutes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
1. Get a free key (50 calls/month, no card): https://score.get-scala.com/api/free-key
|
|
4
|
+
2. Try it:
|
|
5
|
+
```bash
|
|
6
|
+
export SCORE_API_KEY=sk_score_...
|
|
7
|
+
curl -H "X-API-Key: $SCORE_API_KEY" "https://score.get-scala.com/api/v1/search?tax_id=IT00159560366&limit=1"
|
|
8
|
+
curl -H "X-API-Key: $SCORE_API_KEY" "https://score.get-scala.com/api/v1/usage"
|
|
9
|
+
```
|
|
10
|
+
3. Know what you get: call `/api/v1/company/{id}` and read `revenue_type` (`reported` = filed accounts, `estimated` = model estimate) and `revenue_confidence`. Search results alone don't carry it.
|
|
11
|
+
4. Give it to your agent (MCP, stdio):
|
|
12
|
+
```bash
|
|
13
|
+
npm i @modelcontextprotocol/sdk zod
|
|
14
|
+
SCORE_API_KEY=sk_score_... node mcp-score.mjs
|
|
15
|
+
```
|
|
16
|
+
Claude Desktop / Claude Code config: `{"mcpServers":{"score":{"command":"node","args":["/path/mcp-score.mjs"],"env":{"SCORE_API_KEY":"sk_score_..."}}}}`
|
|
17
|
+
Tools: `search_companies` (name or tax id, optional country), `get_company`, `get_usage`.
|
|
18
|
+
Each call = 1 credit. Free key: 50/month. Paid packs: one-time credits (500 = €15, 2,000 = €39), no subscription. Redistribution: keep the `data_licences` attribution.
|
|
19
|
+
|
|
20
|
+
Data licences: responses include a `data_licences` block; keep the attribution when you redistribute data. Financials are returned only for FR, NO, LT, EE, LV, CO.
|
|
21
|
+
|
|
22
|
+
API documentation, plans and keys: https://score.get-scala.com/api/?utm_source=github&utm_medium=readme&utm_campaign=mcp
|
package/mcp-score.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Minimal MCP server: company data for your AI agent via the S.C.A.L.A. Score API.
|
|
3
|
+
// Run: SCORE_API_KEY=sk_... node mcp-score.mjs (deps: npm i @modelcontextprotocol/sdk zod)
|
|
4
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
|
|
8
|
+
const BASE = "https://score.get-scala.com/api/v1";
|
|
9
|
+
const KEY = process.env.SCORE_API_KEY;
|
|
10
|
+
if (!KEY) { console.error("Set SCORE_API_KEY (free key: https://score.get-scala.com/api/free-key)"); process.exit(1); }
|
|
11
|
+
|
|
12
|
+
async function call(path, params = {}) {
|
|
13
|
+
const url = new URL(BASE + path);
|
|
14
|
+
for (const [k, v] of Object.entries(params)) if (v !== undefined && v !== "") url.searchParams.set(k, String(v));
|
|
15
|
+
const res = await fetch(url, { headers: { "X-API-Key": KEY } });
|
|
16
|
+
const text = await res.text();
|
|
17
|
+
return { content: [{ type: "text", text: res.ok ? text : `HTTP ${res.status}: ${text}` }], isError: !res.ok };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const server = new McpServer({ name: "score-company-data", version: "0.1.0" });
|
|
21
|
+
|
|
22
|
+
server.registerTool("search_companies", {
|
|
23
|
+
description: "Search companies by name (prefix match) or by tax/VAT id. 1 credit per call. Check revenue_type: 'reported' = filed accounts, 'estimated' = model estimate.",
|
|
24
|
+
inputSchema: { q: z.string().optional(), tax_id: z.string().optional(), country: z.string().length(2).optional(), limit: z.number().int().min(1).max(100).optional() },
|
|
25
|
+
}, (a) => call("/search", a));
|
|
26
|
+
|
|
27
|
+
server.registerTool("get_company", {
|
|
28
|
+
description: "Full profile for a company id returned by search_companies (includes revenue_type, revenue_confidence, source). 1 credit.",
|
|
29
|
+
inputSchema: { id: z.string() },
|
|
30
|
+
}, ({ id }) => call("/company/" + encodeURIComponent(id)));
|
|
31
|
+
|
|
32
|
+
server.registerTool("get_usage", { description: "Remaining credits for this key (free).", inputSchema: {} }, () => call("/usage"));
|
|
33
|
+
|
|
34
|
+
await server.connect(new StdioServerTransport());
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "score-mcp-quickstart",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server: company data for AI agents (search 249M+ companies) via the S.C.A.L.A. Score API",
|
|
5
|
+
"mcpName": "io.github.alessandro114/score-mcp-quickstart",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": { "score-mcp-quickstart": "mcp-score.mjs" },
|
|
8
|
+
"files": ["mcp-score.mjs", "README.md", "LICENSE"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": { "type": "git", "url": "git+https://github.com/Alessandro114/score-mcp-quickstart.git" },
|
|
11
|
+
"homepage": "https://score.get-scala.com/api/",
|
|
12
|
+
"keywords": ["mcp", "model-context-protocol", "company-data", "business-intelligence", "ai-agents"],
|
|
13
|
+
"dependencies": { "@modelcontextprotocol/sdk": "1.30.0", "zod": "^3.25.0" }
|
|
14
|
+
}
|