feat(xmtp)!: adopt self-deployed XMTP MCP server (chat-sdk v2)#49
Merged
Conversation
chat-sdk PR #103 removes the publicly hosted XMTP MCP deployment and sources
the wallet key from the server's BOSON_XMTP_PRIVATE_KEY env instead of tool
args. The plugin options are now a discriminated union:
{ stdio: true; privateKey } | { http: true; url }.
- Bump @bosonprotocol/chat-sdk 1.4.5 -> 2.0.0
- src/examples/xmtp/index.ts: drop the hosted-URL (staging/production)
validation; XMTP_BOSON_MCP_URL is now optional and selects transport -
stdio by default (spawns `npx boson-xmtp-mcp-server` locally, forwarding
PRIVATE_KEY as BOSON_XMTP_PRIVATE_KEY) or self-hosted HTTP when set
- .env.example, example README, root README: document the self-deploy model
(stdio default + optional HTTP self-host) and remove the Cloud Run URLs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the XMTP example to work with chat-sdk v2 by switching from a previously public XMTP MCP endpoint to a self-deployed XMTP MCP server, supporting either a locally spawned stdio subprocess (default) or an explicitly configured self-hosted HTTP server.
Changes:
- Bump
@bosonprotocol/chat-sdkto2.0.0and update lockfile accordingly. - Update the XMTP example to choose transport based on
XMTP_BOSON_MCP_URL(HTTP when set; otherwise stdio/local subprocess). - Refresh documentation and env examples to reflect self-hosting and the new default behavior.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/examples/xmtp/README.md | Updates setup/deployment instructions for self-hosted XMTP MCP server and stdio default. |
| src/examples/xmtp/index.ts | Selects XMTP MCP transport (HTTP vs stdio) based on XMTP_BOSON_MCP_URL and updates plugin configuration. |
| src/examples/xmtp/.env.example | Updates env guidance so XMTP_BOSON_MCP_URL is optional and documents stdio default. |
| README.md | Updates top-level env docs to mark XMTP_BOSON_MCP_URL as optional with a localhost example. |
| package.json | Bumps @bosonprotocol/chat-sdk dependency to 2.0.0. |
| package-lock.json | Updates resolved @bosonprotocol/chat-sdk version metadata to 2.0.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Printing the full XMTP_BOSON_MCP_URL could leak credentials (basic auth, signed query params) or internal hostnames into logs/CI output. Log only the transport type instead. Addresses PR #49 review comment r3361515213. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The references to docs/mcp-self-hosting.md and SECURITY.md were bare paths; those files live in the chat-sdk repo, not here, so readers got stuck. Link them directly to the pinned v2.0.0 tag (the version this example depends on). Addresses PR #49 review comment r3361515246. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
This pull request updates the XMTP example to reflect that the XMTP MCP server is no longer publicly hosted and must now be self-hosted or run locally. It updates documentation, environment files, and code to support this change, and upgrades the
@bosonprotocol/chat-sdkdependency to version 2.0.0. The main changes improve clarity for users and simplify configuration by allowing local subprocess execution as the default.Documentation and Environment Updates:
src/examples/xmtp/README.mdto explain that the XMTP MCP server must now be self-hosted, with clear instructions for both local (stdio) and HTTP server modes, and removed references to public endpoints.src/examples/xmtp/.env.exampleto remove public staging/production URLs and clarify the new default/local setup, with guidance for optional self-hosted HTTP usage.README.mdto clarify thatXMTP_BOSON_MCP_URLis optional and only needed for self-hosted HTTP servers.Code and Dependency Updates:
src/examples/xmtp/index.tsto remove environment validation for public URLs, and to select between local stdio or self-hosted HTTP transport for the XMTP MCP server based on the presence ofXMTP_BOSON_MCP_URL. [1] [2]@bosonprotocol/chat-sdkdependency from version 1.4.5 to 2.0.0 inpackage.jsonfor compatibility with the new MCP server hosting requirements.