Fix compatibility with @modelcontextprotocol/sdk 1.23+ (#84)

* Fix compatibility with @modelcontextprotocol/sdk 1.23+

Implement required abstract methods `assertTaskCapability` and
`assertTaskHandlerCapability` in App and AppBridge classes. These
were added to the Protocol base class in SDK 1.23+.

Also regenerates package-lock.json with valid npm registry versions
(previously had non-existent vite@6.4.1).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add pkg-pr-new workflow for PR/commit publishing

Enables automatic publishing of any commit or PR to pkg.pr.new,
allowing consumers to install directly from git commits:

npm install https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@<commit-or-pr>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jerome 2025-12-08 11:13:07 +00:00 • committed by GitHub
commit a09354bdf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1709 additions and 619 deletions

23
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Publish Any Commit
permissions:
contents: read
on:
pull_request:
push:
branches:
- "**"
tags:
- "!**"
jobs:
pkg-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
- run: npx pkg-pr-new publish

2077
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -525,6 +525,22 @@ export class AppBridge extends Protocol<Request, Notification, Result> {
// TODO
}
/**
* Verify that task creation is supported for the given request method.
* @internal
*/
protected assertTaskCapability(_method: string): void {
throw new Error("Tasks are not supported in MCP Apps");
}
/**
* Verify that task handler is supported for the given method.
* @internal
*/
protected assertTaskHandlerCapability(_method: string): void {
throw new Error("Task handlers are not supported in MCP Apps");
}
/**
* Get the host capabilities passed to the constructor.
*

View file

@ -542,6 +542,22 @@ export class App extends Protocol<Request, Notification, Result> {
// TODO
}
/**
* Verify that task creation is supported for the given request method.
* @internal
*/
protected assertTaskCapability(_method: string): void {
throw new Error("Tasks are not supported in MCP Apps");
}
/**
* Verify that task handler is supported for the given method.
* @internal
*/
protected assertTaskHandlerCapability(_method: string): void {
throw new Error("Task handlers are not supported in MCP Apps");
}
/**
* Call a tool on the originating MCP server (proxied through the host).
*