krs-poland-mcp-server 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 (3) hide show
  1. package/README.md +17 -10
  2. package/build.mjs +34 -0
  3. package/package.json +13 -6
package/README.md CHANGED
@@ -4,15 +4,7 @@
4
4
 
5
5
  The MCP server for KRS Poland public API.
6
6
 
7
- ## Installation
8
-
9
- To install the package, run the following command:
10
-
11
- ```bash
12
- npm install -g krs-poland-mcp-server
13
- ```
14
-
15
- ## Usage with NPX
7
+ ## Usage
16
8
 
17
9
  You can also use `npx` to run the server without installing it globally:
18
10
 
@@ -39,7 +31,22 @@ npm start
39
31
  This MCP server can be used to provide tools to LLM clients. To serve the tools, run the following command:
40
32
 
41
33
  ```bash
42
- npx krs-poland-mcp-server serve
34
+ npx -y krs-poland-mcp-server
35
+ ```
36
+
37
+ and config:
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "krs-poland-mcp-server": {
42
+ "command": "npx",
43
+ "args": [
44
+ "-y",
45
+ "krs-poland-mcp-server"
46
+ ]
47
+ }
48
+ }
49
+ }
43
50
  ```
44
51
 
45
52
  ## Author
package/build.mjs ADDED
@@ -0,0 +1,34 @@
1
+
2
+ import esbuild from 'esbuild';
3
+ import { exec } from 'child_process';
4
+
5
+ const isWatch = process.argv.includes('--watch');
6
+
7
+ esbuild.build({
8
+ entryPoints: ['src/index.ts'],
9
+ bundle: true,
10
+ platform: 'node',
11
+ target: 'node16',
12
+ outfile: 'build/index.mjs',
13
+ format: 'esm',
14
+ external: ['@modelcontextprotocol/sdk'],
15
+ banner: {
16
+ js: '#!/usr/bin/env node',
17
+ },
18
+ watch: isWatch ? {
19
+ onRebuild(error, result) {
20
+ if (error) console.error('watch build failed:', error);
21
+ else console.log('watch build succeeded:', result);
22
+ },
23
+ } : undefined,
24
+ }).then(() => {
25
+ exec('chmod +x build/index.mjs', (err, stdout, stderr) => {
26
+ if (err) {
27
+ console.error(err);
28
+ return;
29
+ }
30
+ console.log(stdout);
31
+ console.error(stderr);
32
+ });
33
+ console.log(isWatch ? 'Watching for changes...' : 'Build finished.');
34
+ }).catch(() => process.exit(1));
package/package.json CHANGED
@@ -1,18 +1,24 @@
1
1
  {
2
2
  "name": "krs-poland-mcp-server",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "The MCP server for KRS Poland public API.",
5
- "main": "./src/index.ts",
5
+ "main": "./build/index.mjs",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
- "build": "tsc && echo '#!/usr/bin/env node' | cat - build/index.js > build/index.tmp && mv build/index.tmp build/index.js && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
9
- "start": "node build/index.js"
8
+ "build": "node build.mjs",
9
+ "watch": "node build.mjs --watch",
10
+ "start": "node build/index.mjs"
10
11
  },
11
12
  "repository": {
12
13
  "type": "git",
13
14
  "url": "git+https://github.com/pkolawa/krs-poland-mcp-server.git"
14
15
  },
15
- "keywords": ["mcp", "poland", "krs", "server"],
16
+ "keywords": [
17
+ "mcp",
18
+ "poland",
19
+ "krs",
20
+ "server"
21
+ ],
16
22
  "author": {
17
23
  "name": "Piotr Kolawa",
18
24
  "email": "p.kolawa@gmail.com"
@@ -20,7 +26,7 @@
20
26
  "license": "MIT",
21
27
  "type": "module",
22
28
  "bin": {
23
- "krs-poland-mcp-server": "./build/index.js"
29
+ "krs-poland-mcp-server": "./build/index.mjs"
24
30
  },
25
31
  "bugs": {
26
32
  "url": "https://github.com/pkolawa/krs-poland-mcp-server/issues"
@@ -32,6 +38,7 @@
32
38
  },
33
39
  "devDependencies": {
34
40
  "@types/node": "^24.3.1",
41
+ "esbuild": "^0.25.9",
35
42
  "typescript": "^5.9.2"
36
43
  }
37
44
  }