feat: import mcp on resources server MJINT-175#13
Merged
Conversation
KingPepito
force-pushed
the
feat/MJINT-175_Import_MCP_on_resources_server
branch
11 times, most recently
from
July 7, 2026 08:58
c6520f1 to
5087521
Compare
KingPepito
force-pushed
the
feat/MJINT-175_Import_MCP_on_resources_server
branch
from
July 7, 2026 15:41
5087521 to
eb5a3b2
Compare
…JINT-175 - Pass user context within tools generation functions, enabling external use as well as internal with MAILJET_API_KEY environment variable. - Export mcp information such as mcp specific header and package version. - Prevent firing the mcp main script when imported as a package. - Create index to export mcp and open api schema resources at once, edit the package.json export to match the new structure. - Refactor getRequestOptionsMCPForAuth helper to use a auth as a parameter when needed.
KingPepito
force-pushed
the
feat/MJINT-175_Import_MCP_on_resources_server
branch
from
July 7, 2026 15:59
eb5a3b2 to
2f3895b
Compare
obennett-m
reviewed
Jul 7, 2026
obennett-m
requested changes
Jul 7, 2026
obennett-m
reviewed
Jul 8, 2026
- Add test for `makeMailjetRequest`, asserting that it correctly uses params and env vars. - Handle feedbacks from last review.
KingPepito
force-pushed
the
feat/MJINT-175_Import_MCP_on_resources_server
branch
from
July 8, 2026 16:24
e4da098 to
d9f8741
Compare
obennett-m
previously approved these changes
Jul 8, 2026
obennett-m
reviewed
Jul 8, 2026
- add early return after rejecting missing API keys. Prevents request from continuing. - add a network error handler in validateMailjetKeys, - remove unnecessary try/catch in main. - document getRequestOptionsMCPForAuth
obennett-m
requested changes
Jul 8, 2026
obennett-m
left a comment
Collaborator
There was a problem hiding this comment.
Not quite sure this is ready after running locally. How about creating a beta package first - by bumping the package version to 1.1.0-beta.1?
There was a problem hiding this comment.
Pull request overview
This PR updates the Mailjet MCP server package to be usable both as a CLI (stdio transport) and as an importable module, with support for passing per-session credentials into requests/tools.
Changes:
- Add a module entrypoint (
src/index.js) and configurepackage.jsonexports for library-style imports, plus bump version to1.1.0. - Extend request/tool generation APIs to accept
serverInstanceanduserContext, and add tests formakeMailjetRequest. - Update metadata/docs and housekeeping (changelog, start script,
.gitignore).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/mailjet-mcp.js |
Adds import-vs-CLI behavior, shared headers/version exports, user-context credentials flow, and refactors OpenAPI parsing/tool generation usage. |
tests/mailjet-mcp.test.js |
Adds unit tests covering makeMailjetRequest credential sourcing and error handling; introduces https request mocking. |
src/index.js |
New module entrypoint re-exporting MCP server and schema modules. |
package.json |
Version bump, adds exports entrypoint and a start script. |
CHANGELOG.md |
Documents 1.1.0 changes and adds compare link. |
.gitignore |
Ignores /ngrok.yml. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
569
to
+575
| }); | ||
| }); | ||
|
|
||
| req.on("error", (err) => { | ||
| // Catch network errors (e.g., DNS failure, no internet connection) | ||
| reject(`${err}\nNetwork unavailable. Credentials can not be validated.`); | ||
| }); |
obennett-m
approved these changes
Jul 15, 2026
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.
No description provided.