@ncodeuy/medplum-mcp 0.1.1 → 0.1.2

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
@@ -31,11 +31,7 @@ npm install @ncodeuy/medplum-mcp
31
31
 
32
32
  ### Configure
33
33
 
34
- The server reads configuration from environment variables. There are two options:
35
-
36
- #### Multi-project (recommended)
37
-
38
- Set `MEDPLUM_PROJECTS` as a JSON object mapping environment names to their connection details:
34
+ The server reads configuration from the `MEDPLUM_PROJECTS` environment variable a JSON object mapping environment names to their connection details:
39
35
 
40
36
  ```bash
41
37
  MEDPLUM_PROJECTS='{
@@ -57,14 +53,6 @@ MEDPLUM_DEFAULT_PROJECT=staging
57
53
 
58
54
  `MEDPLUM_DEFAULT_PROJECT` is optional and defaults to the first entry.
59
55
 
60
- #### Single project (legacy)
61
-
62
- ```bash
63
- MEDPLUM_CLIENT_ID=your-client-id
64
- MEDPLUM_CLIENT_SECRET=your-client-secret
65
- MEDPLUM_BASE_URL=https://api.medplum.com/ # optional, this is the default
66
- ```
67
-
68
56
  ### Use with Claude Desktop
69
57
 
70
58
  Add the server to your Claude Desktop configuration (`claude_desktop_config.json`):
@@ -76,8 +64,7 @@ Add the server to your Claude Desktop configuration (`claude_desktop_config.json
76
64
  "command": "npx",
77
65
  "args": ["@ncodeuy/medplum-mcp"],
78
66
  "env": {
79
- "MEDPLUM_CLIENT_ID": "your-client-id",
80
- "MEDPLUM_CLIENT_SECRET": "your-client-secret"
67
+ "MEDPLUM_PROJECTS": "{\"default\":{\"clientId\":\"your-client-id\",\"clientSecret\":\"your-client-secret\"}}"
81
68
  }
82
69
  }
83
70
  }
package/dist/config.js CHANGED
@@ -34,20 +34,5 @@ export function loadConfig() {
34
34
  }
35
35
  return { projects, defaultProject };
36
36
  }
37
- // Legacy single-project fallback
38
- const clientId = process.env.MEDPLUM_CLIENT_ID;
39
- const clientSecret = process.env.MEDPLUM_CLIENT_SECRET;
40
- if (!clientId || !clientSecret) {
41
- throw new Error("Missing MEDPLUM_PROJECTS or MEDPLUM_CLIENT_ID/MEDPLUM_CLIENT_SECRET environment variables.");
42
- }
43
- return {
44
- projects: {
45
- default: {
46
- baseUrl: process.env.MEDPLUM_BASE_URL || "https://api.medplum.com/",
47
- clientId,
48
- clientSecret,
49
- },
50
- },
51
- defaultProject: "default",
52
- };
37
+ throw new Error("Missing MEDPLUM_PROJECTS environment variable. Set it to a JSON object mapping environment names to project configs.");
53
38
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@ncodeuy/medplum-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "bin": {
8
- "medplum-mcp": "./dist/index.js"
8
+ "medplum-mcp": "dist/index.js"
9
9
  },
10
10
  "files": [
11
11
  "dist"