courier-mcp 0.1.4 → 0.1.5
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/package.json +1 -1
- package/server.mjs +7 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "courier-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "MCP server for durable AI agent email identity infrastructure. Persistent inboxes, OTP/magic link extraction, scoped credentials, and governed outbound without Gmail OAuth.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
package/server.mjs
CHANGED
|
@@ -27,7 +27,7 @@ async function handleRequest(req) {
|
|
|
27
27
|
return {
|
|
28
28
|
protocolVersion: '2024-11-05',
|
|
29
29
|
capabilities: { tools: {} },
|
|
30
|
-
serverInfo: { name: 'courier-mcp', version: '0.1.
|
|
30
|
+
serverInfo: { name: 'courier-mcp', version: '0.1.5' }
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -51,7 +51,8 @@ async function handleRequest(req) {
|
|
|
51
51
|
inputSchema: {
|
|
52
52
|
type: 'object',
|
|
53
53
|
properties: {
|
|
54
|
-
inbox: { type: 'string', description: 'Inbox address or alias name' }
|
|
54
|
+
inbox: { type: 'string', description: 'Inbox address or alias name' },
|
|
55
|
+
include_secrets: { type: 'boolean', description: 'If true, include secret/OTP values in response (requires admin token)' }
|
|
55
56
|
},
|
|
56
57
|
required: ['inbox']
|
|
57
58
|
}
|
|
@@ -122,7 +123,7 @@ async function handleRequest(req) {
|
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
case 'get_inbox': {
|
|
125
|
-
const res = await fetch(`${API}/messages?limit=50`);
|
|
126
|
+
const res = await fetch(`${API}/messages?limit=50&inbox_id=${encodeURIComponent(args.inbox)}`);
|
|
126
127
|
const data = await res.json();
|
|
127
128
|
if (data.error) throw new Error(data.message || data.error);
|
|
128
129
|
result = {
|
|
@@ -148,7 +149,7 @@ async function handleRequest(req) {
|
|
|
148
149
|
let data = null;
|
|
149
150
|
|
|
150
151
|
while (Date.now() - start < timeout) {
|
|
151
|
-
const res = await fetch(`${API}/messages?limit=50`);
|
|
152
|
+
const res = await fetch(`${API}/messages?limit=50&inbox_id=${encodeURIComponent(args.inbox)}`);
|
|
152
153
|
data = await res.json();
|
|
153
154
|
if (data.messages && data.messages.length > 0) {
|
|
154
155
|
break;
|
|
@@ -176,7 +177,7 @@ async function handleRequest(req) {
|
|
|
176
177
|
}
|
|
177
178
|
|
|
178
179
|
case 'extract_otp': {
|
|
179
|
-
const res = await fetch(`${API}/messages?limit=50`);
|
|
180
|
+
const res = await fetch(`${API}/messages?limit=50&inbox_id=${encodeURIComponent(args.inbox)}`);
|
|
180
181
|
const data = await res.json();
|
|
181
182
|
if (data.error) throw new Error(data.message || data.error);
|
|
182
183
|
const allCodes = [];
|
|
@@ -190,7 +191,7 @@ async function handleRequest(req) {
|
|
|
190
191
|
}
|
|
191
192
|
|
|
192
193
|
case 'extract_magic_link': {
|
|
193
|
-
const res = await fetch(`${API}/messages?limit=50`);
|
|
194
|
+
const res = await fetch(`${API}/messages?limit=50&inbox_id=${encodeURIComponent(args.inbox)}`);
|
|
194
195
|
const data = await res.json();
|
|
195
196
|
if (data.error) throw new Error(data.message || data.error);
|
|
196
197
|
const allLinks = [];
|