Commit graph

1,951 commits

Author SHA1 Message Date
Cliff Hall
ce092a39e7
Merge pull request #1070 from modelcontextprotocol/claude/issue-1069-20260206-1234 0.20.0
Bump version to 0.20.0
2026-02-06 12:51:33 -05:00
claude[bot]
a276a7336e Bump version to 0.20.0
- Updated all package.json files to version 0.20.0
- Updated workspace dependencies in root package.json
- Updated package-lock.json
- Verified version consistency with check-version-consistency script

Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2026-02-06 12:35:38 +00:00
Cliff Hall
2af3410b8e
Add MCP Apps support to Inspector (#1044)
* Fix MCP Apps rendering issue and add comprehensive logging

- Fixed AppRenderer useEffect dependency array to include resourceContent
  This ensures the component re-evaluates when resource content arrives
- Added detailed console logging throughout the app lifecycle:
  * Resource fetch and response tracking in App.tsx
  * Setup conditions and AppBridge creation in AppRenderer.tsx
  * HTML parsing and iframe rendering steps
  * PostMessageTransport and AppBridge connection status
  * App tool filtering and selection in AppsTab.tsx
- Refactored AppsTab selectedTool rendering for better tracking

The issue was that resourceContent prop updates weren't triggering
the AppRenderer setup effect. Now the effect properly responds to
both resourceUri and resourceContent changes.

Co-authored-by: Cliff Hall <cliffhall@users.noreply.github.com>

* Fix MCP Apps iframe rendering issue

The app was getting stuck on 'Loading MCP App...' because the iframe was
hidden (display: none) until the oninitialized event fired. However, the
PostMessage handshake requires the iframe to be visible to complete.

This fix:
- Sets loading to false immediately after writing HTML to the iframe
- Makes the iframe visible before establishing PostMessage transport
- Allows the AppBridge initialization handshake to complete successfully
- Removes redundant setLoading(false) from oninitialized callback

The iframe is now visible and ready for PostMessage communication before
the AppBridge connect() call, enabling proper initialization.

Co-authored-by: Cliff Hall <cliffhall@users.noreply.github.com>

* Fix MCP Apps HTML extraction to match spec

The AppRenderer was incorrectly checking for a 'type' field in resource
contents, but TextResourceContents objects only have uri, mimeType, and
text fields according to the MCP specification.

Fixed by checking for the presence of the 'text' field directly instead
of checking a non-existent 'type' field. This allows the HTML content
to be properly extracted and rendered in the iframe.

Co-authored-by: Cliff Hall <cliffhall@users.noreply.github.com>

* Add comprehensive tests for MCP Apps support

- Add tests for AppsTab component (13 tests)
- Add tests for AppRenderer component (17 tests)
- Update jest.config.cjs to handle ES modules from @modelcontextprotocol/ext-apps
- All 478 tests pass successfully

Co-authored-by: Cliff Hall <cliffhall@users.noreply.github.com>

* Add MCP Apps support to Inspector

- Add AppsTab component for detecting and listing MCP apps
- Add AppRenderer component with full AppBridge integration
- Implement UI resource fetching and sandboxed iframe rendering
- Add PostMessage transport for bidirectional JSON-RPC communication
- Include comprehensive test coverage (30 new tests)
- Auto-populate apps when tab becomes active
- Support theme awareness and configurable permissions

Co-authored-by: Cliff Hall <cliffhall@users.noreply.github.com>

* Prefer structuredContent over content field in tool responses

Some MCP servers return different data in structuredContent vs content fields.
This change ensures that when structuredContent is present, it is used
exclusively for display instead of showing both fields.

Changes:
- Modified ToolResults.tsx to only show content when structuredContent is absent
- Removed unused checkContentCompatibility function
- Updated test cases to reflect new behavior

Co-authored-by: Cliff Hall <cliffhall@users.noreply.github.com>

* Revert "Prefer structuredContent over content field in tool responses"

This reverts commit 3b054b4da08517cce53ef23e60c07bb32b0fa8f5.

Claude did not do the right thing.

* feat: integrate @mcp-ui/client for MCP application rendering

This commit implements the integration of `@mcp-ui/client` to handle the
rendering of Model Context Protocol (MCP) applications within the inspector.
It includes refactoring the rendering logic, improving resource fetching
in the main application state, and setting up a secure sandbox environment.

Changes per file:

- client/package.json:
  - Added `@mcp-ui/client` as a dependency.

- client/src/components/AppRenderer.tsx:
  - Refactored to use `McpUiAppRenderer` from `@mcp-ui/client`.
  - Implemented HTML parsing logic for MCP resource responses.
  - Configured host context (theme) and sandbox URL for the renderer.
  - Replaced iframe-based manual rendering with the official component.

- client/src/App.tsx:
  - Added `fetchingResources` state to prevent duplicate concurrent resource requests.
  - Enhanced `readResource` with better error handling and state tracking.
  - Optimized resource content mapping to better support application state.

- client/src/components/AppsTab.tsx:
  - Updated to use `getToolUiResourceUri` utility from `@modelcontextprotocol/ext-apps`
    instead of manual metadata property access.
  - Simplified tool filtering and selection logic.

- client/public/sandbox_proxy.html:
  - Added a sandbox proxy page to facilitate secure communication between
    the inspector and the rendered MCP applications.

- client/bin/client.js:
  - Added server rewrites to ensure `sandbox_proxy.html` is served correctly.
  - Implemented specific `Cache-Control` headers for `sandbox_proxy.html` to
    prevent stale cached versions.

- client/vite.config.ts:
  - Explicitly configured `publicDir: "public"` to ensure the sandbox proxy
    is included in the build output.

- client/src/components/__tests__/AppRenderer.test.tsx:
  - Updated tests to mock the new `@mcp-ui/client` component.
  - Adjusted assertions to verify correct props are passed to the renderer.
  - Enhanced mock MCP client to include required methods like `getServerCapabilities`.

* Potential fix for code scanning alert no. 37: Client-side cross-site scripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Update package-lock.json
 - npm install
 - npm audit fix

* Potential fix for code scanning alert no. 38: Client-side cross-site scripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 39: Client-side cross-site scripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* prettier

* Update client/src/components/AppsTab.tsx

Co-authored-by: Ola Hungerford <olahungerford@gmail.com>

* prettier

* In AppsTab.test.tsx, fetch button by aria-label

* relative imports

* Remove sanitization logic from sandbox_proxy.html. It's breaking the app rendering. Will sort out what best practices for this HTML is later

* In sandbox_proxy.html,formatting
In AppsTab.tsx
  - Add app window
    - when an app is selected,
      - show input form for apps that have an input schema
      - button shows app
      - if app is shown, show maximize button
        - if maximized,
          - show minimize button
          - hide app list
* In AppsTab.test.tsx
  - test new layout and controls
* In AppRenderer.tsx
    - accept toolInput
    - pass to McpUiAppRenderer

* In AppsTab.tsx, if an app has no inputSchema, just show it, otherwise show the form and the "back to form" button when showing the app.

* In AppsTab.test.tsx
  - test new behavior

* In ListPane.tsx
  - remove the Clear button

* In ListPane.test.tsx
  - remove test for clear button

* In AppRenderer.tsx,
  - remove onReadResource and resourceContent, not needed since mcpClient is being passed

* In App.tsx and AppsTab.tsx,
  - remove the passing of these variables

* In AppRenderer.test.tsx, and AppsTab.test.tsx
  - remove tests that fail after having removed onReadResource and resourceContent

* Serving the sandbox_proxy.html from a separate port, using the proxy instead of the webclient server.

* In App.tsx
  - pass the path to the sandbox endpoint on the proxy to the AppsTab

* In AppsTab.tsx
  - accept the sandboxPath property and pass it to the AppRenderer

* In AppRenderer.tsx
  - accept the sandboxPath property and pass it to the McpUiAppRenderer

* In client.js
  - remove the rewrite and header config for sandbox_proxy.html

* In server/src/index.ts
  - add a /sandbox endpoint that reads and returns the sandbox_proxy.html file with no-cache header

* In server/package.json
  - add shx for cross-platform copy function
  - in build script, copy static folder to build folder

* Moved sandbox_proxy.html from client/public to server/static

* In client.js
  - return to original state

* In vite.config.ts
  - return to original state

* Potential fix for code scanning alert no. 41: Missing rate limiting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* In AppRenderer.tsx
  - add open link handler that handles link requests from the UI. Makes sure that the URL starts with http or https

* In sandbox_proxy.html
  - refactor to match [basic-host](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-host) example
  - creates an nested iframe for security.
  - in this implementation, for simplicity the sandbox.ts is inlined in sandbox_proxy.html as javascript

* prettier

* In AppRenderer.tsx
  - add support for handling McpUiMessageRequest messages from the UI
  - show message in a toast

* Add logging message handler to AppRenderer

In App.tsx
  - pass an onNotification function to the AppsTab that adds a notification to the notification array

In AppsTab.tsx
  - Accept the onNotification function and pass it to the AppRenderer

In AppRenderer.tsx
  - Accept the onNotification function
  - added an handleLoggingMessage function that takes a LoggingMessageNotificationParams object, wraps it with a method and params prop to make it a ServerNotification shape, and pass it to the onNotification function
   - pass handleLoggingMessage to McpUiAppRenderer

* In ResourcesTab.test.tsx
  - fix @ import that wasn't resolving

* In AppRenderer.tsx
  - remove fetch and evaluation of resourceUri, as the mcpClient handles that (review request)

* In AppRenderer.test.tsx
  - remove test for no resourceUri found

* Merge branch 'main' into full-apps-support-final

Resolved Conflicts:
- package-lock.json

* Fixed mismatch with sanboxRateLimiter and the express version

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Cliff Hall <cliffhall@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Ola Hungerford <olahungerford@gmail.com>
2026-02-05 20:02:20 -07:00
Cliff Hall
98f058765d
Merge pull request #1067 from BobDickinson/cli-test-update
Fixed test failures induced by MCP SDK update
2026-02-05 19:44:21 -05:00
Bob Dickinson
ee29c34bd7 Fixed test failures induced by MCP SDK update (added session id generator to Streamable test server). Cleanup up some port usage to avoid potential issues (always use port 0 for servers). Added stdout/stderr to cli status assertion failures to make CLI test failures easier to debug from test output. 2026-02-05 16:34:25 -08:00
dependabot[bot]
f97725760a
Bump the npm_and_yarn group across 1 directory with 3 updates (#1065)
Bumps the npm_and_yarn group with 2 updates in the / directory: [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) and [diff](https://github.com/kpdecker/jsdiff).


Updates `@modelcontextprotocol/sdk` from 1.25.2 to 1.26.0
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/v1.25.2...v1.26.0)

Updates `diff` from 4.0.2 to 4.0.4
- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.2...v4.0.4)

Updates `hono` from 4.11.3 to 4.11.7
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.11.3...v4.11.7)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.26.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: diff
  dependency-version: 4.0.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: hono
  dependency-version: 4.11.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 20:42:32 -07:00
Koichi ITO
dd02737463
Enable Dependabot for GitHub Actions (#1048)
Configure Dependabot to automatically detect updates to the actions used in
GitHub Actions (e.g., `actions/checkout`) and create pull requests for them.

For example, `actions/checkout@v4` is likely updatable, as v6 is already available:
9f3b4ff/.github/workflows/main.yml (L15)

This PR enables Dependabot to update such GitHub Actions dependencies.

Updates to outdated actions packages in `.github/workflows` are intentionally not included in this PR,
as they will be updated by the initial Dependabot run as part of verifying its behavior.

Based on experience, checking for updates on a weekly interval should work well.
2026-02-04 06:26:13 -07:00
Murat Dzhulkuttiev
885c8bc732
fix(client): circular function calls leads to memory leak (#1049)
* fix(client): circular function call leads to memory leak

* allow children validation
2026-02-03 10:50:50 -07:00
Ola Hungerford
fc7897f380
fix(client): fix dev mode hanging on Windows (#1051)
The `stdin: 'ignore'` option was not working because spawn-rx expects
an Observable for its stdin option, not a string. This caused tsx watch
and vite dev server to hang waiting for stdin on Windows.

Use Node's native `stdio: ['ignore', 'pipe', 'pipe']` option instead,
which spawn-rx passes through correctly to child_process.spawn.

Fixes #550

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 07:41:38 -07:00
Cliff Hall
9f3b4ff0a9
In App.samplingNavigation.test.tsx, (#1035) 0.19.0-hotfix
- replaced test for Reject button with the one used in the regular sampling test, which gets the button by role. This test appeared to be failing because formatting puts the name between the button elements with some whitespace. The way to look is with a regex
2026-01-23 15:50:54 +00:00
Cliff Hall
3adaf39371
Merge pull request #1029 from modelcontextprotocol/claude/issue-1028-20260121-1235 0.19.0
Bump version to 0.19.0
2026-01-23 10:30:20 -05:00
Ola Hungerford
edbe2f84f3
Merge branch 'main' into claude/issue-1028-20260121-1235 2026-01-23 08:03:27 -07:00
Cliff Hall
7ef0971c81
Add Tasks support (#1013)
* ### client/src/App.tsx

- Imports:
  - Added: `Task` and `GetTaskResultSchema` to the same import block.
  - UI Icons: Added `ListTodo` from `lucide-react` to the icon imports.
  - Components: Added `TasksTab` import beside `ToolsTab`.
  - Config utils: Added `getMCPTaskTtl` to the config utils import block.

- State additions:
  - `const [tasks, setTasks] = useState<Task[]>([]);`
  - Extended `errors` state to include a `tasks` key: `tasks: null,`
  - `const [selectedTask, setSelectedTask] = useState<Task | null>(null);`
  - `const [isPollingTask, setIsPollingTask] = useState(false);`
  - `const [nextTaskCursor, setNextTaskCursor] = useState<string | undefined>();`

- Hook: `useConnection({...})` return value usage extended
  - Added destructured functions: `cancelTask: cancelMcpTask` and `listTasks: listMcpTasks` from the custom hook.

- Notification handling:
  - In `onNotification`, added:
    - If `method === "notifications/tasks/list_changed"`, call `listTasks()` (voided).
    - If `method === "notifications/tasks/status"`, treat `notification.params` as a `Task` and update `tasks` state: replace if exists by `taskId`, otherwise prepend. Also update `selectedTask` if it’s the same `taskId`.

- Tab routing:
  - When computing valid tabs, added `tasks` when server declares capability: `...(serverCapabilities?.tasks ? ["tasks"] : []),`
  - When choosing a default tab, added a branch to fall back to `"tasks"` if neither resources/prompts/tools are present but tasks are.

- Effect for Tasks tab:
  - When `mcpClient` is connected and `activeTab === "tasks"`, invoke `listTasks()`.

- Tools → task-augmented calls integration in `callTool`:
  - Parameter signature supports `runAsTask?: boolean` (already present in this file), but now:
    - If `runAsTask` is true, augment the `tools/call` request’s `params` with a `task` object: `{ task: { ttl: getMCPTaskTtl(config) } }`.
  - Use a permissive result schema for tool call: `sendMCPRequest(request, z.any(), "tools")` to avoid version-mismatch schema issues.
  - Task reference detection introduced:
    - `isTaskResult` helper checks for a nested `task` object with `taskId` (i.e., `response.task.taskId`).
  - When task is detected:
    - Set `isPollingTask(true)`.
    - Immediately set a temporary `toolResult` that includes text content “Task created: … Polling for status…” and `_meta` with `"io.modelcontextprotocol/related-task": { taskId }`.
    - Start a polling loop:
      - Delay 1s between polls.
      - Call `tasks/get` with `GetTaskResultSchema` for status.
      - If status is `completed`: call `tasks/result` with `z.any()` to retrieve the final result and set it as `toolResult`; call `listTasks()`.
      - If status is `failed` or `cancelled`: set an error `toolResult` content that includes the status + `statusMessage`; call `listTasks()`.
      - Else (still running): update `toolResult` content with current `status`/`statusMessage` and preserve `_meta` related-task.
    - After loop, set `isPollingTask(false)`.
  - When not a task response, set `toolResult` directly from response (cast to `CompatibilityCallToolResult`).

- Tasks list + cancel helpers in App:
  - `listTasks`: uses `listMcpTasks(nextTaskCursor)` from the hook, updates `tasks`, `nextTaskCursor`, and clears `errors.tasks`.
  - `cancelTask`: calls `cancelMcpTask(taskId)`, updates `tasks` array by `taskId`, updates `selectedTask` if it matches, and clears `errors.tasks`.

- UI integration:
  - Added a `TabsTrigger` for “Tasks” with `<ListTodo />` icon, disabled unless server supports tasks.
  - Added `<TasksTab />` to the main `TabsContent` block, passing: `tasks`, `listTasks`, `clearTasks`, `cancelTask`, `selectedTask`, `setSelectedTask`, `error={errors.tasks}`, `nextCursor={nextTaskCursor}`.
  - Passed `isPollingTask={isPollingTask}` and `toolResult` into `ToolsTab` so the Tools tab can show the live “Polling Task…” state and block reruns while polling.

Note: The raw diff is long; the key hunks align with the above bullet points (imports, state, notifications, tab wiring, request augmentation, polling loop, UI additions).

---

### client/src/components/ToolsTab.tsx

- Props shape changed:
  - Added `isPollingTask?: boolean` prop in the destructured props and in the prop types.
  - The `callTool` callback signature is now `(name, params, metadata?, runAsTask?) => Promise<void>` (runAsTask added earlier; test updates elsewhere reflect this).

- Local state additions:
  - `const [runAsTask, setRunAsTask] = useState(false);`

- Reset behavior:
  - When switching tools (`useEffect` on `selectedTool`), reset `runAsTask(false)`.
  - When clearing the list in `ListPane.clearItems`, also call `setRunAsTask(false)`.

- UI additions:
  - New checkbox control block to toggle “Run as task”:
    - Checkbox `id="run-as-task"`, bound to `runAsTask`, with `onCheckedChange` → `setRunAsTask(checked)`.
    - Label “Run as task”.
  - Run button disabling conditions expanded to include `isPollingTask`.
  - Run button text shows spinner with conditional label:
    - If `isToolRunning || isPollingTask` → show spinner and text `isPollingTask ? "Polling Task..." : "Running..."`.

- Call invocation change:
  - When clicking “Run Tool”, the `callTool` is invoked with `(selectedTool.name, params, metadata?, runAsTask)`.

- ToolResults relay:
  - Passes `isPollingTask` to `<ToolResults />`.

---

### client/src/components/ToolResults.tsx

- Props shape changed:
  - Added optional prop: `isPollingTask?: boolean`.

- Task-running banner logic:
  - Extracts related task from the tool result’s `_meta["io.modelcontextprotocol/related-task"]` if present.
  - Computes `isTaskRunning` as `isPollingTask ||` a text-heuristic against `structuredResult.content` entries that contain text like “Polling” or “Task status”.
  - Header “Tool Result:” now conditionally shows:
    - `Error` (red) if `isError` is true, else
    - `Task Running` (yellow) if `isTaskRunning`, else
    - `Success` (green).

No other changes to validation or rendering of content blocks.

---

### client/src/components/TasksTab.tsx (new file)

- A brand new tab to list and inspect tasks.
- Key elements:
  - Imports `Task` type and multiple status icons.
  - `TaskStatusIcon` component maps task `status` to an icon and color.
  - Main `TasksTab` props: `tasks`, `listTasks`, `clearTasks`, `cancelTask`, `selectedTask`, `setSelectedTask`, `error`, `nextCursor`.
  - Left column (`ListPane`): lists tasks, shows status icon, `taskId`, `status`, and last update time; button text changes to “List More Tasks” if `nextCursor` present; disables button if no cursor and list non-empty.
  - Right column:
    - Shows error `Alert` if `error` prop provided.
    - If a task is selected: header with `Task Details`, a Cancel button when `status === "working"` (shows a spinner while cancelling), and a grid of task fields: Status (with colored label and icon), Last Updated, Created At, TTL (shows “Infinite” if `ttl === null`, otherwise shows numeric with `s` suffix), optional Status Message, and full task JSON via `JsonView`.
    - If no task is selected: centered empty state with a “Refresh Tasks” button.

---

### client/src/lib/hooks/useConnection.ts

- Imports added from `@modelcontextprotocol/sdk/types.js`:
  - `ListTasksResultSchema`, `CancelTaskResultSchema`, `TaskStatusNotificationSchema`.

- Client capabilities on `connect`:
  - Added `tasks: { list: {}, cancel: {} }` into the `clientCapabilities` passed to `new Client(...)`.

- Notification handling setup:
  - The hook’s notification schema registration now includes the `TaskStatusNotificationSchema` in the `setNotificationHandler` list so the app receives `notifications/tasks/status`.

- New hook functions:
  - `cancelTask(taskId: string)` sends `tasks/cancel` with `CancelTaskResultSchema`.
  - `listTasks(cursor?: string)` sends `tasks/list` with `ListTasksResultSchema`.

- Exports:
  - Returned object now includes `cancelTask` and `listTasks`.

---

### client/src/utils/configUtils.ts

- Added a new getter:
  - `export const getMCPTaskTtl = (config: InspectorConfig): number => { return config.MCP_TASK_TTL.value as number; };`

---

### client/src/lib/configurationTypes.ts

- `InspectorConfig` type extended with a new item:
  - `MCP_TASK_TTL: ConfigItem;`
  - Includes descriptive JSDoc about default TTL in milliseconds for newly created tasks.

---

### client/src/lib/constants.ts

- `DEFAULT_INSPECTOR_CONFIG` extended with a default for task TTL:
  - Key: `MCP_TASK_TTL`
  - Label: `"Task TTL"`
  - Description: `"Default Time-to-Live (TTL) in milliseconds for newly created tasks"`
  - Default `value: 60000`
  - `is_session_item: false`

---

### client/src/components/__tests__/ToolsTab.test.tsx

- Expectations updated due to new `callTool` signature (4th arg `runAsTask`). Everywhere the test asserts a `callTool` invocation, an additional trailing `false` argument was added to reflect the default state when the box isn’t checked.
  - Examples of added trailing `false` at various assertion points (line offsets from diff): after calls around prior lines 132, 157, 193, 236, 257, 279, 297, 818, 1082 (now passing 4 arguments: name, params, metadata-or-undefined, false).

---

### Additional notes

- The Tasks feature is wired end-to-end:
  - Client capability declaration (list/cancel)
  - Notification handler for `notifications/tasks/status`
  - Tools call augmentation with `task` `{ ttl }`
  - Polling loop using `tasks/get` and `tasks/result`
  - UI feedback in Tools and dedicated Tasks tab
  - Configurable TTL via new config item and getter

* Fix issue where displayed task on task tab was not updated when task completes, leaving the cancel task button available.

* Handle button the same when input_requred or working state

* ### What changed
- Added **receiver-side (client-side) Tasks support** to the Inspector client for task-augmented **server → client** requests.
- When the server sends `sampling/createMessage` or `elicitation/create` with `params.task`, the client now:
  - Creates a local task and immediately returns a `CreateTaskResult` (`{ task: ... }`).
  - Runs the underlying user-driven flow asynchronously.
  - Updates task state to `completed` / `failed` and makes the final payload available via `tasks/result`.
- Implemented server polling handlers backed by the local task store:
  - `tasks/get`
  - `tasks/result` (blocks until payload is ready)
  - `tasks/list`
  - `tasks/cancel`
- Advertises task-augmented request capabilities via `capabilities.tasks.requests.sampling.createMessage` and `capabilities.tasks.requests.elicitation.create` when the corresponding callbacks are provided.
- Emits best-effort `notifications/tasks/status` updates as local task status changes.

* Fix review requests.

* In the ToolsTab, when a tool call results in an elicitation request, the app automatically switches to the elicitation tab, and once submitted, switches back to the ToolsTab to view the result of the tool call.

However, when a tool call results in a sampling request, it does not switch automatically to the SamplingTab and when the sampling request form is submitted it does not automatically switch back to the ToolsTab to view the result of the tool call.

These changes make the sampling use case work like the elicitation one. Tests were added.
2026-01-22 21:40:59 -07:00
claude[bot]
7f6e5792b2 Bump version to 0.19.0 across all packages
- Updated version in root package.json
- Updated version in cli/package.json
- Updated version in client/package.json
- Updated version in server/package.json
- Updated workspace dependencies in root package.json
- Updated package-lock.json via npm install

Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2026-01-21 12:37:36 +00:00
Cliff Hall
6dc5d1a0bd
Merge pull request #937 from olaservo/add-mcp-docs-server-to-claude
Add MCP docs server to Claude Code GitHub Action
2026-01-20 10:20:36 -05:00
Ola Hungerford
6247e676fe
Merge branch 'main' into add-mcp-docs-server-to-claude 2026-01-19 09:35:42 -07:00
Copilot
da684d0a9d
Update LICENSE and package.json for Linux Foundation transition (#1018)
* Initial plan

* Update LICENSE to Apache 2.0 + MIT + CC-BY-4.0 hybrid license for Linux Foundation transition

Co-authored-by: olaservo <16480113+olaservo@users.noreply.github.com>

* Update package.json license fields to reference LICENSE file

Co-authored-by: olaservo <16480113+olaservo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: olaservo <16480113+olaservo@users.noreply.github.com>
Co-authored-by: Ola Hungerford <olahungerford@gmail.com>
2026-01-19 09:33:43 -07:00
Bob Dickinson
44d0e580f6
Converted CLI tests to use vitest (#1012)
* Pinned server-everything, fixed all tests to work with current pinned version, fixed problem with undetected failures (isError: true payloads).

* First working vitest implementation

* Refactoring some single-use configs fixtures and into the refeencing tests

* No tests refere to server-everything (or any other server from a registry), all tests actually validate what they say they test.

* Removed server-everything dep from CI, minor cleanup

* Addressed Claude PR review comments: Added tsx dev dependency, beefed up process termination (possible leak on Windows), beefed up http server cleanup (close all connections), removed unused hasValidJsonOutput, reduced CLI timeout to give it breathing room with vitest timeout.

* Made both stdio and http test servers fully composable, cleaned up types, terminology, and usage.
2026-01-19 08:12:00 -07:00
Ola Hungerford
ea82effeed
Merge branch 'main' into add-mcp-docs-server-to-claude 2026-01-18 20:26:54 -07:00
olaservo
4835b7392e Fix allowedTools config to include mcp-docs MCP server tools
Add mcp__mcp-docs to allowedTools so Claude can actually use the
MCP documentation server when reviewing MCP-related code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 20:26:00 -07:00
olaservo
232f2447e5 Add MCP docs server to Claude Code GitHub Action
- Add .mcp.json with mcp-docs HTTP server configuration
- Update claude.yml to use --mcp-config and --append-system-prompt
- Add instructions for Claude to use MCP docs and schema references

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-18 20:02:31 -07:00
Cliff Hall
94ba4c3b56
* In useConnection.ts (#924)
- in connect()
    - Pass authProvider in transport options
2026-01-18 19:08:43 -07:00
Ahmet Soormally
2bf0dd1a03
fix: omit scope field in OAuth DCR when undefined and improve error handling (#1003)
fix: OAuth DCR scope field compliance

Omits the scope field entirely when undefined, per RFC 7591. This allows OAuth servers to assign default scopes instead of registering clients with no scopes.

Tested with Keycloak DCR.
2026-01-18 14:22:21 -07:00
Cliff Hall
5a7f9961eb
Merge pull request #765 from howardjohn/inspector/error-popup
Add a toast on connection error
2026-01-09 15:55:04 -05:00
Cliff Hall
8cb845798e
Merge branch 'main' into inspector/error-popup 2026-01-09 15:52:22 -05:00
Cliff Hall
4a4968f30f
Merge pull request #1004 from olaservo/update-typescript-sdk
Update typescript sdk to 1.25.2
2026-01-08 12:58:11 -05:00
olaservo
66b84b0431 Update minimum SDK version to ^1.25.2 in package.json files
Ensures fresh installs without lock file get the patched version.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 20:51:05 -07:00
olaservo
3c892b2ddf Fix high severity security vulnerabilities
Update @modelcontextprotocol/sdk from 1.24.3 to 1.25.2 to fix ReDoS
vulnerability (GHSA-8r9q-7v3j-jr4g) and qs to 6.14.1 to fix DoS
vulnerability (GHSA-6rw7-vpxm-498p).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 20:30:53 -07:00
Cliff Hall
fc8066efe6
Merge pull request #999 from thinhtpt-dev/main
fix: detect 401 errors from `StreamableHTTP` transport in client
2026-01-07 16:19:45 -05:00
cliffhall
f7bf100a65 Fix is401Error 2026-01-07 14:23:46 -05:00
Cliff Hall
04898cb5ce
Update client/src/lib/hooks/useConnection.ts 2026-01-07 14:16:22 -05:00
Cliff Hall
fdd5bec519
Merge branch 'main' into main 2026-01-07 14:07:26 -05:00
Cliff Hall
36a7244f86
Update client/src/lib/hooks/useConnection.ts
Adding fix for Via Proxy mode
2026-01-07 14:07:17 -05:00
Ola Hungerford
82067f3c2d
Merge pull request #1001 from cliffhall/allow-claude-pr-reviews-from-forks
Allow Claude to code review PRs from forks
2026-01-06 16:32:50 -07:00
cliffhall
775726b958 prettier 2026-01-06 16:31:38 -05:00
cliffhall
1c265b9260 Remove claude_pr_review.yml as it turns out there is a GitHub restriction that keeps secrets from being accessed on PRs from forks. We will have to request reviews manually.
* Modify claude.yml

1. Added "Get PR details" step (NEW - lines 28-51)
This new step runs ONLY when the trigger is a PR-related comment. It:

- Detects if it's a PR comment vs regular issue
- Fetches the PR information using GitHub API
- Extracts the fork's repository name and commit SHA
- Sets them as outputs (steps.pr.outputs.sha and steps.pr.outputs.repo)

Why? The original workflow couldn't see fork PR code because it only checked out the main repo.

2. Split checkout into TWO conditional steps (CHANGED - lines 53-62)
Before: One checkout step that always checked out main repo with fetch-depth: 1
After: Two checkout steps:

- "Checkout PR branch" - Runs if PR details were fetched successfully, checks out the fork's PR branch
- "Checkout repository" - Runs otherwise (for regular issues), checks out main repo

Why? Need different checkout behavior for PRs (checkout fork) vs issues (checkout main).

3. Changed fetch-depth from 1 to 0 (CHANGED)
Before: fetch-depth: 1 (only latest commit)
After: fetch-depth: 0 (full git history)
Why? Claude Code needs more context to understand the codebase and provide better reviews.

Summary
The original workflow could only see the main repo's code. When you commented @claude on a fork PR, it would review the wrong code!
These changes make it check out the actual PR branch from the fork when reviewing PRs, while keeping the original behavior for regular issues.
2026-01-06 16:25:57 -05:00
cliffhall
7e6cc16fba Change instructions to prompt in claude_pr_review.yml 2026-01-06 15:50:15 -05:00
cliffhall
33b71992e4 Allow Claude to safely do code review automatically and from forks. Doesn't change the existing Claude workflow.
* Added claude_pr_review.yml
2026-01-06 15:36:17 -05:00
thinhtpt-dev
e1886a8229 fix: detect 401 errors from StreamableHTTP transport in client 2026-01-06 14:00:13 +07:00
Ola Hungerford
fe393e514a
Merge pull request #974 from DaleSeo/anyof-description
Show description for anyOf fields in JSON editor
2025-12-22 08:11:46 -07:00
Dale Seo
6eed736d23 fix: display description for anyOf fields in JSON editor 2025-12-18 16:40:50 -05:00
Ola Hungerford
f5d9c187c6
Merge pull request #972 from cliffhall/update-readme-about-docker
Update docker launch command
2025-12-18 05:09:33 -07:00
Cliff Hall
1977e2a597
Merge pull request #966 from olaservo/fix/streamable-http-401-handling 0.17.6 0.18.0
fix: detect 401 errors from StreamableHTTP transport for OAuth flow
2025-12-13 18:04:34 -05:00
cliffhall
6de14a36b6 Update docker launch command 2025-12-13 17:45:43 -05:00
Ola Hungerford
8ea530cee9
Merge pull request #971 from cliffhall/bump-ts-sdk-version
Bump TS SDK version to 1.24.3
2025-12-13 10:48:41 -07:00
cliffhall
96e256687e Bump TS SDK version to 1.24.3 2025-12-13 12:01:40 -05:00
Cliff Hall
e7018c0e23
Merge pull request #969 from olaservo/release/v0.18.0
chore: bump version to 0.18.0
2025-12-13 11:11:43 -05:00
olaservo
b3a27297c8 chore: bump version to 0.18.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 08:08:44 -07:00
Ola Hungerford
5778a3a93e
Merge pull request #926 from bolinfest/sapling-pr-archive-bolinfest
fix: allow empty elicitation form data when all fields are optional
2025-12-11 21:34:12 -07:00
Ola Hungerford
bce61b2d34
Merge pull request #968 from Vijaydaswani/fix/icon-theme-property
feat: add theme property to Icon and Prompt types
2025-12-11 20:42:53 -07:00