@entergram/mcp 0.1.0 → 0.1.3
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 +36 -160
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,26 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Official npm CLI for connecting local MCP hosts to the public Entergram MCP gateway.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use this package when your MCP host can launch a local command but cannot connect directly to Entergram over OAuth on its own. `entergram-mcp` handles:
|
|
6
6
|
|
|
7
|
-
- OAuth login
|
|
8
|
-
-
|
|
9
|
-
- a local `stdio` bridge
|
|
10
|
-
- ready-to-paste host config snippets
|
|
11
|
-
|
|
12
|
-
Architecture:
|
|
13
|
-
|
|
14
|
-
`Local MCP host -> entergram-mcp (stdio bridge) -> Entergram MCP gateway -> Entergram Public API`
|
|
7
|
+
- OAuth login
|
|
8
|
+
- local token storage
|
|
9
|
+
- a local `stdio` bridge for MCP hosts such as Codex and Claude Desktop
|
|
15
10
|
|
|
16
11
|
## Install
|
|
17
12
|
|
|
18
|
-
Global install:
|
|
19
|
-
|
|
20
13
|
```bash
|
|
21
14
|
npm install -g @entergram/mcp
|
|
22
15
|
```
|
|
23
16
|
|
|
24
|
-
Or run it
|
|
17
|
+
Or run it without a global install:
|
|
25
18
|
|
|
26
19
|
```bash
|
|
27
20
|
npx -y @entergram/mcp serve
|
|
@@ -43,7 +36,7 @@ entergram-mcp login --env dev
|
|
|
43
36
|
entergram-mcp serve --env dev
|
|
44
37
|
```
|
|
45
38
|
|
|
46
|
-
If you use a
|
|
39
|
+
If you use a custom OAuth client, pass it explicitly:
|
|
47
40
|
|
|
48
41
|
```bash
|
|
49
42
|
entergram-mcp login --env dev --client-id entergram-ws-your-client-id
|
|
@@ -51,86 +44,42 @@ entergram-mcp login --env dev --client-id entergram-ws-your-client-id
|
|
|
51
44
|
|
|
52
45
|
## Commands
|
|
53
46
|
|
|
54
|
-
Show help:
|
|
55
|
-
|
|
56
47
|
```bash
|
|
57
48
|
entergram-mcp --help
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Login:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
49
|
entergram-mcp login
|
|
64
|
-
entergram-mcp login --env dev
|
|
65
|
-
entergram-mcp login --env dev --client-id entergram-ws-your-client-id
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Start the local bridge:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
entergram-mcp serve
|
|
72
|
-
entergram-mcp serve --env dev
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Show the currently authenticated actor:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
50
|
entergram-mcp whoami
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Clear the local session for the selected environment and client:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
51
|
entergram-mcp logout
|
|
85
|
-
entergram-mcp
|
|
52
|
+
entergram-mcp serve
|
|
53
|
+
entergram-mcp print-config
|
|
86
54
|
```
|
|
87
55
|
|
|
88
|
-
|
|
56
|
+
Useful flags:
|
|
89
57
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
```
|
|
58
|
+
- `--env dev|production`
|
|
59
|
+
- `--client-id ...`
|
|
60
|
+
- `--scope "..."`
|
|
61
|
+
- `--format json|toml`
|
|
95
62
|
|
|
96
63
|
## Host Config
|
|
97
64
|
|
|
98
|
-
|
|
65
|
+
For JSON-based MCP hosts:
|
|
99
66
|
|
|
100
67
|
```bash
|
|
101
68
|
entergram-mcp print-config --name entergram
|
|
102
69
|
```
|
|
103
70
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"mcpServers": {
|
|
109
|
-
"entergram": {
|
|
110
|
-
"command": "npx",
|
|
111
|
-
"args": ["-y", "@entergram/mcp", "serve"],
|
|
112
|
-
"env": {
|
|
113
|
-
"ENTERGRAM_MCP_ENV": "production",
|
|
114
|
-
"ENTERGRAM_MCP_CLIENT_ID": "entergram-mcp-cli",
|
|
115
|
-
"ENTERGRAM_MCP_SCOPE": "workspace.read members.read accounts.read contacts.read chats.read messages.read messages.write custom_fields.read custom_fields.write tickets.read offline_access"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### TOML hosts such as Codex
|
|
71
|
+
For TOML-based hosts such as Codex:
|
|
123
72
|
|
|
124
73
|
```bash
|
|
125
|
-
entergram-mcp print-config --format toml --name entergram-dev
|
|
74
|
+
entergram-mcp print-config --format toml --name entergram-dev
|
|
126
75
|
```
|
|
127
76
|
|
|
128
|
-
Example
|
|
77
|
+
Example TOML config:
|
|
129
78
|
|
|
130
79
|
```toml
|
|
131
80
|
[mcp_servers.entergram-dev]
|
|
132
|
-
command = "
|
|
133
|
-
args = ["
|
|
81
|
+
command = "entergram-mcp"
|
|
82
|
+
args = ["serve"]
|
|
134
83
|
|
|
135
84
|
[mcp_servers.entergram-dev.env]
|
|
136
85
|
ENTERGRAM_MCP_ENV = "dev"
|
|
@@ -138,30 +87,7 @@ ENTERGRAM_MCP_CLIENT_ID = "entergram-ws-your-client-id"
|
|
|
138
87
|
ENTERGRAM_MCP_SCOPE = "workspace.read members.read accounts.read contacts.read chats.read messages.read messages.write custom_fields.read custom_fields.write tickets.read offline_access"
|
|
139
88
|
```
|
|
140
89
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
```toml
|
|
144
|
-
[mcp_servers.entergram-dev]
|
|
145
|
-
command = "entergram-mcp"
|
|
146
|
-
args = ["serve"]
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Environment Overrides
|
|
150
|
-
|
|
151
|
-
You can override the built-in defaults with environment variables:
|
|
152
|
-
|
|
153
|
-
- `ENTERGRAM_MCP_ENV`
|
|
154
|
-
- `ENTERGRAM_MCP_GATEWAY_URL`
|
|
155
|
-
- `ENTERGRAM_MCP_CLIENT_ID`
|
|
156
|
-
- `ENTERGRAM_MCP_SCOPE`
|
|
157
|
-
- `ENTERGRAM_MCP_CALLBACK_PORT`
|
|
158
|
-
- `ENTERGRAM_MCP_CONFIG_DIR`
|
|
159
|
-
|
|
160
|
-
Default local OAuth callback:
|
|
161
|
-
|
|
162
|
-
`http://127.0.0.1:8787/oauth/callback`
|
|
163
|
-
|
|
164
|
-
## Built-in Environments
|
|
90
|
+
## Defaults
|
|
165
91
|
|
|
166
92
|
Production:
|
|
167
93
|
|
|
@@ -173,94 +99,44 @@ Development:
|
|
|
173
99
|
- gateway: `https://devmcp.entergram.com/mcp`
|
|
174
100
|
- client id: `entergram-dev-mcp-client`
|
|
175
101
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
By default, Entergram MCP stores local session files in:
|
|
102
|
+
Default local OAuth callback:
|
|
179
103
|
|
|
180
|
-
|
|
104
|
+
`http://127.0.0.1:8787/oauth/callback`
|
|
181
105
|
|
|
182
|
-
|
|
106
|
+
Session files are stored in:
|
|
183
107
|
|
|
184
|
-
-
|
|
185
|
-
- personal vs workspace OAuth clients
|
|
186
|
-
- multiple workspace clients with different scopes
|
|
108
|
+
`~/.entergram-mcp/`
|
|
187
109
|
|
|
188
|
-
## Choosing
|
|
110
|
+
## Choosing a Client
|
|
189
111
|
|
|
190
|
-
Use a personal client
|
|
112
|
+
Use a personal client for seat-scoped access.
|
|
191
113
|
|
|
192
|
-
Use a workspace client
|
|
114
|
+
Use a workspace client if you need broader scopes such as:
|
|
193
115
|
|
|
194
116
|
- `members.read`
|
|
195
117
|
- `messages.write`
|
|
196
118
|
- `custom_fields.read`
|
|
197
119
|
- `custom_fields.write`
|
|
198
120
|
|
|
199
|
-
If
|
|
121
|
+
If the consent screen does not show the scopes you expect, update that OAuth client's `allowedScopes` in Entergram first, then run login again.
|
|
200
122
|
|
|
201
123
|
## Troubleshooting
|
|
202
124
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
The selected OAuth client does not allow one or more requested scopes.
|
|
206
|
-
|
|
207
|
-
Fix:
|
|
125
|
+
`invalid_scope`
|
|
208
126
|
|
|
209
|
-
|
|
210
|
-
|
|
127
|
+
- Your OAuth client does not allow one or more requested scopes.
|
|
128
|
+
- Update the client in Entergram, then run `entergram-mcp login` again.
|
|
211
129
|
|
|
212
|
-
|
|
130
|
+
`MCP startup failed: handshaking with MCP server failed`
|
|
213
131
|
|
|
214
|
-
Your MCP host started the local bridge, but the bridge could not authenticate
|
|
132
|
+
- Your MCP host started the local bridge, but the bridge could not authenticate with the remote gateway.
|
|
133
|
+
- Make sure you ran login first for the same `--env` and `--client-id` used by the host.
|
|
215
134
|
|
|
216
|
-
|
|
135
|
+
`401` or expired token errors
|
|
217
136
|
|
|
218
|
-
|
|
219
|
-
2. make sure the host config includes the correct `ENTERGRAM_MCP_CLIENT_ID`
|
|
220
|
-
3. restart the MCP host after login
|
|
221
|
-
|
|
222
|
-
### `401` or expired token errors
|
|
223
|
-
|
|
224
|
-
The local session is stale or no longer refreshable.
|
|
225
|
-
|
|
226
|
-
Fix:
|
|
137
|
+
- Clear the local session and log in again:
|
|
227
138
|
|
|
228
139
|
```bash
|
|
229
140
|
entergram-mcp logout --env dev --client-id entergram-ws-your-client-id
|
|
230
141
|
entergram-mcp login --env dev --client-id entergram-ws-your-client-id
|
|
231
142
|
```
|
|
232
|
-
|
|
233
|
-
### Browser opens during MCP host startup
|
|
234
|
-
|
|
235
|
-
For local MCP hosts, the intended flow is:
|
|
236
|
-
|
|
237
|
-
1. run `entergram-mcp login` yourself first
|
|
238
|
-
2. then let the host run `entergram-mcp serve`
|
|
239
|
-
|
|
240
|
-
The bridge is designed to reuse an existing local session instead of performing interactive login during the MCP handshake.
|
|
241
|
-
|
|
242
|
-
## Development
|
|
243
|
-
|
|
244
|
-
Build:
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
npm run build
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
Typecheck:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
npm run typecheck
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
CLI smoke test:
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
npm run smoke:cli
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Dry-run the publish tarball:
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
npm run pack:dry-run
|
|
266
|
-
```
|
package/package.json
CHANGED