Skip to content

feat(xmtp)!: adopt self-deployed XMTP MCP server (chat-sdk v2)#49

Merged
levalleux-ludo merged 4 commits into
mainfrom
feat/xmtp-self-deployed-mcp-server
Jun 5, 2026
Merged

feat(xmtp)!: adopt self-deployed XMTP MCP server (chat-sdk v2)#49
levalleux-ludo merged 4 commits into
mainfrom
feat/xmtp-self-deployed-mcp-server

Conversation

@levalleux-ludo
Copy link
Copy Markdown
Member

@levalleux-ludo levalleux-ludo commented Jun 5, 2026

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-sdk dependency 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:

  • Updated src/examples/xmtp/README.md to 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.
  • Revised src/examples/xmtp/.env.example to remove public staging/production URLs and clarify the new default/local setup, with guidance for optional self-hosted HTTP usage.
  • Improved comments in README.md to clarify that XMTP_BOSON_MCP_URL is optional and only needed for self-hosted HTTP servers.

Code and Dependency Updates:

  • Refactored src/examples/xmtp/index.ts to 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 of XMTP_BOSON_MCP_URL. [1] [2]
  • Upgraded @bosonprotocol/chat-sdk dependency from version 1.4.5 to 2.0.0 in package.json for compatibility with the new MCP server hosting requirements.

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>
Copilot AI review requested due to automatic review settings June 5, 2026 08:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-sdk to 2.0.0 and 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.

Comment thread src/examples/xmtp/index.ts
Comment thread src/examples/xmtp/README.md Outdated
levalleux-ludo and others added 2 commits June 5, 2026 09:54
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Comment thread src/examples/xmtp/README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@levalleux-ludo levalleux-ludo merged commit e5f0994 into main Jun 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants