swissco-mcp 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.
Files changed (3) hide show
  1. package/README.md +107 -0
  2. package/index.js +48 -0
  3. package/package.json +43 -0
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # swissco-mcp
2
+
3
+ <!-- mcp-name: ch.prospex/swissco -->
4
+
5
+ An MCP server for Swiss company data. Nine tools that look a company up by UID,
6
+ search 790,000 of them by name or by statutory purpose, trace what changed in
7
+ the commercial register, browse public tenders, check a bank licence, resolve a
8
+ UID to an LEI and its group parent, and find federally funded research a company
9
+ took part in.
10
+
11
+ ```bash
12
+ npx swissco-mcp
13
+ ```
14
+
15
+ All data comes from six open-data sources, none of which needs a credential:
16
+ [Zefix on LINDAS](https://ld.admin.ch/) for the commercial register, the
17
+ [Amtsblattportal](https://amtsblattportal.ch) for the Swiss Official Gazette of
18
+ Commerce, [simap.ch](https://www.simap.ch) for public procurement,
19
+ [FINMA](https://www.finma.ch) for authorised banks and securities firms,
20
+ [GLEIF](https://www.gleif.org) for the Legal Entity Identifier and group
21
+ structure, and [ARAMIS](https://www.aramis.admin.ch) for federally funded
22
+ research.
23
+
24
+ Built and maintained by [Prospex](https://prospex.ch), a Swiss B2B sales
25
+ intelligence platform.
26
+
27
+ ## What this package is
28
+
29
+ This package is a launcher. The server itself is the Python package
30
+ [`swissco-mcp`](https://pypi.org/project/swissco-mcp/), and this hands stdio
31
+ straight through to it, so an npm-shaped host can start it with `npx`.
32
+
33
+ It needs [uv](https://docs.astral.sh/uv/) on the path:
34
+
35
+ ```bash
36
+ curl -LsSf https://astral.sh/uv/install.sh | sh
37
+ ```
38
+
39
+ To skip the launcher entirely, install the Python package and run `swissco-mcp`:
40
+
41
+ ```bash
42
+ pip install swissco-mcp
43
+ ```
44
+
45
+ ## Register it
46
+
47
+ Claude Code takes one command:
48
+
49
+ ```bash
50
+ claude mcp add swissco -- npx swissco-mcp
51
+ ```
52
+
53
+ Anything that reads a JSON config takes the equivalent block:
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "swissco": {
59
+ "command": "npx",
60
+ "args": ["swissco-mcp"]
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ## Tools
67
+
68
+ | Tool | What it answers |
69
+ | --- | --- |
70
+ | `swissco_lookup` | Everything the register publishes about one company, optionally with its FINMA licence and its LEI |
71
+ | `swissco_search` | Companies whose legal name or statutory purpose contains a term |
72
+ | `swissco_publications` | Commercial-register publications from the gazette in a date range |
73
+ | `swissco_events` | One company's registry events, each confirmed against the publication's own UID |
74
+ | `swissco_tenders` | Public-procurement projects published on simap |
75
+ | `swissco_vendor` | Whether a company holds a simap vendor profile, and what it says |
76
+ | `swissco_finma` | Institutions on FINMA's list of authorised banks and securities firms |
77
+ | `swissco_lei` | A company's LEI, the entity that consolidates it, and the entity at the top of that chain |
78
+ | `swissco_research` | Federally funded research projects, Innosuisse and SNSF money included |
79
+
80
+ Every tool returns `rows`, a `count`, and `notes`. The notes carry what each
81
+ source covers, which is what turns an empty result into an answer: FINMA's list
82
+ omits insurers and portfolio managers, and about 28,000 Swiss entities hold an
83
+ LEI against roughly 790,000 in the register.
84
+
85
+ ## Configuration
86
+
87
+ Every tool works with nothing set.
88
+
89
+ | Variable | Effect |
90
+ | --- | --- |
91
+ | `ZEFIX_USER`, `ZEFIX_PASSWORD` | Zefix PublicREST credentials, issued by `zefix@bj.admin.ch`. They add capital, status, former names and corporate relations to `swissco_lookup`, and a name-prefix search to `swissco_search` |
92
+ | `SWISSCO_STATE` | Where gazette bodies and the two FINMA files are cached. Defaults to `~/.swissco` |
93
+ | `SWISSCO_INTERVAL` | Seconds between requests. It can raise the floor of 0.5s and cannot lower it |
94
+
95
+ ## Documentation
96
+
97
+ Full reference for every tool, its arguments and its caveats:
98
+ [swissco-mcp.readthedocs.io](https://swissco-mcp.readthedocs.io).
99
+
100
+ The same data is available as a shell command:
101
+ [swissco](https://pypi.org/project/swissco/).
102
+
103
+ ## Licence
104
+
105
+ MIT. The data belongs to its publishers, and each source's own terms apply;
106
+ the [access and terms](https://github.com/prospex-ch/swissco-cli#access-and-terms)
107
+ section lists them.
package/index.js ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // A launcher, not a second implementation. The server itself is the Python
5
+ // package `swissco-mcp` on PyPI; this hands stdio straight through to it so an
6
+ // npm-shaped host can start it the same way a Python-shaped one does.
7
+
8
+ const { spawn } = require("node:child_process");
9
+
10
+ const VERSION = require("./package.json").version;
11
+ const SPEC = `swissco-mcp@${VERSION}`;
12
+
13
+ const MISSING_UV = `swissco-mcp needs uv to run the Python server.
14
+
15
+ Install it:
16
+
17
+ curl -LsSf https://astral.sh/uv/install.sh | sh # macOS, Linux
18
+ powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows
19
+
20
+ Or install the server directly and run it as swissco-mcp:
21
+
22
+ pip install ${SPEC.replace("@", "==")}
23
+
24
+ https://swissco-mcp.readthedocs.io
25
+ `;
26
+
27
+ const child = spawn("uvx", [SPEC, ...process.argv.slice(2)], {
28
+ stdio: "inherit",
29
+ });
30
+
31
+ child.on("error", (error) => {
32
+ process.stderr.write(error.code === "ENOENT" ? MISSING_UV : `${error.message}\n`);
33
+ process.exit(1);
34
+ });
35
+
36
+ // Forward the signals a host uses to stop a server, so the Python process gets
37
+ // the chance to shut its clients down rather than being orphaned.
38
+ for (const signal of ["SIGINT", "SIGTERM"]) {
39
+ process.on(signal, () => child.kill(signal));
40
+ }
41
+
42
+ child.on("exit", (code, signal) => {
43
+ if (signal) {
44
+ process.kill(process.pid, signal);
45
+ return;
46
+ }
47
+ process.exit(code === null ? 1 : code);
48
+ });
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "swissco-mcp",
3
+ "version": "0.1.0",
4
+ "mcpName": "ch.prospex/swissco",
5
+ "description": "MCP server for Swiss company data: Zefix, SHAB, simap, FINMA, GLEIF and ARAMIS",
6
+ "keywords": [
7
+ "mcp",
8
+ "modelcontextprotocol",
9
+ "model-context-protocol",
10
+ "swiss",
11
+ "switzerland",
12
+ "zefix",
13
+ "shab",
14
+ "handelsregister",
15
+ "commercial-register",
16
+ "simap",
17
+ "finma",
18
+ "procurement",
19
+ "public-tenders",
20
+ "lei",
21
+ "gleif",
22
+ "aramis"
23
+ ],
24
+ "homepage": "https://prospex.ch",
25
+ "bugs": "https://github.com/prospex-ch/swissco-cli/issues",
26
+ "license": "MIT",
27
+ "author": "Prospex <hello@prospex.ch> (https://prospex.ch)",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/prospex-ch/swissco-cli.git",
31
+ "directory": "npm"
32
+ },
33
+ "bin": {
34
+ "swissco-mcp": "index.js"
35
+ },
36
+ "files": [
37
+ "index.js",
38
+ "README.md"
39
+ ],
40
+ "engines": {
41
+ "node": ">=18"
42
+ }
43
+ }