@koderlabs/inbox-mcp 0.1.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/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/chunk-T7SFANFP.js +969 -0
- package/dist/chunk-T7SFANFP.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +255 -0
- package/dist/index.js.map +1 -0
- package/dist/stdio.d.ts +1 -0
- package/dist/stdio.js +45 -0
- package/dist/stdio.js.map +1 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KoderLabs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @koderlabs/inbox-mcp-server
|
|
2
|
+
|
|
3
|
+
MCP server for InstantInbox (inbox.koderlabs.net). Lets AI dev agents create
|
|
4
|
+
disposable inboxes and read received emails so any app's email-driven flow
|
|
5
|
+
(signup verification, password reset, magic link, OTP) can be tested end-to-end.
|
|
6
|
+
|
|
7
|
+
## Quick facts
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Port | 10405 |
|
|
12
|
+
| Transports | Streamable HTTP (`/mcp`) + stdio (`instantinbox-mcp-stdio`) |
|
|
13
|
+
| Auth | Bearer token: user JWT or `sk_live_*` / `sk_test_*` key |
|
|
14
|
+
| Scopes | `inbox:read`, `inbox:write`, `email:read`, `email:write` |
|
|
15
|
+
|
|
16
|
+
## Tools (10)
|
|
17
|
+
|
|
18
|
+
| Tool | Scope | Purpose |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `whoami` | (none) | Confirm token + show granted scopes |
|
|
21
|
+
| `list_inboxes` | `inbox:read` | List the caller's inboxes |
|
|
22
|
+
| `create_inbox` | `inbox:write` | Create a new disposable inbox; returns the email address |
|
|
23
|
+
| `get_inbox` | `inbox:read` | Look up an inbox by id or address |
|
|
24
|
+
| `delete_inbox` | `inbox:write` | Permanently delete an inbox |
|
|
25
|
+
| `list_emails` | `email:read`, `inbox:read` | List emails in an inbox (headers only) |
|
|
26
|
+
| `get_email` | `email:read` | Fetch a single email's full body |
|
|
27
|
+
| `wait_for_email` | `email:read`, `inbox:read` | Long-poll until a matching email arrives (or timeout) |
|
|
28
|
+
| `delete_email` | `email:write` | Delete one email |
|
|
29
|
+
| `mark_email_read` | `email:write` | Mark read / unread |
|
|
30
|
+
|
|
31
|
+
`wait_for_email` is the killer tool — most email tests are
|
|
32
|
+
`trigger → wait → extract link/code → click`.
|
|
33
|
+
|
|
34
|
+
## Environment variables
|
|
35
|
+
|
|
36
|
+
| Var | Default | Notes |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `PORT` | `10405` | HTTP transport |
|
|
39
|
+
| `API_BASE_URL` | `http://localhost:10402/api/v1` | InstantInbox API |
|
|
40
|
+
| `INBOX_API_BASE_URL` | same | stdio override |
|
|
41
|
+
| `INBOX_API_KEY` | — | stdio: required Bearer token |
|
|
42
|
+
| `MCP_ALLOWED_ORIGINS` | empty | CSV; required for browser-hosted clients |
|
|
43
|
+
| `MCP_RATE_LIMIT_RPM` | `120` | Per-token request budget per minute |
|
|
44
|
+
| `MCP_MAX_BODY_BYTES` | `1048576` | POST /mcp body cap |
|
|
45
|
+
| `MCP_INTROSPECT_KEY` | — | Future OAuth introspection key (not yet required) |
|
|
46
|
+
| `MCP_PUBLIC_URL` | `https://inbox.koderlabs.net/mcp` | OAuth discovery |
|
|
47
|
+
|
|
48
|
+
## Claude Desktop configuration
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"instantinbox": {
|
|
54
|
+
"command": "npx",
|
|
55
|
+
"args": ["-y", "@koderlabs/inbox-mcp-server"],
|
|
56
|
+
"env": {
|
|
57
|
+
"INBOX_API_BASE_URL": "https://inbox.koderlabs.net/api/v1",
|
|
58
|
+
"INBOX_API_KEY": "<your token>"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Example agent workflow
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
1. create_inbox → returns ab12cd@inbox.koderlabs.net (id u_abc)
|
|
69
|
+
2. (agent triggers signup with that address in the app under test)
|
|
70
|
+
3. wait_for_email → inboxId=u_abc, subjectContains="verify", timeoutSec=60
|
|
71
|
+
4. (parse verification link from returned body)
|
|
72
|
+
5. (agent visits link to complete signup)
|
|
73
|
+
6. delete_inbox → cleanup
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Local dev
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pnpm --filter @koderlabs/inbox-mcp-server build
|
|
80
|
+
PORT=10405 INBOX_API_KEY=<token> pnpm --filter @koderlabs/inbox-mcp-server start
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Deviations from InstantTasks MCP
|
|
84
|
+
|
|
85
|
+
- No audit-shipping middleware (`withAudit`) — InstantInbox API has no
|
|
86
|
+
`/audit/mcp` endpoint yet. Add later if needed.
|
|
87
|
+
- Auth currently delegates to `GET /auth/me` and grants all four scopes
|
|
88
|
+
on success; the inbox API has no per-key scoping today. Swap to real
|
|
89
|
+
introspection once the API has it.
|
|
90
|
+
- OAuth flow is a stub — it tries `POST /oauth/introspect` and fails
|
|
91
|
+
cleanly if absent.
|