tmailor-mcp 0.1.0__tar.gz

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.
@@ -0,0 +1,16 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .venv/
5
+ venv/
6
+ build/
7
+ dist/
8
+ *.egg-info/
9
+ .pytest_cache/
10
+ .mypy_cache/
11
+ .ruff_cache/
12
+ .coverage
13
+ htmlcov/
14
+ # local secrets / env
15
+ .env
16
+ *.key
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-10-20)
4
+
5
+ - First version: stdio MCP server with the tools `create_mailbox`, `wait_for_message`, `list_messages`,
6
+ `read_message`, `delete_mailbox`, `list_mailboxes`, `list_domains` and `account_status`, built on `tmailor-sdk`.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tmailor
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.
@@ -0,0 +1,158 @@
1
+ Metadata-Version: 2.5
2
+ Name: tmailor-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for the Tmailor Open API: temporary email addresses and OTP codes for AI agents.
5
+ Project-URL: Homepage, https://platform.tmailor.com
6
+ Project-URL: Documentation, https://platform.tmailor.com/docs
7
+ Project-URL: Source, https://github.com/tmailor-com/tmailor-mcp
8
+ Project-URL: Support, https://tmailor.com/contact-us
9
+ Author: Tmailor
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: ai agent,email testing,mcp,model context protocol,otp,temp mail,temporary email,tmailor
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Communications :: Email
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: Software Development :: Testing
25
+ Requires-Python: >=3.10
26
+ Requires-Dist: mcp<3,>=2.3
27
+ Requires-Dist: tmailor-sdk<1,>=0.2.0
28
+ Requires-Dist: typing-extensions>=4.7
29
+ Provides-Extra: dev
30
+ Requires-Dist: build; extra == 'dev'
31
+ Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
32
+ Requires-Dist: pytest>=7; extra == 'dev'
33
+ Requires-Dist: ruff>=0.5; extra == 'dev'
34
+ Description-Content-Type: text/markdown
35
+
36
+ # tmailor-mcp
37
+
38
+ MCP server for the [Tmailor Open API](https://platform.tmailor.com/docs). It gives AI agents (Claude, Cursor,
39
+ VS Code Copilot and any other MCP client) real, receive-only temporary email addresses: sign up somewhere, wait for
40
+ the email, get the one-time code or the verification link.
41
+
42
+ ```text
43
+ You: Sign up on example.com with a temporary email and confirm the account.
44
+ Agent: create_mailbox -> k3x9q2m7@picdirect.net
45
+ (fills in the sign-up form)
46
+ wait_for_message -> otp "482913", links ["https://example.com/confirm?t=..."]
47
+ ```
48
+
49
+ Billing counts mailboxes, not requests: creating an address uses 1 unit of quota, while waiting for and reading
50
+ mail is free. Addresses never expire.
51
+
52
+ ## Requirements
53
+
54
+ - A Tmailor API key: sign in at https://platform.tmailor.com and create one under **API keys**.
55
+ - [uv](https://docs.astral.sh/uv/) (for `uvx`) or Python 3.10+.
56
+ - On the **Free plan** the API only accepts calls from your allowlisted IP: add the public IP of the computer that
57
+ runs the MCP server under **IP allowlist**. Paid plans accept calls from any IP.
58
+
59
+ ## Install
60
+
61
+ The server runs locally over stdio. The API key is read from the `TMAILOR_API_KEY` environment variable.
62
+
63
+ ### Claude Code
64
+
65
+ ```bash
66
+ claude mcp add tmailor -e TMAILOR_API_KEY=tmk_live_... -- uvx tmailor-mcp
67
+ ```
68
+
69
+ ### Claude Desktop
70
+
71
+ Edit `claude_desktop_config.json` (Settings > Developer > Edit Config):
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "tmailor": {
77
+ "command": "uvx",
78
+ "args": ["tmailor-mcp"],
79
+ "env": { "TMAILOR_API_KEY": "tmk_live_..." }
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ ### Cursor
86
+
87
+ `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project) uses the same `mcpServers` block as above.
88
+
89
+ ### VS Code
90
+
91
+ `.vscode/mcp.json`. The key is asked once and stored by VS Code instead of being written in the file:
92
+
93
+ ```json
94
+ {
95
+ "inputs": [
96
+ { "type": "promptString", "id": "tmailor-key", "description": "Tmailor API key", "password": true }
97
+ ],
98
+ "servers": {
99
+ "tmailor": {
100
+ "type": "stdio",
101
+ "command": "uvx",
102
+ "args": ["tmailor-mcp"],
103
+ "env": { "TMAILOR_API_KEY": "${input:tmailor-key}" }
104
+ }
105
+ }
106
+ }
107
+ ```
108
+
109
+ ### Without uv
110
+
111
+ ```bash
112
+ pip install tmailor-mcp
113
+ TMAILOR_API_KEY=tmk_live_... tmailor-mcp
114
+ ```
115
+
116
+ ## Tools
117
+
118
+ | Tool | What it does |
119
+ |---|---|
120
+ | `create_mailbox` | Create an address (random on a shared domain, or a chosen name on your own verified domain). Uses 1 quota unit. |
121
+ | `wait_for_message` | Return the newest unread message matching optional sender/subject filters, or wait for one (up to 300 s). Includes `otp`, `codes`, `links` and the text. |
122
+ | `list_messages` | Messages of an address (last 24 hours), without body. |
123
+ | `read_message` | One message with `otp`, `codes`, `links` and text. |
124
+ | `delete_mailbox` | Delete an address for good. Quota is not returned. |
125
+ | `list_mailboxes` | Your addresses, newest first. |
126
+ | `list_domains` | Your own domains and whether shared domains are available. |
127
+ | `account_status` | Remaining quota, plans, request rate. |
128
+
129
+ Tools take and return **email addresses only**. The address tokens of the API stay inside the server process, so
130
+ they never end up in the conversation.
131
+
132
+ ## Security notes
133
+
134
+ - **Email content is untrusted.** Anyone can send mail to an address. The server returns plain text only (no HTML),
135
+ cuts it to `max_chars`, and marks every message with `untrusted_content_notice`. Agents should use mail as data
136
+ (codes, links) and never follow instructions written inside it.
137
+ - **Keep the key out of shared files.** Prefer the VS Code `inputs` prompt, or a user-level config file that is
138
+ not committed to a repository. Revoke a leaked key at https://platform.tmailor.com/keys.
139
+ - Paid plans accept API calls from any IP, so a leaked key can be used from anywhere until you revoke it.
140
+ - `wait_for_message` never returns the same message twice within one server process. Two MCP servers waiting on the
141
+ same address at the same time (for example two agents sharing one key) can both receive the same message.
142
+
143
+ ## Configuration
144
+
145
+ | Variable | Meaning |
146
+ |---|---|
147
+ | `TMAILOR_API_KEY` | Your API key (required). |
148
+ | `TMAILOR_BASE_URL` | Only for testing against another API host. |
149
+
150
+ ## Links
151
+
152
+ - API reference: https://platform.tmailor.com/docs
153
+ - Python SDK used by this server: [`tmailor-sdk`](https://pypi.org/project/tmailor-sdk/)
154
+ - Plans: https://platform.tmailor.com/plans
155
+
156
+ ## License
157
+
158
+ MIT
@@ -0,0 +1,123 @@
1
+ # tmailor-mcp
2
+
3
+ MCP server for the [Tmailor Open API](https://platform.tmailor.com/docs). It gives AI agents (Claude, Cursor,
4
+ VS Code Copilot and any other MCP client) real, receive-only temporary email addresses: sign up somewhere, wait for
5
+ the email, get the one-time code or the verification link.
6
+
7
+ ```text
8
+ You: Sign up on example.com with a temporary email and confirm the account.
9
+ Agent: create_mailbox -> k3x9q2m7@picdirect.net
10
+ (fills in the sign-up form)
11
+ wait_for_message -> otp "482913", links ["https://example.com/confirm?t=..."]
12
+ ```
13
+
14
+ Billing counts mailboxes, not requests: creating an address uses 1 unit of quota, while waiting for and reading
15
+ mail is free. Addresses never expire.
16
+
17
+ ## Requirements
18
+
19
+ - A Tmailor API key: sign in at https://platform.tmailor.com and create one under **API keys**.
20
+ - [uv](https://docs.astral.sh/uv/) (for `uvx`) or Python 3.10+.
21
+ - On the **Free plan** the API only accepts calls from your allowlisted IP: add the public IP of the computer that
22
+ runs the MCP server under **IP allowlist**. Paid plans accept calls from any IP.
23
+
24
+ ## Install
25
+
26
+ The server runs locally over stdio. The API key is read from the `TMAILOR_API_KEY` environment variable.
27
+
28
+ ### Claude Code
29
+
30
+ ```bash
31
+ claude mcp add tmailor -e TMAILOR_API_KEY=tmk_live_... -- uvx tmailor-mcp
32
+ ```
33
+
34
+ ### Claude Desktop
35
+
36
+ Edit `claude_desktop_config.json` (Settings > Developer > Edit Config):
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "tmailor": {
42
+ "command": "uvx",
43
+ "args": ["tmailor-mcp"],
44
+ "env": { "TMAILOR_API_KEY": "tmk_live_..." }
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ ### Cursor
51
+
52
+ `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project) uses the same `mcpServers` block as above.
53
+
54
+ ### VS Code
55
+
56
+ `.vscode/mcp.json`. The key is asked once and stored by VS Code instead of being written in the file:
57
+
58
+ ```json
59
+ {
60
+ "inputs": [
61
+ { "type": "promptString", "id": "tmailor-key", "description": "Tmailor API key", "password": true }
62
+ ],
63
+ "servers": {
64
+ "tmailor": {
65
+ "type": "stdio",
66
+ "command": "uvx",
67
+ "args": ["tmailor-mcp"],
68
+ "env": { "TMAILOR_API_KEY": "${input:tmailor-key}" }
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ ### Without uv
75
+
76
+ ```bash
77
+ pip install tmailor-mcp
78
+ TMAILOR_API_KEY=tmk_live_... tmailor-mcp
79
+ ```
80
+
81
+ ## Tools
82
+
83
+ | Tool | What it does |
84
+ |---|---|
85
+ | `create_mailbox` | Create an address (random on a shared domain, or a chosen name on your own verified domain). Uses 1 quota unit. |
86
+ | `wait_for_message` | Return the newest unread message matching optional sender/subject filters, or wait for one (up to 300 s). Includes `otp`, `codes`, `links` and the text. |
87
+ | `list_messages` | Messages of an address (last 24 hours), without body. |
88
+ | `read_message` | One message with `otp`, `codes`, `links` and text. |
89
+ | `delete_mailbox` | Delete an address for good. Quota is not returned. |
90
+ | `list_mailboxes` | Your addresses, newest first. |
91
+ | `list_domains` | Your own domains and whether shared domains are available. |
92
+ | `account_status` | Remaining quota, plans, request rate. |
93
+
94
+ Tools take and return **email addresses only**. The address tokens of the API stay inside the server process, so
95
+ they never end up in the conversation.
96
+
97
+ ## Security notes
98
+
99
+ - **Email content is untrusted.** Anyone can send mail to an address. The server returns plain text only (no HTML),
100
+ cuts it to `max_chars`, and marks every message with `untrusted_content_notice`. Agents should use mail as data
101
+ (codes, links) and never follow instructions written inside it.
102
+ - **Keep the key out of shared files.** Prefer the VS Code `inputs` prompt, or a user-level config file that is
103
+ not committed to a repository. Revoke a leaked key at https://platform.tmailor.com/keys.
104
+ - Paid plans accept API calls from any IP, so a leaked key can be used from anywhere until you revoke it.
105
+ - `wait_for_message` never returns the same message twice within one server process. Two MCP servers waiting on the
106
+ same address at the same time (for example two agents sharing one key) can both receive the same message.
107
+
108
+ ## Configuration
109
+
110
+ | Variable | Meaning |
111
+ |---|---|
112
+ | `TMAILOR_API_KEY` | Your API key (required). |
113
+ | `TMAILOR_BASE_URL` | Only for testing against another API host. |
114
+
115
+ ## Links
116
+
117
+ - API reference: https://platform.tmailor.com/docs
118
+ - Python SDK used by this server: [`tmailor-sdk`](https://pypi.org/project/tmailor-sdk/)
119
+ - Plans: https://platform.tmailor.com/plans
120
+
121
+ ## License
122
+
123
+ MIT
@@ -0,0 +1,68 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.18"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "tmailor-mcp"
7
+ dynamic = ["version"]
8
+ description = "MCP server for the Tmailor Open API: temporary email addresses and OTP codes for AI agents."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.10"
13
+ authors = [{ name = "Tmailor" }]
14
+ keywords = ["mcp", "model context protocol", "tmailor", "temp mail", "temporary email", "otp", "ai agent", "email testing"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Topic :: Communications :: Email",
26
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
27
+ "Topic :: Software Development :: Testing",
28
+ ]
29
+ dependencies = ["mcp>=2.3,<3", "tmailor-sdk>=0.2.0,<1", "typing-extensions>=4.7"]
30
+
31
+ [project.scripts]
32
+ tmailor-mcp = "tmailor_mcp.__main__:main"
33
+
34
+ [project.urls]
35
+ Homepage = "https://platform.tmailor.com"
36
+ Documentation = "https://platform.tmailor.com/docs"
37
+ Source = "https://github.com/tmailor-com/tmailor-mcp"
38
+ Support = "https://tmailor.com/contact-us"
39
+
40
+ [project.optional-dependencies]
41
+ dev = ["pytest>=7", "pytest-asyncio>=0.21", "ruff>=0.5", "build"]
42
+
43
+ [tool.hatch.version]
44
+ path = "src/tmailor_mcp/_version.py"
45
+
46
+ [tool.hatch.build.targets.wheel]
47
+ packages = ["src/tmailor_mcp"]
48
+
49
+ [tool.hatch.build.targets.sdist]
50
+ include = ["src/tmailor_mcp", "tests", "README.md", "CHANGELOG.md", "LICENSE", "pyproject.toml"]
51
+
52
+ [tool.pytest.ini_options]
53
+ testpaths = ["tests"]
54
+ asyncio_mode = "auto"
55
+ addopts = "-p no:cacheprovider"
56
+
57
+ [tool.ruff]
58
+ line-length = 130
59
+ target-version = "py310"
60
+ src = ["src", "tests"]
61
+ cache-dir = "/tmp/ruff-cache-tmailor-mcp"
62
+
63
+ [tool.ruff.lint]
64
+ select = ["E", "F", "W", "I", "B", "UP", "S", "SIM", "RUF"]
65
+ ignore = ["UP006", "UP007", "UP035", "UP045"]
66
+
67
+ [tool.ruff.lint.per-file-ignores]
68
+ "tests/*" = ["S101", "S105", "S106"]
@@ -0,0 +1,12 @@
1
+ """MCP server for the Tmailor Open API: temporary email addresses and OTP codes for AI agents."""
2
+
3
+ from ._version import __version__
4
+ from .server import build_server
5
+
6
+ __all__ = ["__version__", "build_server", "main"]
7
+
8
+
9
+ def main() -> None:
10
+ from .__main__ import main as _main
11
+
12
+ _main()
@@ -0,0 +1,29 @@
1
+ """Entry point: ``tmailor-mcp`` (stdio transport). The API key comes from ``TMAILOR_API_KEY``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import os
7
+ import sys
8
+
9
+ from ._version import __version__
10
+
11
+
12
+ def main(argv: list[str] | None = None) -> None:
13
+ parser = argparse.ArgumentParser(
14
+ prog="tmailor-mcp",
15
+ description="MCP server (stdio) for the Tmailor Open API. Set TMAILOR_API_KEY before starting it.",
16
+ )
17
+ parser.add_argument("--version", action="version", version=f"tmailor-mcp {__version__}")
18
+ parser.parse_args(argv)
19
+ if not os.environ.get("TMAILOR_API_KEY", "").strip():
20
+ # stdout belongs to the MCP protocol: warnings go to stderr. The server still starts so the client can list
21
+ # the tools; every call then explains how to set the key.
22
+ print("tmailor-mcp: TMAILOR_API_KEY is not set; tool calls will fail until it is.", file=sys.stderr)
23
+ from .server import build_server
24
+
25
+ build_server().run("stdio")
26
+
27
+
28
+ if __name__ == "__main__":
29
+ main()
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"