Repository navigation
Conversation
New module mpt/mcp (james-mcp-mpt): a Model Context Protocol server (stdio
and streamable HTTP transports) letting an agent validate and run MPT
scripts against a configured set of targets (SMTPS 465, IMAPS 993,
POP3S 995, ManageSieve over TLS by default). Packaged as a docker image
with Jib (apache/james-mcp-mpt).
MPT syntax extensions:
- runtime ${variables}, regex-quoted in expected server lines
- named groups of matched server lines are captured as variables
- UNTIL: skip server lines until one matches
- SET: / SET-BASE64: define variables (SASL PLAIN helper)
- STARTTLS: upgrade the session to TLS
- accurate line numbers in parse errors, regex validated at parse
time, failures collected when continuing after failure
MPT syntax:
- IGNORE: skip unexpected lines (e.g. untagged IMAP responses), the
expected line always wins
- literals with computed UTF-8 size: C: ... {} / {+} followed by L: /
L-: lines, the synchronizing continuation is awaited automatically
- POLL <timeout> <interval> { C: EXPECT: END: } to wait for asynchronous
deliveries
- failures report the session and the last command actually sent
(substituted) with its script line
MCP server:
- a non passing run always carries a reason, with the server lines left
unread and the sessions closed by the server
- MPT_MCP_ARCHIVE_DIR + run_script label: script, transcript and report
stored server side for every run
- plain text STARTTLS capable default targets: smtp 25, submission 587,
imap 143, pop3 110
- create_account / delete_account through WebAdmin (JWT or Password
header) for isolated accounts; only accounts created by the server can
be deleted
chibenwa
marked this pull request as draft
November 15, 2026 20:45
quantranhong1999
left a comment
Member
There was a problem hiding this comment.
Read it.
I am curious to see a simple demo applying this MPT MCP.
Contributor
Author
~100 conformity issues diagnosed - it is terribly effective... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New module mpt/mcp (james-mcp-mpt): a Model Context Protocol server (stdio and streamable HTTP transports) letting an agent validate and run MPT scripts against a configured set of targets (SMTPS 465, IMAPS 993, POP3S 995, ManageSieve over TLS by default). Packaged as a docker image with Jib (apache/james-mcp-mpt).
MPT syntax extensions: