mcpField
P
pixelletter-mcp

pixelletter-mcp

Local
github.com/bitterdevCommunication0Updated 1w ago

About pixelletter-mcp

pixelletter-mcp is a local MCP server that uses the PixelLetter HTTPS interface to send physical letters and faxes. It also supports order cancellation, account details, and electronic invoice signatures, with an explicit test mode for sending operations.

Key features

  1. 01Send letters from files or text
  2. 02Send faxes
  3. 03Registered mail options
  4. 04Cancel submitted orders
  5. 05Read account data and credit
  6. 06Submit electronic invoice signatures

Use cases

  1. 01Mailing a generated PDF letter
  2. 02Sending a document by fax
  3. 03Testing an order before dispatch
  4. 04Canceling an order using its ID

MCP support

Exposes PixelLetter sending, fax, cancellation, account, invoice-signing, and interface-reference operations as tools for MCP clients. Sending tools require an explicit testMode flag.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"bitterdev-pixelletter": {
"command": "npx",
"args": [
"-y",
"pixelletter-mcp"
],
"env": {
"PIXELLETTER_EMAIL": "<PIXELLETTER_EMAIL>",
"PIXELLETTER_PASSWORD": "<PIXELLETTER_PASSWORD>",
"PIXELLETTER_DEFAULT_DESTINATION": "<PIXELLETTER_DEFAULT_DESTINATION>",
"PIXELLETTER_FORCE_TEST_MODE": "<PIXELLETTER_FORCE_TEST_MODE>"
}
}
}
}
Run commandnpx -y pixelletter-mcp
Environment variables to set
PIXELLETTER_EMAILE-mail address the PixelLetter account is registered with
PIXELLETTER_PASSWORDSecretPixelLetter account password
PIXELLETTER_DEFAULT_DESTINATIONDefault destination country as a two letter ISO code, for example DE
PIXELLETTER_FORCE_TEST_MODEForce test mode for every order, so nothing is printed, sent or charged

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmpixelletter-mcp1.0.3

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
textstringNoLetter text as plain text, no HTML. Long texts run onto more pages automatically, your sender address is added by PixelLetter. "%Unterschrift%" on its own line inserts the signature stored in your PixelLetter account.
filesarrayNoAbsolute paths of the documents to send, for example the PDF written by pdf-letter-mcp. Several files are converted and merged into one letter, in this order. Allowed: .pdf, .doc, .xls, .ppt, .rtf, .wpd, .psd, and PDF is the only type that always works.
duplexbooleanNoPrint on both sides (true, the default of PixelLetter) or on one side only (false, sent as control NODUPLEX). Letters only.
addressarrayNoRecipient address, one line per array entry, country included. PixelLetter typesets it. Required when no file is sent.
controlstringNoRaw value for the control field of the interface. The only value in public use is NODUPLEX, which the duplex parameter sets for you, so only reach for this when PixelLetter gave you another token.
goGreenbooleanNoGoGreen, CO2 neutral postage (addoption 44). Letters only.
subjectstringNoSubject of the letter.
locationenumNoDispatch centre: 1 = Munich (DE), 2 = Hausleiten near Vienna (AT), 3 = Hamburg (DE). Default of the API is 1.1 | 2 | 3
testModebooleanYesTest mode. true runs the order exactly like a real one but PixelLetter never prints, never sends and never charges. false really sends the letter. Always required, so nothing goes out by accident.
faxNumberstringNoFax number in international format, for example "+49 89 72448483". Only needed with alsoSendFax.
colorPrintbooleanNoColour print instead of black and white (addoption 33). Letters only, and not available through every dispatch centre, see error 038.
registeredbooleanNoEinschreiben, registered mail (code 27). Germany only.
alsoSendFaxbooleanNoSend the same document as a fax too. Needs faxNumber. Additional services stay letter only.
destinationstringNoDestination country as a two letter ISO code, for example DE, AT, CH. Mandatory for letters, a wrong code leads to wrong postage.
inlineFilesarrayNoDocuments passed as base64 instead of a path.
transactionstringNoYour own transaction id or short note. PixelLetter returns it with the response.
returnAddressstringNoRaw value for the returnaddress field of the interface. Undocumented in the public handbooks.
returnReceiptbooleanNoRückschein, return receipt (code 28). Only together with registered.
cashOnDeliveryobjectNoBank details for cash on delivery. Setting this block adds additional service 31.
cashOnDelivery.namestringYesPayee, 1 to 27 characters.
cashOnDelivery.amountstringYesAmount in the format XXXX,XX, between 3,00 and 1600,00 EUR.
cashOnDelivery.bankCodestringYesGerman bank code (BLZ) of the payee, exactly 8 digits.
cashOnDelivery.bankNamestringYesBank of the payee, 1 to 27 characters.
cashOnDelivery.bankAccountIdstringYesAccount number of the payee, 6 to 10 digits.
cashOnDelivery.reasonForPayment1stringNoFirst line of the payment reference, up to 27 characters.
cashOnDelivery.reasonForPayment2stringNoSecond line of the payment reference, up to 27 characters.
personalDeliverybooleanNoEigenhändig, personal delivery (code 29). Only together with registered.
registeredDropInbooleanNoEinschreiben Einwurf, drop-in registered mail (code 30). Cannot be combined with the other registered variants.
additionalServiceCodesarrayNoRaw addoption codes for services PixelLetter documents elsewhere or agrees per account. Only use numbers PixelLetter gave you.

Details

From the project README

pixelletter-mcp

Local MCP server (stdio) for the PixelLetter HTTPS interface. Hand it a PDF and a destination country and PixelLetter prints, folds, franks and posts the letter, optionally as registered mail. It also sends faxes, cancels orders, reads the account balance and drives the electronic invoice signature.

It pairs with pdf-letter-mcp: that server writes a DIN 5008 letter PDF, this one puts it in the post. send_letter takes the absolute path that create_letter returns.

The implementation follows the published documentation: the HTTPS handbook, the e-mail handbook, the two signature handbooks, the reference PHP class (version 2.01) and the public error code list. Three values are not printed in those documents, colour printing, GoGreen postage and the NODUPLEX switch, and they are taken from the hudora/pyPostal client that has been sending real orders with them. They are marked as such in the table below. Nothing else is invented.

How the interface works

Everything is one multipart HTTPS POST to https://www.pixelletter.de/xml/index.php. The form field xml carries the order document, credentials included, and the fields uploadfile0, uploadfile1 and so on carry the documents. The answer is a small XML document: code 100 means the order was accepted, anything else is an error code from the published list. The final result, including whether the recipient address fitted the address window, arrives by e-mail a few hours later.

Test mode

Every sending tool needs an explicit testMode flag, there is no default. testMode: true runs the order exactly like a real one but PixelLetter never prints it, never sends it and never charges for it. testMode: false really posts the letter. Set PIXELLETTER_FORCE_TEST_MODE=true to pin the whole server to test mode while wiring things up.

Install

npm install
npm run build

Register the server in Claude Code:

claude mcp add pixelletter \
  --env [email protected] \
  --env PIXELLETTER_PASSWORD=your-password \
  -- node "/absolute/path/to/pixelletter-mcp/dist/src/index.js"

Or in ~/.claude.json / claude_desktop_config.json:

{
  "mcpServers": {
    "pixelletter": {
      "command": "node",
      "args": ["/absolute/path/to/pixelletter-mcp/dist/src/index.js"],
      "env": {
        "PIXELLETTER_EMAIL": "[email protected]",
        "PIXELLETTER_PASSWORD": "your-password",
        "PIXELLETTER_DEFAULT_DESTINATION": "DE"
      }
    }
  }
}

Environment

VariablePurpose
PIXELLETTER_EMAILRequired. The e-mail address the PixelLetter account is registered with.
PIXELLETTER_PASSWORDRequired. The PixelLetter password.
PIXELLETTER_ENDPOINTEndpoint of the interface. Default https://www.pixelletter.de/xml/index.php.
PIXELLETTER_ACCEPT_TERMSAccept the PixelLetter terms with every order, default true. The API rejects orders otherwise (error 013).
PIXELLETTER_WAIVE_WITHDRAWAL_RIGHTWaive the two week right of withdrawal so orders run immediately, default true. false delays every order by two weeks.
PIXELLETTER_DEFAULT_LOCATIONDefault dispatch centre: 1 Munich (DE), 2 Hausleiten near Vienna (AT), 3 Hamburg (DE).
PIXELLETTER_DEFAULT_DESTINATIONDefault destination country as a two letter ISO code, for example DE.
PIXELLETTER_FORCE_TEST_MODEForce test mode for every order, default false.
PIXELLETTER_TIMEOUT_MSRequest timeout in milliseconds, default 120000.

Credentials are only read from the environment, nothing is stored in the repository and nothing is written to disk.

Tools

ToolPurpose
send_letterSends documents or plain text as a physical letter, optionally as a fax too.
send_faxSends documents or plain text as a fax only.
get_account_infoReads the stored customer data and the current credit.
cancel_orderCancels a submitted order by its PixelLetter order id.
sign_invoiceSends documents to the electronic invoice signature service and optionally mails the signed PDF on.
get_interface_referenceOffline lookup of action values, dispatch centres, service codes, limits and error codes.
send_letter

Ready made PDF, the normal case:

{
  "testMode": true,
  "files": ["/Users/you/Documents/Briefe/2026-07-24-widerspruch.pdf"],
  "destination": "DE",
  "transaction": "widerspruch-4711"
}

Registered mail with return receipt, printed in colour on one side only:

{
  "testMode": false,
  "files": ["/Users/you/Documents/Briefe/kuendigung.pdf"],
  "destination": "DE",
  "registered": true,
  "returnReceipt": true,
  "colorPrint": true,
  "duplex": false
}

Plain text, typeset by PixelLetter, with the signature stored in the account:

{
  "testMode": true,
  "address": ["Erika Mustermann", "Musterstr. 28", "81237 Musterstadt", "Deutschland"],
  "subject": "Ihre Anfrage vom 12.07.2026",
  "text": "Hallo Frau Mustermann,\n\nvielen Dank für Ihre Anfrage.\n\nMit freundlichen Grüßen\n\n%Unterschrift%\nMax Mustermann",
  "destination": "DE"
}

Rules the tool enforces before anything is sent:

  • One order carries either documents or text, not both. Several documents are converted and merged into one letter, in the order given.
  • The destination country is mandatory for letters, a wrong code leads to wrong postage.
  • The recipient address has to be visible in the address window area of the document, PixelLetter checks this before dispatch.
  • Allowed upload types are .pdf, .doc, .xls, .ppt, .rtf, .wpd, .psd, 50 MB maximum. Error 053 shows that PixelLetter can restrict this to PDF, so PDF is the safe choice.
  • Additional services, colour print and duplex are letter only, a pure fax order rejects them. Codes 28 (return receipt) and 29 (personal delivery) need 27 (registered), code 30 (drop-in registered) stands alone. Registered mail is a German product, other destinations run into error 026.

Every option of the interface

Full coverage of the fields the interface documents. "Applies to" says which dispatch type accepts the option, invalid combinations are rejected before the request goes out.

API fieldTool parameterAllowed valuesApplies toSource
emailPIXELLETTER_EMAILaccount e-mailallHTTPS handbook
passwordPIXELLETTER_PASSWORDaccount passwordallHTTPS handbook
agbPIXELLETTER_ACCEPT_TERMSja, neinallHTTPS handbook
widerrufsverzichtPIXELLETTER_WAIVE_WITHDRAWAL_RIGHTja, nein, nein delays the order by two weeksallHTTPS handbook
testmodustestMode, PIXELLETTER_FORCE_TEST_MODEtrue, falseallHTTPS handbook
order typepicked from the inputtext, upload, cancelallHTTPS handbook, reference class
actionsend_letter, alsoSendFax, send_fax, sign_invoice1 letter, 2 fax, 3 letter and fax, 4 invoice signatureallHTTPS handbook, signature handbooks
transactiontransactionfree text, returned with the responseallHTTPS handbook
faxfaxNumberinternational format, +49 89 72448483faxHTTPS handbook
locationlocation1 Munich (DE), 2 Hausleiten near Vienna (AT), 3 Hamburg (DE), default 1letter, faxHTTPS handbook
destinationdestination, PIXELLETTER_DEFAULT_DESTINATIONtwo letter ISO code, mandatory for letters, ignored for pure faxletterHTTPS handbook
addoption 27registeredEinschreiben, registered mailletterHTTPS handbook
addoption 28returnReceiptRückschein, return receipt, only with 27letterHTTPS handbook
addoption 29personalDeliveryEigenhändig, personal delivery, only with 27letterHTTPS handbook
addoption 30registeredDropInEinschreiben Einwurf, drop-in registered mail, not combinable with 27, 28, 29letterHTTPS handbook
addoption 31cashOnDeliveryNachnahme, set automatically when the bank details block is givenletterreference class 2.01
addoption 33colorPrintcolour print instead of black and whiteletterpyPostal, error 038
addoption 44goGreenGoGreen, CO2 neutral postageletterpyPostal
addoption otheradditionalServiceCodesraw numbers PixelLetter agreed for your accountletterHTTPS handbook
controlduplextrue double sided (default of PixelLetter), false sends NODUPLEX for single sidedletterpyPostal
control rawcontrolany token PixelLetter gave you, cannot be combined with duplexletter, faxreference class 2.01
returnaddressreturnAddressraw value, no published meaningletter, faxreference class 2.01
wiretransfer/recipient/namecashOnDelivery.name1 to 27 charactersletterreference class, errors 030 to 037
wiretransfer/recipient/bankaccountidcashOnDelivery.bankAccountId6 to 10 digitsletterreference class, error 036
wiretransfer/recipient/blzcashOnDelivery.bankCodeexactly 8 digitsletterreference class, error 037
wiretransfer/recipient/banknamecashOnDelivery.bankName1 to 27 charactersletterreference class, error 031
wiretransfer/reasonforpayment1cashOnDelivery.reasonForPayment1up to 27 charactersletterreference class, error 032
wiretransfer/reasonforpayment2cashOnDelivery.reasonForPayment2up to 27 charactersletterreference class, error 033
wiretransfer/amountcashOnDelivery.amountXXXX,XX, 3,00 to 1600,00 EURletterreference class, errors 034, 035
text/addressaddressrecipient address lines, country includedletter, faxHTTPS handbook
text/subjectsubjectsubject of the letterletter, faxHTTPS handbook
text/messagetextplain text, no HTML, %Unterschrift% inserts the stored signatureletter, faxHTTPS handbook
uploadfile0, uploadfile1, ...files, inlineFiles.pdf, .doc, .xls, .ppt, .rtf, .wpd, .psd, 50 MB eachletter, fax, signatureHTTPS handbook
order type="cancel"/idcancel_order.orderIdPixelLetter order idcancellationreference class 2.01
sender, recipient, cc, bcc, subject, body, filenamesign_invoice.notification.*e-mail fields of the signature notificationsignaturesignature handbooks
info/account:info type="all"get_account_infono parametersaccountHTTPS handbook

get_interface_reference returns the same list at runtime, including the full error code table.

What the interface does not offer

Named explicitly, because their absence is a property of the API and not an omission of this server:

  • No job list. There is no documented call that lists or queries submitted orders. cancel_order works on an order id from the confirmation e-mail, get_account_info reports the balance, everything else lives in the PixelLetter customer area.
  • No envelope or paper format, no postage class, no delivery speed, no cover sheet, no reply envelope, no sender identification. These are no fields of the interface. Letters go into a DIN C6/5 window envelope and the postage follows weight and destination country.
  • No address correction. Premiumadress shows up in error 088, but it has to be set up by PixelLetter support for the account and has no request field.
  • Postcards, upload templates and bulk orders. The reference class and the error codes show they exist (font, template number, action 5), but no handbook documents their action values or their field layout. Sending a guessed action could produce a real, wrong dispatch, so they are left out.
  • ref in the auth block has no documented meaning and is always sent empty, exactly like the reference class does.

Verification

npm test    # XML payloads, response parsing, option rules, configuration, HTTP layer with a mocked fetch

The tests never touch the live API. The HTTP layer is exercised through an injected fetch, which checks the endpoint, the xml field, the uploadfileN parts, the test mode flag and the error code mapping.

License

MIT, see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.