mailwire-sdk
Python SDK for mailwire-x1.
Install
pip install mailwire-sdk
To also install the MCP server entry point:
pip install 'mailwire-sdk[mcp]'
Usage
from mailwire_sdk import Client
with Client(token="mw_live_...", base_url="https://api.example.com") as mw:
# Create an inbox on a verified tenant domain
inbox = mw.inboxes.create(
client_id="lena.taiwo",
display_name="Lena",
domain_id="dom_...",
shareable_local_part="lena",
private_address_count=2,
)
# Send a message
msg = mw.messages.send(
inbox_id=inbox["id"],
from_address="Lena <lena@someonehq.com>",
to=["recipient@example.com"],
subject="Catching up",
text="Hi — thinking of you.",
idempotency_key="20260503-lena-001",
)
# List recent messages
for m in mw.messages.list(inbox_id=inbox["id"], limit=20):
print(m["id"], m["subject"])
# Read the files on a message. Metadata comes with the message; the
# bytes are fetched on demand.
msg = mw.messages.get("msg_...")
for att in msg["attachments"]:
if att["is_inline"]:
continue # inline image, referenced from html_body as cid:<content_id>
data = mw.messages.get_attachment(msg["id"], att["id"])
print(att["filename"], att["content_type"], len(data))
Sub-clients
| Attribute | Resource |
|---|---|
mw.tenants |
tenant CRUD (admin scope) |
mw.api_keys |
mint / list / get / revoke (admin scope) |
mw.domains |
register, fetch DNS records, verify, delete |
mw.inboxes |
create, list, get, update, archive, add_address |
mw.messages |
send, list, get, list_attachments, get_attachment |
Errors
Every non-2xx response from mailwire becomes a typed exception:
from mailwire_sdk import (
Client,
AuthError,
PermissionError,
NotFoundError,
ConflictError,
ValidationError,
ProviderError,
MailwireError, # base — catch-all
)
try:
mw.messages.send(...)
except ConflictError as exc:
# idempotency-key reused with a different body
print(exc.code, exc.details)
except PermissionError as exc:
# token is missing the required scope
print("missing:", exc.details["required_scope"])
except MailwireError as exc:
# any other API error — exc.type, exc.status_code, exc.request_id available
raise
MCP server
mailwire-sdk[mcp] ships a stdio MCP server. Wire it into Claude Desktop / your
IDE:
{
"mcpServers": {
"mailwire": {
"command": "mailwire-mcp",
"env": {
"MAILWIRE_BASE_URL": "https://api.example.com",
"MAILWIRE_TOKEN": "mw_live_..."
}
}
}
}
Tools exposed:
mailwire_list_inboxesmailwire_get_inboxmailwire_send_messagemailwire_list_messagesmailwire_get_message
See docs/mcp.md for tool argument schemas and the
end-to-end agent loop.
Versioning
mailwire-sdk 0.1.0 targets the mailwire-x1 v1 API. Breaking server changes go
to a new /v2/ surface and a major-version SDK bump. Additive changes (new
optional fields, new endpoints) ship in patch / minor versions.
Metadata
Release files for mailwire-sdk 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mailwire_sdk-0.1.7.tar.gz | 10.6 kB | With provenance | Details for mailwire_sdk-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mailwire_sdk-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for mailwire_sdk-0.1.7-py3-none-any.whl |
Total release size: 27.9 kB
Release files / mailwire_sdk-0.1.7.tar.gz
| Download URL | mailwire_sdk-0.1.7.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2daf00602c42d03a7e8f4beb526f78bc73be9e54ee45797716ecb4ca49a5a8f
|
|
BLAKE2b-256 checksum How to use checksums |
676a41a8f422488894a46942adbec51d9cd7d36d59d120d66dbe0b489b3d177c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / mailwire_sdk-0.1.7-py3-none-any.whl
| Download URL | mailwire_sdk-0.1.7-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7286d19edcd6af4562cca0c30e760d973966c5546715a6164db4927c27d44871
|
|
BLAKE2b-256 checksum How to use checksums |
a2c30d3c766a083159bf6840b5ed84acfa50219df33dd704b3d76aa088c9b26c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for mailwire-sdk 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mailwire_sdk-0.1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.