@caseywebb/elm-package-mcp-server 0.2.2 → 0.3.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/README.md CHANGED
@@ -70,7 +70,7 @@ The easiest way to install is to download a pre-built binary from the [latest re
70
70
  ```bash
71
71
  # System-wide installation
72
72
  sudo mv elm-package-mcp-server /usr/local/bin/
73
-
73
+
74
74
  # User installation
75
75
  mv elm-package-mcp-server ~/.local/bin/
76
76
  ```
@@ -139,9 +139,9 @@ The server must be run from a directory containing an elm.json file or any subdi
139
139
 
140
140
  ### Available Tools
141
141
 
142
- The server provides four tools for working with Elm packages. All tools are prefixed with `elm` to help with discoverability when working with Elm language projects.
142
+ The server provides five tools for working with Elm packages. All tools are prefixed with `elm` to help with discoverability when working with Elm language projects.
143
143
 
144
- #### list_elm_packages
144
+ #### list_installed_packages
145
145
  Lists all Elm packages from elm.json file. This tool discovers available Elm language dependencies in your project.
146
146
 
147
147
  Parameters:
@@ -164,6 +164,30 @@ Example response:
164
164
  }
165
165
  ```
166
166
 
167
+ #### search_packages
168
+ Search the Elm package registry for packages matching a query. Uses fuzzy matching on package names and descriptions. Perfect for discovering new packages.
169
+
170
+ Parameters:
171
+ - `query` (required, string): Search query - can be package name, keywords, or description of what you're looking for (e.g., 'json decode', 'http', 'date formatting')
172
+ - `already_included` (optional, boolean): Include packages already in elm.json (default: true). Set to false to only show packages not yet installed.
173
+
174
+ Example response:
175
+ ```json
176
+ {
177
+ "query": "json",
178
+ "results": [
179
+ {
180
+ "name": "elm/json",
181
+ "summary": "Encode and decode JSON values",
182
+ "license": "BSD-3-Clause",
183
+ "version": "1.1.3"
184
+ }
185
+ ],
186
+ "count": 1,
187
+ "excluded_installed": false
188
+ }
189
+ ```
190
+
167
191
  #### get_elm_package_readme
168
192
  Fetches the README documentation for a specific Elm language package from package.elm-lang.org.
169
193
 
@@ -209,8 +233,9 @@ Example response:
209
233
 
210
234
  ### Workflow Example
211
235
 
212
- 1. First, use `list_elm_packages` to discover available packages:
213
- - This returns all packages with their authors, names, and versions
236
+ 1. First, use `list_installed_packages` to discover available packages in your project, or use `search_packages` to find new packages:
237
+ - `list_installed_packages` returns all packages with their authors, names, and versions
238
+ - `search_packages` finds packages in the Elm registry matching your query
214
239
  2. Then, use the returned information to fetch documentation:
215
240
  - Call `get_elm_package_readme` with author, name, and version for overview
216
241
  - Call `get_elm_package_exports` to see all available functions and types without comments
@@ -221,6 +246,56 @@ Example response:
221
246
  #### elm://elm.json
222
247
  The project's elm.json file, accessible as a resource.
223
248
 
249
+ ### Available Prompts
250
+
251
+ The server provides six prompts to help with common Elm development workflows:
252
+
253
+ #### analyze-dependencies
254
+ Analyze your Elm project's dependencies, explaining what each package does and suggesting optimizations. Proactively used when you ask about your elm.json or project structure.
255
+
256
+ **No parameters required**
257
+
258
+ #### explore-package
259
+ Explore the capabilities of a specific Elm package by examining its exports, modules, and key functions.
260
+
261
+ **Parameters:**
262
+ - `package` (required): Package name in format 'author/name' (e.g., 'elm/core')
263
+
264
+ **Example:** `/explore-package package=elm/json`
265
+
266
+ #### find-function
267
+ Search for functions across your Elm dependencies that match a specific capability or use case.
268
+
269
+ **Parameters:**
270
+ - `capability` (required): What you want to accomplish (e.g., 'parse JSON', 'map over a list', 'handle HTTP errors')
271
+
272
+ **Example:** `/find-function capability="parse JSON"`
273
+
274
+ #### debug-import
275
+ Explain what functions and types are available from a specific Elm module import. Useful when you have import errors or questions about available functions from an import.
276
+
277
+ **Parameters:**
278
+ - `module_path` (required): Full module path (e.g., 'List', 'Html.Attributes', 'Json.Decode')
279
+
280
+ **Example:** `/debug-import module_path=Json.Decode`
281
+
282
+ #### discover-packages
283
+ Discover new Elm packages for a specific need or use case. Proactively used when you describe a problem that might need a new package.
284
+
285
+ **Parameters:**
286
+ - `need` (required): What you need to accomplish (e.g., 'parsing CSV', 'working with dates', 'making HTTP requests')
287
+
288
+ **Example:** `/discover-packages need="working with dates"`
289
+
290
+ #### package-comparison
291
+ Compare two Elm packages to help choose the best one for a specific use case.
292
+
293
+ **Parameters:**
294
+ - `package1` (required): First package in format 'author/name'
295
+ - `package2` (required): Second package in format 'author/name'
296
+
297
+ **Example:** `/package-comparison package1=elm/json package2=NoRedInk/elm-json-decode-pipeline`
298
+
224
299
  ## CLI Options
225
300
 
226
301
  - `--mcp`: Run as an MCP server for Elm package documentation
package/bin/cli.js CHANGED
@@ -8,18 +8,26 @@ function getBinaryPath() {
8
8
  const platform = os.platform();
9
9
  const arch = os.arch();
10
10
 
11
- if (platform !== 'darwin') {
12
- console.error('Error: Only macOS is currently supported');
13
- process.exit(1);
14
- }
15
-
16
11
  let binaryName;
17
- if (arch === 'arm64') {
18
- binaryName = 'elm-package-mcp-server-macos-aarch64';
19
- } else if (arch === 'x64') {
20
- binaryName = 'elm-package-mcp-server-macos-x86_64';
12
+
13
+ if (platform === 'linux') {
14
+ if (arch === 'x64') {
15
+ binaryName = 'elm-package-mcp-server-linux-x86_64';
16
+ } else {
17
+ console.error(`Error: Unsupported Linux architecture: ${arch}`);
18
+ process.exit(1);
19
+ }
20
+ } else if (platform === 'darwin') {
21
+ if (arch === 'arm64') {
22
+ binaryName = 'elm-package-mcp-server-macos-aarch64';
23
+ } else if (arch === 'x64') {
24
+ binaryName = 'elm-package-mcp-server-macos-x86_64';
25
+ } else {
26
+ console.error(`Error: Unsupported macOS architecture: ${arch}`);
27
+ process.exit(1);
28
+ }
21
29
  } else {
22
- console.error(`Error: Unsupported architecture: ${arch}`);
30
+ console.error(`Error: Unsupported platform: ${platform}`);
23
31
  process.exit(1);
24
32
  }
25
33
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseywebb/elm-package-mcp-server",
3
3
  "private": false,
4
- "version": "0.2.2",
4
+ "version": "0.3.0",
5
5
  "description": "Model Context Protocol (MCP) server for Elm language package documentation. Provides tools to list Elm packages from elm.json and fetch README/API docs from package.elm-lang.org",
6
6
  "bin": {
7
7
  "elm-package-mcp-server": "./bin/cli.js"
@@ -11,7 +11,7 @@
11
11
  "binaries/"
12
12
  ],
13
13
  "scripts": {
14
- "prepublishOnly": "test -f binaries/elm-package-mcp-server-macos-x86_64 && test -f binaries/elm-package-mcp-server-macos-aarch64 || (echo 'Error: Binaries not found. Run just npm-prepare-binaries first.' && exit 1)"
14
+ "prepublishOnly": "test -f binaries/elm-package-mcp-server-macos-x86_64 && test -f binaries/elm-package-mcp-server-macos-aarch64 && test -f binaries/elm-package-mcp-server-linux-x86_64 || (echo 'Error: Binaries not found. Run just npm-prepare-binaries first.' && exit 1)"
15
15
  },
16
16
  "keywords": [
17
17
  "elm",
@@ -31,6 +31,7 @@
31
31
  "node": ">=18"
32
32
  },
33
33
  "os": [
34
- "darwin"
34
+ "darwin",
35
+ "linux"
35
36
  ]
36
37
  }