Python SDK for mailwire-x1
Project description
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"])
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 |
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mailwire_sdk-0.1.4.tar.gz.
File metadata
- Download URL: mailwire_sdk-0.1.4.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b682d3245c51057eafddd8f647a24f5c78f97bef9602d43c1f852a08f32ca8de
|
|
| MD5 |
3382b1d6ff6f94a84383f34048d4e21e
|
|
| BLAKE2b-256 |
0c48ff96a4f7f1257c4ebd372c3f533930d6daf79500d18e7fe40ec4033b0243
|
Provenance
The following attestation bundles were made for mailwire_sdk-0.1.4.tar.gz:
Publisher:
sdk-release.yml on BlendingBytes/mailwire-agent-email
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mailwire_sdk-0.1.4.tar.gz -
Subject digest:
b682d3245c51057eafddd8f647a24f5c78f97bef9602d43c1f852a08f32ca8de - Sigstore transparency entry: 1476229721
- Sigstore integration time:
-
Permalink:
BlendingBytes/mailwire-agent-email@2b62a3dc78ebd980e10bf53c02f53108cc732cac -
Branch / Tag:
refs/tags/sdk-v0.1.4 - Owner: https://github.com/BlendingBytes
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-release.yml@2b62a3dc78ebd980e10bf53c02f53108cc732cac -
Trigger Event:
push
-
Statement type:
File details
Details for the file mailwire_sdk-0.1.4-py3-none-any.whl.
File metadata
- Download URL: mailwire_sdk-0.1.4-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3625c74bbf88cbb874c9dab12301f67e8dae9b45edadb4b4d720a7bdb3c8171c
|
|
| MD5 |
919cd6029106be6fb4a3631c1ce5bd10
|
|
| BLAKE2b-256 |
c322ea258b734ddea3e1efea46d69d7b51c3e5cacfc700c752ef0dee5f4b44cc
|
Provenance
The following attestation bundles were made for mailwire_sdk-0.1.4-py3-none-any.whl:
Publisher:
sdk-release.yml on BlendingBytes/mailwire-agent-email
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mailwire_sdk-0.1.4-py3-none-any.whl -
Subject digest:
3625c74bbf88cbb874c9dab12301f67e8dae9b45edadb4b4d720a7bdb3c8171c - Sigstore transparency entry: 1476229884
- Sigstore integration time:
-
Permalink:
BlendingBytes/mailwire-agent-email@2b62a3dc78ebd980e10bf53c02f53108cc732cac -
Branch / Tag:
refs/tags/sdk-v0.1.4 - Owner: https://github.com/BlendingBytes
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-release.yml@2b62a3dc78ebd980e10bf53c02f53108cc732cac -
Trigger Event:
push
-
Statement type: