mirror of
https://github.com/mcp-use/mcp-use.git
synced 2026-09-14 18:06:01 +08:00
@mcp-use/agent@2.0.6
5 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4a64d99fd7 |
fix(python): use python3 instead of python3.11 in pre-commit config (#1690)
Signed-off-by: Parship Chowdhury <parshipchowdhury@gmail.com> |
||
|
|
83271e869f |
Canary (#1508)
* chore: remove unused mcp-use source files (#1476) * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * docs(cli): clarify inspector skipped-in-production log + start section (#1505) * docs(cli): clarify inspector skipped-in-production log + start section The runtime log "[INSPECTOR] Skipped in production (use --with-inspector flag during build)" reads as if the flag can be passed to `mcp-use start`, which it can't (the flag is only registered under `build`). The new wording spells out the rebuild command, and `cli-reference.mdx` gains a short note under `start` pointing at the build flag for inspector-in-production. Closes #1495 * docs(cli): apply reviewer reword on inspector note * chore(typescript): version packages (canary) * chore(inspector): remove unused source files (#1510) Drops the 18 inspector files reported by `pnpm knip` from libraries/typescript and stops generating the unused client-side version.ts (the client reads the version from the window.__INSPECTOR_VERSION__ global injected by the server). Part of #1446. * chore(typescript): version packages (canary) * chore(typescript): prune 187 unused exports and 161 unused export types flagged by knip (#1511) * chore(typescript): prune 161 unused exported types flagged by knip Phase 2 of #1450: remove or de-export types that knip flags as unused. Skipped tuning knip.json (Phase 1) — focused only on the type cleanup. For each flagged type: - Used only within its source file → drop `export` - Re-exported through a barrel but never imported downstream → remove the re-export - Genuinely dead → delete No public-API removals: types exposed through the `mcp-use`, `@mcp-use/cli`, `@mcp-use/inspector`, or `create-mcp-use-app` package entry points remain exported. `client.ts` switches from inline `import("...")` to a top-level import so knip can see the `ToolSearchResponse` usage. Verified `pnpm knip` reports 0 unused types (down from 161) and `pnpm build` passes across all packages. * chore(typescript): prune 187 unused exports flagged by knip Closes #1450. * chore(typescript): fix prettier formatting * chore(typescript): delete orphaned PropsSelect.tsx Removing the unused barrel re-export in the prior commit left this file with no consumers. * chore(typescript): version packages (canary) * ci(knip): enforce knip and clear final baseline findings (#1512) * chore(knip): clear remaining baseline findings so knip passes clean - Mark `src/index.tsx` as an entry for create-mcp-use-app so its CLI dependencies (chalk, commander, ink, ora, tar, react, etc.) stop being flagged as unused. - Add `lsof`, `sleep`, and `dev` to ignoreBinaries for the mcp-use workspace — these appear in example scripts and are either system utilities or pnpm script names, not npm-resolvable binaries. - Turn off the `optionalPeerDependencies` rule. Optional peer deps (langchain/langfuse/e2b/etc.) are loaded conditionally by design; flagging them as referenced is noise. After this change `pnpm exec knip` exits 0 against canary. * ci(knip): enforce knip in CI The baseline is now clean (canary + previous PRs cleared all findings), so drop `--no-exit-code` and let the job fail when knip reports issues. Also generate `packages/mcp-use/src/version.ts` before knip runs so the gitignored `version.js` imports resolve. * chore(deps): bump better-auth in /libraries/typescript (#1515) Bumps [better-auth](https://github.com/better-auth/better-auth/tree/HEAD/packages/better-auth) from 1.6.1 to 1.6.11. - [Release notes](https://github.com/better-auth/better-auth/releases) - [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/better-auth/CHANGELOG.md) - [Commits](https://github.com/better-auth/better-auth/commits/better-auth@1.6.11/packages/better-auth) --- updated-dependencies: - dependency-name: better-auth dependency-version: 1.6.11 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: tighten PR readiness and docs hygiene (#1509) * docs: tighten review readiness and doc links * docs: anchor api-reference redirect and fix missed node note Move the /typescript/server/api-reference target from a bare redirect to an anchored one (#mcpserver-api-reference) so existing "API Reference" links land on the renamed section directly. Drop the self-link in server/index.mdx and bring the commonjs example's Node note in line with the package engines range. --------- Co-authored-by: Andrew Khadder <andrew@manufact.com> * feat(server/oauth): allow Supabase URL override for self-hosted/local instances (#1517) * feat(server/oauth): allow overriding Supabase URL for self-hosted/local instances `oauthSupabaseProvider` previously hardcoded `https://${projectId}.supabase.co`, preventing use against local Supabase (`http://localhost:54321`) or self-hosted deployments — even though those instances expose the same OAuth 2.1 server. Add an optional `supabaseUrl` config (and `MCP_USE_OAUTH_SUPABASE_URL` env var) that overrides the projectId-derived URL. `projectId` is now optional when `supabaseUrl` is set; hosted-project users are unaffected. Closes mcp-use/mcp-oauth-supabase-template#2 * test(server/oauth): trim supabase provider tests to factory contract Drop low-value string-concatenation and pre-existing-behavior tests; keep the two that cover the new behavior (supabaseUrl alone is accepted; empty config throws). Isolate process.env in the factory describe so the "throws when neither configured" assertion isn't defeated by local MCP_USE_OAUTH_SUPABASE_* env vars. * docs(server/oauth): document supabaseUrl override for local/self-hosted Supabase * chore(typescript): version packages (canary) * chore: use cross-platform clean commands (#1523) * chore: use cross-platform clean commands * chore: add empty changeset for cross-platform clean scripts --------- Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * fix(server/oauth): use URL constructor to avoid double slash in metadata proxy (#1483) * fix(server/oauth): use URL constructor to avoid double slash in metadata proxy The DCR-direct metadata proxy was string-concatenating a path onto the issuer, which canonically ends with a trailing slash: `${issuer}/.well-known/oauth-authorization-server` // → "https://tenant.auth0.com//.well-known/oauth-authorization-server" Auth0 returns 404 for any path starting with "//", which broke OAuth discovery end-to-end against real Auth0 tenants in DCR-direct mode. new URL(path, base) normalizes the join regardless of trailing slash, so this works for any provider whose canonical issuer ends with "/". Fixes #1482. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(server/oauth): normalize issuer trailing slash instead of using URL constructor `new URL("/.well-known/...", issuer)` resolves the leading-slash path against the issuer's origin, stripping any path on the issuer. That breaks providers like Supabase whose issuer is `https://<project>.supabase.co/auth/v1`. Replace with a trailing-slash-stripping template literal, which handles both Auth0 (issuer ends with `/`) and Supabase (issuer has a path). * chore(changeset): trim oauth metadata fix entry * chore(changeset): drop issue reference --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * test(inspector): add OAuth e2e against emulated Google issuer (#1481) * test(inspector): add OAuth e2e test using emulated Google issuer Covers the inspector's OAuth redirect flow end-to-end against an `emulate`-backed Google issuer + MCP server in oauthProxy mode, run twice across the Direct and Via Proxy connection-type matrix. Both variants share one fixture in serial mode since the registered redirect URI pins the MCP server to a fixed port. * test(inspector): switch loop to factory to satisfy no-loop-func The for-loop variant captured the mutable `fixture` binding from beforeAll, which eslint's no-loop-func flags. Hoisting the body into a small factory keeps the shared fixture without the closure-over-loop pattern. * test(inspector): close emulator if MCPServer setup fails Wrap post-createEmulator work in try/catch so the emulator port doesn't stay bound when MCPServer construction or listen() throws. * chore(typescript): version packages (canary) * fix(inspector): surface MCP server auth failures with reconnect banner (#1485) * fix(inspector): surface MCP server auth failures with reconnect banner (MCP-2111) When the hosted inspector's chat backend returns 401 because the upstream MCP server rejected the user's OAuth token (e.g. Linear token expired), the inspector previously threw a generic `HTTP error! status: 401` and the cloud response misleadingly pointed users at the Manufact account login. The chat now recognises the cloud's `{ error: "mcp_auth_required", mcpServerUrl }` response and renders an inline banner above the input ("Reconnect to <server>") with a button that calls `connection.authenticate()`. Reconnect refreshes the OAuth token in localStorage; the banner clears on success and chat resumes. Pairs with a cloud-side change that drops the misleading `loginUrl` field from the 401 response. * fix(inspector): harden mcp_auth_required handling - Drop the no-op setMessages filter in the 401 branch; the optimistic assistant message is only added after the response check, so there's nothing to remove. - Guard `new URL(serverUrl)` in McpReconnectBanner so a malformed URL falls back to the raw string instead of crashing the chat tab. * refactor(inspector): rename mcpAuthRequired to mcpServerAuthRequired The hook's internal state was already named `mcpServerAuthRequired`, but the returned key and clear callback used the shorter `mcpAuthRequired`, forcing the ChatTab consumer to re-alias them. The shorter name was also ambiguous in a codebase that has two distinct auth flows: the Manufact account login (429 path) and the upstream MCP server OAuth (401 path). Align the public surface of `useChatMessages` with the internal state and the consumer's local name. The backend wire value `"mcp_auth_required"` is unchanged. * chore(inspector): remove mcpServerAuthRequired comment * chore(typescript): version packages (canary) * fix(inspector): keep tab count badges visible in collapsed mode (#1490) * fix(inspector): keep tab count badges visible in collapsed mode * Keep tab badges aligned in collapsed mode * extract TabCountBadge and fix badge visibility * chore(typescript): version packages (canary) * fix(inspector): drop unused TabCountBadge barrel re-export (#1533) The only consumer (LayoutHeader.tsx) imports TabCountBadge directly from ./shared/TabCountBadge, so the re-export in shared/index.ts is unused. Knip flagged it and started failing CI on canary after the TabCountBadge change landed. * chore(typescript): version packages (canary) * feat(inspector): add local LLM provider support for chat in Inspector (#1395) * feat(inspector): integrate ollama provider * feat(inspector): integrate lmstudio provider * fix(inspector): preserve no-icon behavior for openai-compatible provider * refactor(inspector): remove LM Studio provider and address PR feedback * fix(inspector): remove duplicate ollama union members Collapses the accidental `"ollama" | "ollama"` duplicates in ProviderName, MCPChatMessageEventData, and LLMConfig. * refactor(inspector): drop LLM proxy and call Ollama directly Ollama allows localhost origins by default, so the inspector talks to the daemon over CORS and skips the server-side proxy entirely. Surface an OLLAMA_ORIGINS hint when the browser fetch fails so tunneled or remote setups know what to configure. Theme the Ollama logo and tighten its size so the non-circular mark sits cleanly next to the other provider icons. * chore(inspector): revert gratuitous field reorders Restore original ordering of temperature/baseUrl and useCallback deps; remove stray blank line in vite.config.ts to keep the diff focused. * test(inspector): add unit tests for parseNDJSON * refactor(inspector): tighten Ollama provider integration - Guard Ollama streamChat against duplicate tool-call emissions when a chunk's tool_calls are repeated by proxies/forks - Key the models cache on (provider, baseUrl) for any base-url provider so openai-compatible no longer serves stale entries on URL changes; normalize Ollama variants (trailing slash, /api suffix) to one entry - Move OllamaCorsError into the Ollama provider module - Replace hand-written provider unions in telemetry events and server shared-utils with ProviderName - Single-source DEFAULT_OLLAMA_BASE_URL from ollama/utils.ts - Drop the unrelated tempApiKey/tempModel trim() drift in saveLLMConfig - Make OPENROUTER_ICON_URL module-private, clean up merge-artifact blank lines * chore: simplify changeset * style(inspector): apply prettier to shared-utils * fix(inspector): drop unused export on DEFAULT_BASE_URLS DEFAULT_BASE_URLS is only consumed by getDefaultBaseUrl in the same module. Knip flagged the export as unused and failed CI. * ci: retrigger after canary knip fix (#1533) --------- Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * fix(inspector): resolve CodeQL polynomial-regex alert in Ollama url normalizer (#1534) * fix(inspector): replace trailing-slash regex in Ollama url normalizer CodeQL flagged `/\/+$/` in `normalizeOllamaBaseUrl` as a polynomial regular expression on uncontrolled input. Swap the regex for an explicit linear scan and add unit tests covering the trimming behaviour plus a pathological-input case. * chore: drop unit test for trivial regex refactor * chore: drop accidentally committed .antigravitycli symlink * chore(typescript): version packages (canary) * chore: remove dead typescript-format-and-lint pre-commit hook (#1541) The hook entry pointed to `.git/hooks/typescript-pre-commit.sh`, a path that is never tracked and was never populated by any setup step, so the hook could not run for anyone. TypeScript formatting and linting are already handled by Husky (libraries/typescript/.husky/pre-commit), installed automatically via `pnpm install`'s `prepare` script. Closes #1536 * fix(inspector): stop ToolInputForm from mutating live tool inputSchema (#1545) * fix(inspector): stop ToolInputForm from mutating live tool inputSchema `ToolInputForm` was writing `required: boolean` onto each property of the live tool inputSchema during render. `required` is not valid as a per- property boolean — it belongs on the parent object as a `string[]`. Anthropic's draft 2020-12 validator rejected the resulting payload with `tools.0.custom.input_schema invalid`, breaking the Inspector chat after any tool had been opened in the Tools tab. Replace the mutation with a local `isRequired` const used only for the `*` indicator render. Fixes MCP-1970. * chore(inspector): trim comment on schema-mutation fix * chore: remove verbose comment * style(inspector): apply prettier to ToolInputForm * chore(typescript): version packages (canary) * Improve tab switch animation timing (#1544) * chore(ui): improve tab switch animation timing * chore(changeset): add changeset for tab animation improvement * chore(typescript): version packages (canary) * fix(inspector): propagate server alias updates through mcp server wrapper (#1539) * fix(inspector): propagate server alias updates through McpServerWrapper onUpdate * chore: add changeset for mcp-use server alias propagation fix --------- Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * chore(typescript): add 3-day install cooldown via pnpm minimumReleaseAge (#1516) Blocks `pnpm install` from fetching npm versions published less than 3 days ago, mitigating supply-chain attacks where a malicious release is typically yanked within hours of discovery. The setting (introduced in pnpm 10.16) lives in pnpm-workspace.yaml — in modern pnpm only auth/registry config is read from .npmrc, so putting it there would be silently ignored. Workspace-published names (`mcp-use`, `@mcp-use/*`, `create-mcp-use-app`) are exempted so the cooldown never interferes with local development or fresh releases of our own packages. * fix(react): improve server management in McpClientProvider (#1561) Refactor server removal and update logic to use a ref for synchronous access to the latest server state. This change prevents React's warning about updating a component during rendering by ensuring that teardown side effects (`disconnect()` and `clearStorage()`) are executed outside of the state updater functions. The ref is updated in a useEffect hook to maintain the latest server state for event handlers. * chore(typescript): version packages (canary) * fix(inspector): forward MCP image tool results as image content (#1487) * fix(inspector): forward MCP image tool results as image content (MCP-1941) Previously, the inspector's chat loop and provider adapters serialized MCP tool results with JSON.stringify, which buried the base64 `data` field of `image` content blocks inside a text payload. Vision-capable models received a wall of base64 text instead of the image. Extract MCP `content` blocks into provider-neutral `ContentPart[]` and route image bytes through each provider's vision channel: - Anthropic: image blocks inside `tool_result.content` (base64 source). - OpenAI: tool role keeps text; image bytes forwarded as a follow-up user turn with `image_url` parts. - Google: `functionResponse.response` keeps text/metadata; image bytes forwarded as a follow-up user turn with `inlineData` parts. Text-only tool results keep the legacy `content: string` path on every provider. * style(inspector): apply prettier formatting * chore(inspector): drop unused export on collapseToString Only called internally by toolResultToContent — knip flagged it as an unused export. * fix(inspector): propagate MCP isError flag and fix image example tools - Add isToolResultError() helper and use it in toolLoop + replay so tool calls that return { isError: true } are flagged the same as thrown errors on both live and saved-conversation paths. - Pick a no-content fallback for OpenAI's tool role when there are no image parts to forward. - Replace via.placeholder.com URLs in the everything example with real base64-encoded bytes fetched from picsum.photos, since the image() helper expects MCP ImageContent base64 data, not URLs. * style(inspector): apply prettier formatting * chore(typescript): version packages (canary) * fix(server/inspector): normalize 0.0.0.0 to localhost in autoConnect URL (#1552) * fix(server/inspector): normalize 0.0.0.0 to localhost in autoConnect URL Browsers cannot resolve 0.0.0.0 as a destination, and the MCP SDK's OAuth resource validator does strict origin equality — so the inspector auto-connecting to http://0.0.0.0:PORT/mcp mismatches the resource metadata published as http://localhost:PORT (which goes through normalizeUrlHost in server-helpers.ts). Result: OAuth-protected mcp-use apps fail at the inspector's post-callback validation with "Protected resource X does not match expected Y". Mirror the existing normalization for the autoConnect URL and the banner log so both reflect the browser-reachable host. Closes #1551 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: add changeset for inspector autoConnect loopback normalization --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * fix(cli): align widget Vite base with /mcp-use/widgets (#1560) * fix(cli): align widget Vite base with /mcp-use/widgets/ when MCP_URL is set * chore: add changeset for cli widget base path fix * chore: format widget-paths.ts --------- Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * feat(cli): headless screenshot with auto-sizing and external MCP server support (#1579) * feat(cli): headless screenshot command with auto-sizing and external MCP server support - Make width/height optional; when omitted, clips to the widget's natural rendered size by reading body[data-view-*] rect attrs set by the preview page - Add useBundleReadinessSignal in ViewPreview that uses ResizeObserver to wait for the iframe to stabilize before setting data-view-ready, serializing the iframe's bounding rect so the CLI can clip tightly instead of capturing the full viewport - Switch ViewPreviewBundle to displayMode="inline" so widgets auto-size to content height - Add inlineWidthOverride prop to MCPAppsRenderer to bypass the 768px inline cap when screenshotting at an explicit width - Fix extractViewName to handle external MCP server URIs (ui://<server>/<name>.html) by flattening to <server>-<name>; previously only ui://widget/ was handled, causing React Router to fail to match the preview route for third-party servers like Excalidraw * chore: add changeset for screenshot auto-sizing and external MCP fix * fix(cli): unexport CaptureScreenshotResult to satisfy knip * chore(typescript): version packages (canary) * feat(auth): enhance OAuth callback handling with improved state management and user feedback (#1580) * feat(auth): enhance OAuth callback handling with improved state management and user feedback - Introduced a module-level cache for in-flight authorization promises to prevent duplicate network requests during the same page load. - Added utility functions to determine if the current window is a popup and to render user-friendly messages for closing the window after authentication. - Improved handling of redirect flows and popup scenarios to ensure a seamless user experience, including error handling and messaging for lost opener situations. * fix(auth): BroadcastChannel fallback when popup opener is severed Popup callback now broadcasts success/failure over a same-origin BroadcastChannel("mcp_auth_callback") in the lost-opener branch, and useMcp subscribes to that channel alongside the existing window.message listener. Without this, popups whose window.opener was severed by COOP or cross-origin intermediate redirects would save tokens but leave the parent stuck in `authenticating`. Matches the dual-transport pattern used by oidc-client-ts and MSAL.js for the same COOP scenario. * chore(auth): unexport MCP_AUTH_BROADCAST_CHANNEL to satisfy knip It's only used inside callback.ts; the parent side hard-codes the same string in useMcp.ts. Removing the export drops knip's "unused export" finding while keeping a single source-of-truth comment that links the two files. * fix(mcp-use): split langchain agents out of mcp-use/browser entry Move MCPAgent, RemoteAgent, adapters, and observability to mcp-use/browser/agent so Next.js clients importing MCPClient only no longer pull @langchain/* into the browser bundle. * chore: format browser bundle test file * chore(typescript): version packages (canary) * fix(inspector): add copy button to user messages (#1556) * fix(inspector): add copy button to user messages Extract CopyButton into a shared component and add it to UserMessage, matching the existing assistant message UX. Resolves #1555 * chore: add inspector copy button changeset --------- Co-authored-by: Jefsky <jefsky@users.noreply.github.com> Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * feat(server): add publicLandingPage option for OAuth-protected servers (#1550) * feat(server): add publicLandingPage option for OAuth-protected servers * fix(server): keep public landing auth gate in oauth setup * docs(server): add public landing page example * chore(server): format mcp endpoint * chore(server): simplify accept header lookup * chore(server): restore mcp mount diff * fix(server): align oauth exports with canary * chore(server): format oauth exports * fix(server): remove unused oauth barrel exports --------- Co-authored-by: Andrew Khadder <andrew@manufact.com> * Move mcp-apps template pnpm settings to workspace config (#1602) * fix(inspector): widget fullscreen above embedded host chrome (MCP-2181) (#1605) * fix(inspector): portal widget fullscreen above host chrome MCP-2181: cloud chat headers at z-50 covered the fullscreen exit control because the overlay used z-40 inside a nested stacking context. Portals the fullscreen shell to document.body at z-[100], sets data-mcp-widget-fullscreen for hosts, and shows the Apps SDK exit navbar in CSS fullscreen fallback. * fix(inspector): native fullscreen first, no portal remount (MCP-2181) Revert conditional createPortal that remounted widgets on fullscreen toggle. Use requestFullscreen() as the primary path; apply CSS z-[100] overlay only when the API fails. Keep exit navbar and data-mcp-widget-fullscreen for both. * refactor(inspector): consolidate widget fullscreen into shared hook Extract useWidgetFullscreenControls for native-first fullscreen + CSS fallback. Removes duplicated handlers, unused helpers, and OpenAI edge-case branches from MCPAppsRenderer and OpenAIComponentRenderer. * fix(inspector): preserve widget state when entering fullscreen (MCP-2181) Route ui/request-display-mode through native fullscreen handling, target requestFullscreen on the iframe wrapper, and avoid resetting load state on display-mode-only changes. Stabilize OpenAI iframe listeners so chat re-renders do not flash the skeleton. * style(inspector): format OpenAIComponentRenderer for Prettier * fix(inspector): fullscreen shell includes navbar and fills viewport Promote the outer widget shell via requestFullscreen so FullscreenNavbar stays visible and bg-background fills the screen instead of browser black letterboxing around a nested iframe wrapper. * fix(inspector): PiP portal and sandbox remount bridge reconnect (MCP-2181) Port PiP to document.body with z-[100]. Re-run AppBridge when the sandbox iframe remounts; keep the host spinner until initCount recovers. Unify display-mode document attributes for optional host chrome hiding. * fix(inspector): resend widget data after PiP remount * chore(typescript): version packages (canary) * Hash Claude resource domains from authored ui.domain (#1599) * Apply Claude resource domain hashing for UI metadata * chore: format Claude domain helper * fix(inspector): drop unused widget-fullscreen exports to satisfy knip (#1607) widget-fullscreen.ts (added in #1605) exported several symbols that nothing outside the file consumes, plus pre-emptive @deprecated aliases for an API that never shipped. Only useWidgetDisplayModeControls is used (by MCPAppsRenderer and OpenAIComponentRenderer). - Unexport internal-only constants, the WidgetDisplayMode type, and the useWidgetDisplayModeDocumentChrome helper - Remove the dead useWidgetFullscreenControls / useWidgetFullscreenDocumentChrome aliases * test(agent): drop live Langfuse API integration tests (#1608) The observability integration tests queried the live Langfuse REST API (via getRecentTraces) to verify traces landed. cloud.langfuse.com has been returning 403 Forbidden for both ingestion and queries, failing the 'should send traces to Langfuse when observability is enabled' test and reddening canary CI. Remove the two tests that depend on the live API (the failing test and the already-skipped manual-trace test) plus the now-unused getRecentTraces helper. Keep the two tests that verify observability enable/disable behavior locally with no network dependency. * chore(typescript): version packages (canary) * fix(oauth): redact token verification errors (#1573) * fix(oauth): redact token verification errors * chore: add oauth error redaction changeset --------- Co-authored-by: Andrew Khadder <andrew@manufact.com> * chore(typescript): version packages (canary) * fix(inspector): skip emulate oauth tests in builtin e2e (#1609) * chore: add codex to gitignore (#1612) * fix(docs): update server API reference links (#1611) * fix(mcp-use): pin published dependency versions (#1610) * docs(changelog): document v1.29.0 / inspector v7.0.0 release TypeScript changelog gains a v1.29.0 entry (public landing pages, Supabase URL override, Claude UI-resource domain hashing, OAuth callback + React-provider hardening). Inspector changelog gains a major v7.0.0 entry (local Ollama provider, image tool results, MCP-server reconnect banner, widget fullscreen/PiP rework). * Fix builtin inspector auto-connect to use HTTP (#1613) * Switch builtin inspector auto-connect to HTTP * Use plain URL autoConnect in builtin e2e helper * Fix built-in inspector auto-connect to use HTTP * chore(typescript): version packages (canary) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: asim48-ctrl <asim48@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Truffle <truffleagent@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: SSharma1103 <shivamsharma11032009@gmail.com> Co-authored-by: Polæ <steven@polae.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Arpit Maurya <arpitbabu802@gmail.com> Co-authored-by: Udaykumar Dhokia <udaykumardhokia@gmail.com> Co-authored-by: Neha Prasad <nehaa9863pd@gmail.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Jefsky Wong <hwj3344@hotmail.com> Co-authored-by: Jefsky <jefsky@users.noreply.github.com> Co-authored-by: Ritwij Aryan Parmar <88580521+RitwijParmar@users.noreply.github.com> |
||
|
|
6ec11cdae2 |
Canary (#617)
* Fix/server/reafctor complete (#616) * feat: add MCP Conformance Test Servers for Python and TypeScript (#605) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: express dependency-version: 5.2.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore: add changeset for dependabot updates * Delete libraries/typescript/.changeset/dependabot-e19bd45.md Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore: add changeset for dependabot updates --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * feat: add MCP Conformance Test Servers for Python and TypeScript - Introduced a new GitHub Actions workflow for running conformance tests on both Python and TypeScript servers. - Implemented a Python conformance server that supports various MCP features and tools. - Developed a TypeScript conformance server with similar functionality, including tools and resources. - Added necessary configuration files for TypeScript server setup, including package.json and tsconfig.json. - Updated pnpm-lock.yaml to include dependencies for the new conformance server. This commit enhances the testing framework by providing dedicated servers for conformance testing, ensuring better validation of MCP features. * feat: enhance conformance workflow with conditional inputs - Added workflow_dispatch inputs to allow running only Python or TypeScript conformance tests. - Updated job conditions to skip unnecessary tests based on the selected input. - Modified the conformance summary job to ensure it does not run if cancelled. This update improves flexibility in running conformance tests, enabling targeted testing based on user input. * feat: add PR comment with conformance results and remove ext-apps * feat: show individual test results as columns in PR comment * feat: simplify conformance PR comment table * feat: add conformance comparison with main and canary branches - Fix test name parsing to remove ': X passed, Y failed' suffix - Fetch baseline results from main and canary branches - Show comparison columns (vs Main, vs Canary) with color-coded indicators - Show +1/-1 on individual tests that changed from baseline - Use 🟢 for improvements, 🔴 for regressions, ⚪ for no change, 🆕 for new * feat: prevent test name line breaks and add MCP icon - Use non-breaking hyphens (‑) in test headers to prevent wrapping - Replace microscope emoji with MCP SVG icon in PR comments * fix: use picture element for MCP icon with dark/light mode support * feat: display MCP icon inline with heading with gap --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * Feature/mcp 924 implement tool elicitation support in typescript sdk tools (#606) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: express dependency-version: 5.2.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore: add changeset for dependabot updates * Delete libraries/typescript/.changeset/dependabot-e19bd45.md Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore: add changeset for dependabot updates --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore: enter canary prerelease mode * feat(docs): add elicitation feature documentation and update client structure - Introduced new documentation for the elicitation feature, detailing both form and URL modes for user input requests. - Updated `docs.json` to include a new page for elicitation. - Enhanced the `MCPClient` and related connectors to support elicitation callbacks, allowing servers to request additional user information. - Implemented elicitation handling in various connectors (HTTP, Stdio) and updated the server context to support elicitation requests. - Added examples for using elicitation in React components and TypeScript. * feat: enhance elicitation feature documentation and server-side validation - Updated documentation to clarify server-side validation with mcp-use when using Zod schemas. - Added custom error types for elicitation validation in the mcp-use library. - Improved MCPClient to support elicitation callbacks for better user interaction. - Refactored elicitation ID generation to use UUID for uniqueness. - Enhanced error handling in the server to throw specific validation errors. * feat: add Zod dependency and implement elicitation tool in conformance server - Updated .gitignore to exclude conformance test results. - Added Zod as a dependency in the conformance package. - Implemented a new elicitation tool in the conformance server, allowing for user input with validation using Zod schemas. - Updated server feature list to include the new elicitation tool. * feat: add elicitation tool with default values in conformance server - Introduced a new elicitation tool that utilizes default values for various primitive types as per SEP-1034. - Enhanced the server's ability to handle user input with validation using Zod schemas. - Updated the server feature list to include the new elicitation tool. * fix: resolve pre.json conflict with canary - accept newer versions * chore: remove ELICITATION_IMPLEMENTATION.md and ext-apps from tracking --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(typescript): version packages (canary) * fix: update elicitation example server paths and enhance documentation (#608) - Updated paths in documentation and examples to reflect the new `examples/server/elicitation/` structure, replacing the previous `examples/server/elicitation-test/`. - Enhanced the elicitation feature documentation to clarify usage and examples. - Removed deprecated example files related to the old elicitation test structure. * chore(typescript): version packages (canary) * chore(typescript): update package versions to patch for mcp-use and inspector * Fix/server/json response (#609) * feat: update dependencies and enhance server functionality - Added new dependencies '@openai/apps-sdk-ui' and '@tanstack/react-query' to the starter template and test app. - Updated the pnpm-lock.yaml to reflect the new dependencies and their versions. - Modified mcp-server.ts to enable JSON response for SSE streaming. - Refactored createExternalUrlResource, createRawHtmlResource, and createRemoteDomResource functions to return promises for better async handling. * refactor: update create-mcp-use-app package to use React and Ink components - Changed the build script to compile TypeScript files with JSX support. - Replaced Inquirer with Ink components for interactive CLI prompts. - Removed the old index.ts file, transitioning to a more modern React-based approach. - Updated package dependencies to include React and Ink, ensuring compatibility with the new structure. - Enhanced the TypeScript configuration to support JSX. * chore(typescript): version packages (canary) * chore(typescript): update mcp-use and inspector versions to minor for elicitation support * refactor(typescript): clean up mcp-use package structure and enhance type exports - Removed deprecated '@mcp-use/cli' and 'tsx' from devDependencies in package.json and pnpm-lock.yaml. - Reorganized type exports in mcp-server.ts to improve clarity and accessibility of ToolContext-related types. - Refactored logging.ts to utilize a centralized getEnv function for environment variable access. - Updated imports in various files to reflect the new structure and removed unused code. - Deleted the mcp-ui-adapter.ts file as it was no longer needed. * feat(typescript): enhance mcp-use package with new dependencies and refactor server endpoints - Added 'express' as a dependency in package.json and updated its version to 5.2.1. - Introduced new dependencies for examples in the mcp-use package, including '@openai/apps-sdk-ui', '@tanstack/react-query', and others. - Refactored server endpoint handling by consolidating request/response management and removing deprecated handlers. - Improved logging functionality with a new truncate method for better JSON output. - Cleaned up unused code and removed legacy endpoint files to streamline the package structure. * feat(mcp-server): enhance session handling with context-aware tool registration - Introduced context enhancement for tool handlers in the MCP server to support session-specific logic. - Added utility functions for session context management and improved message creation within session scope. - Refactored tool registration to wrap handlers with context-aware logic, enabling better handling of request metadata and notifications. * feat(mcp-use): update @modelcontextprotocol/sdk version and refactor server handling - Updated the @modelcontextprotocol/sdk dependency to version 1209 in package.json and pnpm-lock.yaml. - Adjusted the server port in the elicitation example from 3002 to 3000 for consistency. - Enhanced the MCP server's session handling to follow the official SDK pattern, ensuring each session has its own transport and server instance. - Refactored the mountMcp function to utilize FetchStreamableHTTPServerTransport, improving bidirectional communication and simplifying request handling. - Cleaned up deprecated Express-like request/response handling, streamlining the server's architecture. * feat(mcp-server): integrate ResourceTemplate and refactor resource registration - Imported ResourceTemplate from the SDK to enhance resource handling. - Updated resource registration to use readCallback instead of cb for improved clarity. - Created ResourceTemplate instances and associated metadata during resource registration, streamlining the process and ensuring better integration with the SDK. * refactor(mcp-use): streamline server examples and update dependencies - Removed deprecated '@mcp-use/cli' and 'tsx' from devDependencies in package.json and pnpm-lock.yaml. - Refactored server examples to utilize new response helpers for consistency and clarity. - Updated the MCP server examples to improve structure and remove unnecessary code. - Enhanced the resource and prompt registration to support new callback patterns, ensuring better integration with the SDK. - Cleaned up unused files related to elicitation tests, improving overall package organization. * feat(mcp-use): enhance server tools and improve type handling - Added new server tools with optional message parameters, providing default values for better usability. - Refactored server example files to streamline tool definitions and improve clarity. - Updated type exports to include new utility types for handling optional fields in Zod schemas, enhancing type safety and flexibility in callbacks. - Improved server initialization by removing hardcoded port values, allowing for dynamic port assignment. - Cleaned up unnecessary console logs and comments to enhance code readability. * refactor(mcp-use): enhance context handling in server tools and resource registration - Removed redundant tool definitions in server examples to streamline code. - Improved type handling by introducing EnhancedPromptContext and EnhancedResourceContext for better access to request context. - Updated callback signatures in resource and prompt definitions to support context-aware execution. - Enhanced error handling and response management in server tools for improved reliability. * refactor(mcp-use): improve context management and streamline server tools - Enhanced context handling in server tools by refining callback signatures and introducing new context types. - Streamlined server examples by removing redundant tool definitions and improving error handling. - Updated resource and prompt registration processes for better integration and reliability. * chore(conformance): remove branch restrictions from push and pull_request triggers - Eliminated specific branch filters for push and pull_request events in the conformance workflow, allowing for broader execution on any branch changes. * only those branches * default 3000 * fix: update default port from 3001 to 3000 across various components - Changed default URL and port settings in ConnectionSettingsForm, middleware, and example scripts to use port 3000. - Updated related documentation and comments to reflect the new default port for consistency. * fix(conformance): set TypeScript server port to 3000 for conformance tests - Updated the conformance workflow to explicitly set the TypeScript server to run on port 3000, ensuring consistency with recent changes across components. * chore: update @modelcontextprotocol/sdk version in package files - Updated the version of @modelcontextprotocol/sdk from 1194 to 1209 in pnpm-lock.yaml, package.json, and deno.json to reflect the latest changes in the SDK. --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(typescript): version packages (canary) * fix(docs): update sampling link in elicitation documentation (#618) - Changed the sampling link in the elicitation documentation to point to the correct GitHub repository path for LLM completions, ensuring users have access to the latest examples and resources. * Fix/server/increase conformance score (#619) * feat(server): enhance conformance server with new audio and logging tools - Added a new tool for returning silent audio content in WAV format. - Updated the image tool to include a more descriptive name. - Introduced a tool that simulates logging during execution, providing console output for tool processing steps. - Enhanced the mixed content tool to support multiple content types, including text, image, and resource data. - Updated prompt handling to accept new argument names for better clarity. * refactor(mcp-server): enhance schema handling for prompts and server configuration - Updated schema handling in McpServer and prompt registration to create parameter schemas when arguments are provided. - Improved error handling by setting argsSchema to undefined when no schema or arguments are available, ensuring clearer validation logic. - Refactored regex pattern in server helpers to correctly replace parameter placeholders, enhancing template URI parsing. * feat(server): enhance audio handling and logging capabilities - Introduced a new audio tool for returning audio content, supporting both base64 data and file paths. - Updated server tools to utilize a logging mechanism that sends log notifications during execution. - Enhanced resource handling to support new content types and improved error handling for logging levels. - Refactored existing tools to streamline code and improve clarity in tool definitions. * feat(server): implement resource subscription management and dynamic updates - Added a new subscribable resource that can be updated and subscribed to by clients. - Introduced a tool for updating the subscribable resource, notifying all subscribers of changes. - Enhanced session management by cleaning up resource subscriptions when sessions are closed. - Updated context storage to include optional session IDs for better tracking. - Refactored idle cleanup to support session-specific resource subscription cleanup. * feat: enhance conformance workflow with dynamic badge generation for Python and TypeScript - Added new steps in the GitHub Actions workflow to calculate and create conformance badges for both Python and TypeScript based on test results. - Updated README.md to include links and badges for Python and TypeScript conformance, providing users with immediate feedback on test status. * fix action uses * fix: update conformance workflow badge calculations and labels - Changed the conformance badge calculation to use integer scaling for percentage rates. - Adjusted the passing rate threshold from 80% to 60% for badge color determination. - Updated badge labels for Python and TypeScript to reflect "MCP Conformance" instead of just the language. * fix: enable conformance comments on forked PRs with two-workflow pattern - Split conformance workflow into test execution and comment posting - Created conformance-comment.yml with workflow_run trigger for full permissions - Upload PR metadata and parsed results as artifacts - Updated badge labels to 'MCP Conformance (TS)' and 'MCP Conformance (PY)' - Fixed badge colors: green at 100%, yellow ≥60%, red <60% - Resolves permission errors when posting comments on forked PRs * feat(server): update serverBaseUrl to use environment variable helper (#625) * feat(server): update serverBaseUrl to use environment variable helper - Implemented a helper function to set serverBaseUrl based on MCP_URL environment variable, ensuring correct public URL usage for widgets/assets. * fix(server): improve error handling and logging for resource management - Enhanced error handling in resource subscription management to ensure clearer validation and logging. - Updated logging mechanisms to provide better insights during execution, particularly for resource updates and session management. - Refactored code for improved clarity and maintainability in server tools. * chore(typescript): version packages (canary) * fix: prevent code injection in conformance-comment workflow Use environment variables instead of direct string interpolation to pass PR metadata to the github-script action, preventing potential code injection from untrusted input. Addresses CodeQL security findings. * chore: trigger conformance workflow * feat: allow conformance comment workflow to run on push events - Remove pull_request-only restriction from workflow trigger - Make PR metadata download and comment posting conditional - Workflow now runs for both push and pull_request events - For push events, workflow completes without posting comment - Badges remain branch-specific per existing logic in conformance.yml * fix: revert comment workflow to PR-only events - Comment workflow only runs for pull_request events (not push) - For push events, there's no PR to comment on - Conformance workflow already runs on all branch pushes for iteration - Badges remain branch-specific (only updated for main/canary pushes) * Docs/refactor (#633) * quickstart * chore: update documentation and assets - Renamed "Getting Started" group to "Get Started" in docs.json. - Added new SVG logo for MCP use and several images for TypeScript documentation. - Created a new changelog file for tracking updates and improvements. - Removed outdated security and logging documentation, and updated links in various guides. - Introduced new response helpers and improved server logging documentation. - Enhanced the UI widgets section to support OpenAI Apps SDK with zero boilerplate. * refactor: update MCP server instantiation to use class constructor - Replaced instances of `createMCPServer` with the new `MCPServer` class constructor across documentation and example files. - Updated related documentation to reflect the new instantiation method, enhancing clarity and consistency. - Ensured backward compatibility by retaining the `createMCPServer` function for legacy support. * refactor: standardize MCPServer instantiation in documentation - Updated examples to utilize the new `MCPServer` class constructor instead of the legacy `createMCPServer` function. - Enhanced documentation clarity by providing consistent usage patterns and emphasizing the recommended instantiation method. - Maintained backward compatibility by retaining the legacy function for existing users. * refactor: update subscribable resource schema to use default value - Changed the `newValue` property in the subscribable resource schema to have a default value of "Updated value". - Updated the async function to utilize the default value, simplifying the parameter handling. * refactor: enhance type inference and callback signatures for resource templates - Updated the `registerResourceTemplate` function to support multiple callback signatures, improving type inference for developers. - Removed the deprecated `ReadResourceTemplateCallbackBivariant` interface to streamline the codebase. - Adjusted the handling of `uri` and `variables` in the server example to ensure non-null assertions, enhancing type safety. * refactor: improve resource template registration and type safety - Enhanced the `registerResourceTemplate` function to better support multiple callback signatures, improving developer experience. - Removed the obsolete `ReadResourceTemplateCallbackBivariant` interface to clean up the codebase. - Updated the handling of `uri` and `variables` in the server example to enforce non-null assertions, boosting type safety. * chore(typescript): version packages (canary) * refactor: streamline async callback syntax in server tools - Updated async callback definitions in various server tools to improve consistency and readability. - Removed unnecessary line breaks and streamlined the structure of callback functions across multiple files. - Enhanced overall code clarity while maintaining existing functionality. * refactor: enhance async callback handling in server tools - Improved the structure and readability of async callback functions in server tools. - Standardized callback definitions across multiple files for better consistency. - Maintained existing functionality while enhancing code clarity. * feat: add weather tools and manual widget registration - Introduced two new server tools: `get-current-weather` and `get-weather-forecast`, utilizing the `weather-display` widget. - Updated the README to include a manual tool registration pattern for widgets that do not auto-register. - Enhanced the example structure to demonstrate custom tool usage and widget integration. - Improved documentation clarity regarding widget registration and usage patterns. * refactor: simplify input schema for get-current-weather tool - Replaced the manual input definition with a Zod schema for the `get-current-weather` tool, enhancing type safety and readability. - Streamlined the async callback function by removing explicit type annotations for inputs, improving code clarity. * refactor: enhance type safety and structure in MCPServer resource registration - Updated the `resource` and `resourceTemplate` methods in `MCPServer` to use generic types for improved type safety and clarity. - Refactored the `uiResourceRegistration` function to accept a more generalized server context, enhancing compatibility with various resource definitions. - Renamed `UIResourceServerContext` to `UIResourceServer` for better alignment with its purpose and updated its interface to reflect the new structure. - Improved overall code readability and maintainability by streamlining method signatures and enhancing type definitions. * Chore/typescript/any (#634) * fix: add noZoom attribute to images in SimpleSplitCard component - Added the `noZoom` attribute to image elements in the `SimpleSplitCard` component to prevent zooming effects on hover. - Updated image tags for both light and dark mode images, as well as logos in the action links, ensuring consistent behavior across the component. * refactor: enhance type safety and error handling in result displays - Updated the `PromptResult`, `ResourceResult`, and `ToolResult` interfaces to use specific types instead of `any`, improving type safety. - Refactored error handling in the `extractErrorMessage` functions across multiple components to handle new result structures, ensuring consistent error messaging. - Improved the handling of result properties in the `onCopy` callbacks to align with the updated types, enhancing overall code clarity and maintainability. * refactor: improve error handling and type definitions in result processing - Enhanced error handling in the `extractErrorMessage` functions to accommodate updated result structures, ensuring consistent messaging. - Updated `PromptResult`, `ResourceResult`, and `ToolResult` interfaces to utilize specific types, improving type safety. - Refactored `onCopy` callbacks to align with new type definitions, enhancing code clarity and maintainability. * chore(typescript): version packages (canary) * fix typo * Fix/mcp use/typing (#636) * refactor: remove get-weather-forecast tool and update MCPServer class structure - Removed the `get-weather-forecast` tool implementation from the server example, streamlining the codebase. - Refactored the `MCPServer` class to `MCPServerClass` for improved clarity and updated type definitions for better type safety. - Enhanced the `WidgetMetadata` interface to include new properties for input validation and annotations, aligning with tool naming conventions. * refactor: enhance widget registration logic and metadata handling - Updated the `uiResourceRegistration` function to conditionally register tools based on the `exposeAsTool` flag, improving flexibility in widget registration. - Refactored the handling of tool metadata, ensuring that relevant fields from `appsSdkMetadata` are copied only when necessary. - Enhanced the `createWidgetRegistration` function to extract and utilize the `exposeAsTool` flag from metadata, defaulting to true if not specified, for consistent behavior across widgets. * feat: add tool annotations and exposeAsTool flag to resource definition - Introduced `exposeAsTool` and `toolAnnotations` properties to the `BaseUIResourceDefinition` interface, allowing for more flexible tool registration. - Updated the `uiResourceRegistration` function to utilize the new `exposeAsTool` property directly from the resource definition, enhancing the registration logic. * feat: enhance widget integration and tool metadata handling - Added support for returning interactive UI widgets from tools using the `widget()` helper and `returnsWidget` option, improving user experience in the Inspector and ChatGPT. - Updated documentation to clarify the usage of the `widget` configuration in tool definitions, including examples for better understanding. - Enhanced the `MCPServer` class to manage widget definitions and inject metadata into tool responses, streamlining the integration of custom tools with widgets. - Improved type definitions for tools and widgets, ensuring better type safety and clarity in the codebase. * Fix/server/oauth (#637) * refactor: enhance MCPServerClass with generic OAuth support - Updated the `MCPServerClass` to support generics for OAuth, improving type safety and flexibility in tool and resource registration methods. - Refactored method signatures for `tool`, `prompt`, `resource`, and `resourceTemplate` to utilize the new `HasOAuth` type parameter, ensuring consistent behavior based on OAuth configuration. - Adjusted the `McpServerInstance` and `MCPServer` types to reflect the new generic structure, enhancing clarity in type annotations for server instances. * refactor: simplify OAuth handling in MCPServerClass - Removed the unused `oauthConfig` property and streamlined the OAuth setup logic by directly using `oauthProvider`. - Updated conditional checks for OAuth setup to enhance clarity and reduce redundancy in the codebase. * chore(ci): add --dev flag to create-mcp-use-app commands in CI workflow - Updated the CI workflow to include the `--dev` flag in both npm and yarn commands for creating test applications, ensuring development dependencies are installed correctly. * chore(ci): update CI workflow to build and pack all packages - Modified the CI workflow to build all packages in the TypeScript library and pack individual packages, including `create-mcp-use-app`, `mcp-use`, `@mcp-use/cli`, and `@mcp-use/inspector`. - Updated artifact upload and download steps to handle multiple package artifacts, ensuring all necessary packages are available for testing. - Added a step to replace workspace dependencies with file references in `package.json` for both npm and yarn test applications, improving dependency management. * chore(ci): improve PACKAGE_PATH resolution in CI workflow - Updated the CI workflow to enhance the resolution of the PACKAGE_PATH variable for the create-mcp-use-app package. - Modified the logic to handle cases where multiple package files exist, ensuring the first available package is used, improving reliability in the build process. * chore(ci): refine PACKAGE_PATH resolution in CI workflow - Enhanced the logic for determining the PACKAGE_PATH variable in the CI workflow to ensure it correctly identifies the first available create-mcp-use-app package file, regardless of the operating system. - Updated commands to use more reliable methods for file searching, improving consistency and robustness in the build process. * chore(ci): update PACKAGE_PATH resolution to use realpath in CI workflow - Modified the CI workflow to utilize `realpath` for resolving the PACKAGE_PATH variable, ensuring accurate file paths for the create-mcp-use-app package across different operating systems. - This change enhances the reliability of package path resolution in both npm and yarn commands, improving the overall consistency of the build process. * chore(ci): refine tarball path resolution in CI workflow - Updated the CI workflow to improve the resolution of tarball paths for `mcp-use`, `mcp-use-cli`, and `mcp-use-inspector` packages by using `find` to ensure the first available package is correctly identified. - This change enhances the reliability of package path resolution, ensuring accurate file paths are used during the build process. * chore(ci): add .actrc configuration for local development - Introduced a new `.actrc` file to configure the local development environment for CI workflows, specifying the use of a custom Ubuntu image and container architecture. - Updated the CI workflow to replace workspace dependencies with file references in `package.json`, enhancing consistency across different environments. - Adjusted links in documentation to ensure accurate navigation, including updates to security guides and logging resources. * fix(docs): clean up formatting and update redirects in documentation - Removed unnecessary blank lines in the documentation JSON file for improved readability. - Updated the redirects section to ensure proper formatting and consistency in the structure. * refactor(ci): enhance CI workflow for package management and path resolution (#638) - Improved the CI workflow to ensure accurate resolution of package paths for `create-mcp-use-app`, `mcp-use`, and related packages, enhancing reliability during builds. - Updated commands to utilize more robust methods for identifying package files, ensuring consistency across different environments. - Streamlined the process for building and packing all necessary packages, improving overall dependency management and artifact handling. * chore(typescript): version packages (canary) * Chore/deps/fork (#640) * chore(deps): update @modelcontextprotocol/sdk dependency and add new packages - Removed the MCP SDK update workflow as it is no longer needed. - Updated the @modelcontextprotocol/sdk dependency in multiple package.json files to point to the new GitHub repository. - Added new dependencies: glob and js-yaml, with specified version ranges. - Updated peer dependencies for express to support version 5.0.0. - Cleaned up package-lock files to reflect the new dependency structure. * chore(ci): optimize CI workflow for package path resolution and build process - Enhanced the CI workflow to improve package path resolution, ensuring accurate identification of package files across different environments. - Streamlined the build process for all necessary packages, improving reliability and consistency during builds. - Updated commands to utilize more robust methods for file searching, enhancing overall dependency management. * chore(typescript): version packages (canary) * chore(typescript): update package references to mcp-use/modelcontextprotocol-sdk (#641) - Changed all instances of @modelcontextprotocol/sdk to @mcp-use/modelcontextprotocol-sdk across various files. - Updated package.json files to reflect the new package versioning and structure. - Enhanced import paths in multiple components and utilities to ensure compatibility with the new SDK structure. - Added new dependencies and updated existing ones in the pnpm-lock.yaml file for consistency. * chore(typescript): version packages (canary) * feat: Improve typescript tel (#642) * feat: add telemetry event classes and interfaces for server and client interactions - Introduced new telemetry event classes: `ServerRunEvent`, `ServerInitializeEvent`, `ServerToolCallEvent`, `ServerResourceCallEvent`, `ServerPromptCallEvent`, `ServerContextEvent`, `MCPClientInitEvent`, and `ConnectorInitEvent`. - Added corresponding data interfaces for each event to enhance type safety and structure. - Updated the `Telemetry` class to include methods for tracking these new events, improving the telemetry system's capabilities. - Enhanced the `index.ts` file to export the new event classes and types for easier access throughout the library. * feat(telemetry): add isEnabled check to telemetry methods * fix: snake case properties * feat(telemetry): add MCPServer telemetry interface and data extraction method - Introduced the `MCPServerTelemetryInfo` interface to encapsulate necessary data for telemetry tracking from an MCPServer instance. - Added the `createServerRunEventData` function to centralize data extraction from MCPServer-like objects, enhancing the telemetry layer's functionality. - Updated the `Telemetry` class with a new method, `trackServerRunFromServer`, to track server run events directly using the new interface and extraction method. * feat(telemetry): enhance telemetry tracking for MCPClient and connectors - Integrated telemetry tracking for MCPClient initialization, connector initialization, and server events. - Added methods to track server runs, tool calls, prompt calls, and resource calls, improving observability of client-server interactions. - Updated the HttpConnector, StdioConnector, and BaseConnector classes to utilize the new tracking methods. - Enhanced MCPServer to log server initialization and execution metrics, providing better insights into server performance. * feat(telemetry): enhance resource tracking in server run events - Updated the `ServerRunEventData` interface to include new properties for tracking resources: `appsSdkResources`, `mcpUiResources`, and `mcpAppsResources`, along with their respective counts. - Refactored the `createServerRunEventData` function to map and filter resources based on MIME types, improving the granularity of telemetry data. - Adjusted the `ServerRunEvent` class to serialize the new resource properties, enhancing the telemetry output for better observability. * feat(versioning): automate version generation for telemetry - Added a new script `generate-version.mjs` to automatically generate `src/telemetry/version.ts` with the current package version during the build process. - Updated the `build` script in `package.json` to include the version generation step. - Refactored `getPackageVersion` function to return the embedded version from the generated file, improving version management. * tests for telemetry * add changeset * feat(telemetry): enhance runtime environment detection and user ID management - Introduced a comprehensive runtime environment detection system, supporting Node.js, Bun, Deno, Cloudflare Workers, Edge, and browser environments. - Added methods to determine storage capabilities for user ID persistence, including filesystem and localStorage options. - Refactored user ID retrieval to accommodate different environments, ensuring session-based IDs are generated when persistent storage is unavailable. - Enhanced telemetry event tracking by including runtime environment metadata in captured events, improving observability and debugging capabilities. * feat(telemetry): add browser stubs for Node.js-only packages - Introduced a Vite plugin to provide browser-compatible stubs for the `posthog-node` package, allowing it to be used in browser environments. - Updated the Vite server configuration to exclude `posthog-node` from dependency optimization and mark it as external in SSR mode, ensuring proper handling in both development and production builds. - Enhanced the overall compatibility of the telemetry system with browser environments by stubbing server-side functionality. * refactor: standardize code formatting and improve readability - Updated import statements to use consistent double quotes. - Reformatted function parameters and object properties for better readability across multiple files. - Enhanced the structure of telemetry-related code to improve maintainability and clarity. - Removed unnecessary blank lines to streamline the codebase. * feat(versioning): update version management and export functionality - Added version information export to the mcp-use package, allowing access to the package version across various modules. - Refactored the version generation script to output to a new location, ensuring consistency in version tracking. - Updated multiple files to import and utilize the new versioning functions, enhancing the overall version management system. * refactor(telemetry): remove unused ServerRunEventData import - Eliminated the import of ServerRunEventData from telemetry.ts to clean up the code and remove unnecessary dependencies. --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore(typescript): version packages (canary) * feat(ci): update CI workflow to use local tar files for dependencies - Modified the CI workflow to create projects using local tar files instead of workspace dependencies. - Removed the previous steps for replacing workspace dependencies in `package.json`, simplifying the process. - Added a new helper function to validate and find required tar files in a specified directory, ensuring all necessary packages are present. - Enhanced the project creation logic to support a new `--tar` option for specifying the directory containing tar files. * feat: add recursive tar file search functionality - Introduced a new helper function to recursively find `.tgz` files in a specified directory, enhancing the ability to locate required tar files. - Updated the existing `findTarFiles` function to utilize the new recursive search, improving the validation and retrieval of tar files for project creation. - Enhanced error messages to provide clearer feedback on found tar files during the process. * refactor: clean up index.tsx and update CI workflow - Removed unused functions for tar file handling from `index.tsx`, simplifying the codebase. - Updated the CI workflow to ensure consistent packaging of the `mcp-use` package, enhancing the build process. - Adjusted the project creation logic to streamline dependency management and improve clarity in the workflow. * chore(ci): update E2E canary workflow permissions - Added permissions for actions and contents in the E2E canary workflow to enhance security and control over workflow execution. * refactor: enhance error handling display in OAuth callback (#644) - Refactored the error display logic in the OAuth callback to use DOM manipulation for improved safety and clarity. - Updated regex patterns in the OAuthHelper class to be more specific, enhancing the accuracy of authentication checks for various APIs. * chore(typescript): version packages (canary) * feat(chat): enhance tool integration in chat components (#643) - Added `tools` prop to `ChatTab` for better tool management. - Updated `MessageList` to accept `tools` and implemented a helper function to retrieve tool metadata. - Enhanced `ToolResultRenderer` to utilize tool metadata for improved rendering and error handling, including debug logging for better traceability. * chore(typescript): version packages (canary) * refactor: update regex patterns in OAuthHelper for improved DNS safety - Enhanced regex patterns in the OAuthHelper class to ensure DNS-safe domain matching, accommodating maximum label length restrictions for Google APIs, Atlassian, and Slack. - Improved clarity in comments to reflect the changes made to the regex patterns. * Fix/inspector/build (#645) * chore(inspector): update prepublishOnly script for improved build process - Modified the `prepublishOnly` script in the inspector package to first build the `mcp-use` package before executing the standard build, ensuring all dependencies are correctly prepared prior to publishing. * chore: changeset * chore(typescript): version packages (canary) * chore(ci): add workflow_dispatch trigger to E2E canary workflow - Introduced a manual trigger for the E2E canary workflow, allowing for on-demand execution alongside the existing workflow_run trigger. * Update conformance workflows to use published action (#647) * Update conformance workflows to use published action - Replace inline conformance testing with mcp-use/mcp-conformance-action@v1 - Simplify conformance-comment workflow to use action's comment mode - Maintains fork PR support via workflow_run pattern * Trigger conformance tests with fixed action * Trigger conformance with v1.0.2 (aggressive cleanup) * Trigger conformance with v1.0.3 (simplified cleanup) * Trigger conformance with v1.0.4 (detached spawn) * Trigger conformance after updating comment workflow on main * Trigger conformance with v1.0.5 (baseline comparison) * Trigger conformance with v1.0.6 (old artifact format support) * Potential fix for code scanning alert no. 45: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * feat: Add browser tel to typescript (#651) * add posthog-js * refactor(telemetry): enhance telemetry functionality and browser support - Added support for browser environments in the Telemetry class, including dynamic imports of posthog-js for event tracking. - Introduced new events: ClientAddServerEvent and ClientRemoveServerEvent for better server management tracking. - Improved telemetry source management and user identification methods for both Node.js and browser contexts. - Refactored existing methods for better clarity and maintainability, including the initialization of PostHog clients based on the runtime environment. - Updated event capturing logic to handle both Node.js and browser clients effectively. * feat(telemetry): add ClientAddServerEvent and ClientRemoveServerEvent for server management - Introduced ClientAddServerEvent and ClientRemoveServerEvent classes to track server addition and removal. - Enhanced MCPClientInitEvent to include isBrowser property for better environment differentiation. - Improved properties extraction for new event classes to facilitate server management tracking. * feat(telemetry): unify telemetry exports and enhance backward compatibility - Added unified telemetry exports for browser and Node.js environments, including Tel and setTelemetrySource. - Introduced backward compatibility aliases for existing telemetry functionalities to ensure seamless integration for users transitioning to the new structure. * feat(telemetry): integrate telemetry tracking in MCPClient methods - Added telemetry tracking for server addition and removal in BaseMCPClient. - Implemented client initialization tracking in BrowserMCPClient to capture configuration details and environment context. - Enhanced error handling for telemetry tracking failures during client initialization. * feat(telemetry): enhance MCP telemetry tracking in useMcp hook - Integrated telemetry tracking for connection attempts, tool calls, and resource reads within the useMcp hook. - Added success and failure tracking for connections, tool executions, and resource accesses to improve monitoring and diagnostics. * chore(typescript): version packages (canary) --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> |
||
|
|
4fc04a9ffc |
Canary (#607)
* feat: add MCP Conformance Test Servers for Python and TypeScript (#605) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: express dependency-version: 5.2.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore: add changeset for dependabot updates * Delete libraries/typescript/.changeset/dependabot-e19bd45.md Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore: add changeset for dependabot updates --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * feat: add MCP Conformance Test Servers for Python and TypeScript - Introduced a new GitHub Actions workflow for running conformance tests on both Python and TypeScript servers. - Implemented a Python conformance server that supports various MCP features and tools. - Developed a TypeScript conformance server with similar functionality, including tools and resources. - Added necessary configuration files for TypeScript server setup, including package.json and tsconfig.json. - Updated pnpm-lock.yaml to include dependencies for the new conformance server. This commit enhances the testing framework by providing dedicated servers for conformance testing, ensuring better validation of MCP features. * feat: enhance conformance workflow with conditional inputs - Added workflow_dispatch inputs to allow running only Python or TypeScript conformance tests. - Updated job conditions to skip unnecessary tests based on the selected input. - Modified the conformance summary job to ensure it does not run if cancelled. This update improves flexibility in running conformance tests, enabling targeted testing based on user input. * feat: add PR comment with conformance results and remove ext-apps * feat: show individual test results as columns in PR comment * feat: simplify conformance PR comment table * feat: add conformance comparison with main and canary branches - Fix test name parsing to remove ': X passed, Y failed' suffix - Fetch baseline results from main and canary branches - Show comparison columns (vs Main, vs Canary) with color-coded indicators - Show +1/-1 on individual tests that changed from baseline - Use 🟢 for improvements, 🔴 for regressions, ⚪ for no change, 🆕 for new * feat: prevent test name line breaks and add MCP icon - Use non-breaking hyphens (‑) in test headers to prevent wrapping - Replace microscope emoji with MCP SVG icon in PR comments * fix: use picture element for MCP icon with dark/light mode support * feat: display MCP icon inline with heading with gap --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * Feature/mcp 924 implement tool elicitation support in typescript sdk tools (#606) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602) * chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: express dependency-version: 5.2.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore: add changeset for dependabot updates * Delete libraries/typescript/.changeset/dependabot-e19bd45.md Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore: add changeset for dependabot updates --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore: enter canary prerelease mode * feat(docs): add elicitation feature documentation and update client structure - Introduced new documentation for the elicitation feature, detailing both form and URL modes for user input requests. - Updated `docs.json` to include a new page for elicitation. - Enhanced the `MCPClient` and related connectors to support elicitation callbacks, allowing servers to request additional user information. - Implemented elicitation handling in various connectors (HTTP, Stdio) and updated the server context to support elicitation requests. - Added examples for using elicitation in React components and TypeScript. * feat: enhance elicitation feature documentation and server-side validation - Updated documentation to clarify server-side validation with mcp-use when using Zod schemas. - Added custom error types for elicitation validation in the mcp-use library. - Improved MCPClient to support elicitation callbacks for better user interaction. - Refactored elicitation ID generation to use UUID for uniqueness. - Enhanced error handling in the server to throw specific validation errors. * feat: add Zod dependency and implement elicitation tool in conformance server - Updated .gitignore to exclude conformance test results. - Added Zod as a dependency in the conformance package. - Implemented a new elicitation tool in the conformance server, allowing for user input with validation using Zod schemas. - Updated server feature list to include the new elicitation tool. * feat: add elicitation tool with default values in conformance server - Introduced a new elicitation tool that utilizes default values for various primitive types as per SEP-1034. - Enhanced the server's ability to handle user input with validation using Zod schemas. - Updated the server feature list to include the new elicitation tool. * fix: resolve pre.json conflict with canary - accept newer versions * chore: remove ELICITATION_IMPLEMENTATION.md and ext-apps from tracking --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(typescript): version packages (canary) * fix: update elicitation example server paths and enhance documentation (#608) - Updated paths in documentation and examples to reflect the new `examples/server/elicitation/` structure, replacing the previous `examples/server/elicitation-test/`. - Enhanced the elicitation feature documentation to clarify usage and examples. - Removed deprecated example files related to the old elicitation test structure. * chore(typescript): version packages (canary) * chore(typescript): update package versions to patch for mcp-use and inspector * Fix/server/json response (#609) * feat: update dependencies and enhance server functionality - Added new dependencies '@openai/apps-sdk-ui' and '@tanstack/react-query' to the starter template and test app. - Updated the pnpm-lock.yaml to reflect the new dependencies and their versions. - Modified mcp-server.ts to enable JSON response for SSE streaming. - Refactored createExternalUrlResource, createRawHtmlResource, and createRemoteDomResource functions to return promises for better async handling. * refactor: update create-mcp-use-app package to use React and Ink components - Changed the build script to compile TypeScript files with JSX support. - Replaced Inquirer with Ink components for interactive CLI prompts. - Removed the old index.ts file, transitioning to a more modern React-based approach. - Updated package dependencies to include React and Ink, ensuring compatibility with the new structure. - Enhanced the TypeScript configuration to support JSX. * chore(typescript): version packages (canary) * chore(typescript): update mcp-use and inspector versions to minor for elicitation support --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
00b19c5342 |
Canary (#599)
* Potential fix for code scanning alert no. 28: Incomplete multi-character sanitization (#577) Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * chore: enter canary prerelease mode * feat(inspector): add sampling tab and enhance navigation (#590) * feat(inspector): add sampling tab and enhance navigation - Introduced a new Sampling tab in the inspector layout, allowing users to manage sampling requests. - Implemented event listeners for custom navigation events to switch between tabs based on user actions. - Updated the LayoutContent component to conditionally render the Sampling tab and handle its state. - Enhanced the LayoutHeader to include the Sampling tab in the navigation. - Refactored the NotificationsTab to remove redundant time formatting logic by utilizing a utility function. - Updated the ToolsTab to filter results based on the selected tool, improving user experience. This commit enhances the inspector's functionality by integrating sampling management and improving tab navigation. * feat(inspector): enhance SamplingTab and SamplingRequestDisplay with LLM integration - Added `mcpServerUrl` prop to `LayoutContent` and `SamplingTab` components for LLM configuration. - Integrated LLM functionality in `SamplingRequestDisplay`, allowing users to generate responses using LLM with a new response mode toggle. - Implemented loading states and error handling for LLM generation, improving user experience during response generation. - Updated UI elements to reflect the new LLM capabilities, including dynamic content updates based on LLM responses. This commit enhances the sampling functionality by incorporating LLM capabilities, providing users with more powerful response generation options. * feat(mcp-server): enhance progress token handling and SSE streaming support - Added support for progress tokens in the McpServer class, allowing for better tracking of tool call progress. - Implemented a mechanism to extract progress tokens from both request metadata and session context. - Enhanced the response handling to support Server-Sent Events (SSE) streaming, allowing for real-time progress notifications. - Updated the handling of response headers to accommodate SSE, ensuring proper streaming behavior. - Introduced a no-op progress callback in BaseConnector to trigger progress token addition when required. This commit improves the server's ability to manage and notify progress during tool calls, enhancing the overall user experience. * refactor(inspector): clean up event handling and formatting in components - Updated event handling in Layout, SamplingTab, and related components to use globalThis for event types, improving type safety. - Enhanced formatting consistency across multiple components by standardizing JSX structure and removing unnecessary whitespace. - Improved readability of conditional rendering in LayoutContent and SamplingRequestDisplay components. This commit refines the codebase by enhancing type safety and ensuring consistent formatting, contributing to better maintainability. * feat: implement unified pre-commit strategy for Python and TypeScript (#600) - Create root .pre-commit-config.yaml with file-based filtering - Add Python hooks (ruff format/lint) for .py files only - Add TypeScript hooks (prettier/eslint) for .ts/.tsx/.js/.jsx files - Include changeset validation for TypeScript code changes - Update CONTRIBUTING.md with unified setup instructions - Both hooks run independently based on staged file patterns * chore: format TypeScript files * fix(typescript): resolve Promise type errors in MCP UI adapter - Make createUIResourceFromDefinition async - Make createWidgetUIResource async - Add Promise.resolve wrapping for createUIResource calls - Update all call sites to await async functions - Fixes TypeScript build errors * chore(typescript): version packages (canary) --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |