Commit Graph

12 Commits

Author SHA1 Message Date
Enrico ac3d1eb3bb fix(typescript): resolve CodeQL security alerts 2026-07-23 12:24:46 -07:00
Enrico Toniato 392d36c079 Optimize the standalone Inspector package (#1968)
* fix inspector hosted proxy and oauth recovery

* remove inspector compatibility report

* refactor(inspector): mount project-local dev inspector

* refactor(inspector): remove CDN application delivery

* fix(inspector): finalize local mount and proxy health checks

* refactor(typescript): optimize inspector packages

* fix(typescript): build CLI for server examples

* fix(typescript): keep CLI build deps development-only
2026-07-22 12:21:51 -07:00
Enrico Toniato eedeb4fc52 fix(inspector): recover OAuth and mount project-local dev Inspector (#1966)
* fix inspector hosted proxy and oauth recovery

* remove inspector compatibility report

* refactor(inspector): mount project-local dev inspector

* refactor(inspector): remove CDN application delivery

* fix(inspector): finalize local mount and proxy health checks
2026-07-21 18:51:47 -07:00
Enrico b5354b5285 fix(docs): update Inspector URL references to /mcp/inspector 2026-07-21 11:53:55 -07:00
Enrico 003447ce94 fix(inspector): update CDN asset resolution and modify server start command 2026-07-16 15:34:56 -07:00
Andrew Khadder 68afda5885 docs(typescript): review and rewrite TypeScript docs (MCP-2466) (#1780)
* docs: remove stale feedback block and orphaned anchor from docs.json

* chore(docs): make Typescript more prominent

* chore(docs): Update `welcome.mdx`

* docs: rewrite TypeScript quickstart and welcome pages

Refocus the quickstart on create-mcp-use-app (scaffold, run, and deploy a
first MCP server) and drop the agent/client/server primer table and
diagram. Convert the welcome page's server + widget example from Tabs to
CodeGroup and tighten the intro wording.

* docs: remove stale server templates page and fix its references

Delete the typescript/server/templates page and repoint the home
templates tip to the quickstart, which now covers create-mcp-use-app.

* docs(typescript): fix dead example links to real example paths

The 'see a full example' links pointed at GitHub folders that 404 or
contain only a README. Corrected to the real runnable examples under
libraries/typescript/packages/mcp-use/examples/, verified against
origin/main (incl. matching cd commands):

- installation: examples/server -> packages/.../examples/server
- client-configuration: a .py link -> real TS multi-server example
- code-mode: examples/client/* -> examples/agent/code-mode/*
- elicitation, sampling, notifications: server/X -> server/features/X
- supabase: server/supabase -> server/deployment/supabase
- clerk: restore missing packages/mcp-use/ path segment

Quickstart links were already fixed by the quickstart rewrite (e6903716).
Part of the docs audit (MCP-2466).

* docs(typescript): rewrite Agent and Client introduction pages

Rewrite the Agent and Client intro pages to be task-oriented and
scannable: concise feature lists with cross-links, runnable quick-start
examples, and added API reference sections. Drop stale CodeSandbox
embeds and outdated model names.

* docs(typescript): fix MCPServer class name casing in server reference

The API Reference heading, prose, and class signature used McpServer;
the real SDK export is MCPServer. Corrected all three occurrences in
server/index.mdx.

* docs: add redirect for bare /typescript/server path

Routes the bare /typescript/server path to its index page now that the
server section has been restructured.

Claude-Session: https://claude.ai/code/session_015uioJjKTAZXGQpbXHUHZWp

* docs(typescript): fix broken code examples across MCP Server & Apps section

Fix all 102 confirmed code defects found in the MCP Server & MCP Apps
documentation audit (47 pages, 401 code blocks), verified against the
mcp-use@1.32 SDK source. The recurring patterns that made copy-pasted
examples fail to compile or run are now corrected everywhere they appeared:

- server.start() -> await server.listen() (no start() method exists)
- bare-object tool returns wrapped in object()/text() response helpers;
  catch blocks renamed so they no longer shadow the error() helper
- prompt messages use role:"user" with typed { type:"text" } content
  instead of the invalid role:"system" + bare-string shape
- auth reads ctx.auth.user.userId (not ctx.auth.userId); user fields live
  under ctx.auth.user, scopes/permissions stay top-level
- security: remove verifyJwt: process.env.NODE_ENV === 'production' from all
  six OAuth provider pages (off-prod it skips signature verification and
  accepts forged tokens); rely on the secure default, with a warning never
  to disable it
- correct import subpaths: Logger/MCPClient from mcp-use, response helpers
  and server symbols from mcp-use/server, MCPClient as BrowserMCPClient from
  mcp-use/browser; drop the unexported getMcpAppsBridge
- useWidget generics use the real <TProps, TState, TOutput, ...> order;
  remove the non-existent notifyIntrinsicHeight (auto-size via McpUseProvider)
- fix the deployment URL to <id>.run.mcp-use.com/mcp, add missing z/helper
  imports, add the --branch/--dockerfile CLI options, and clean up em dashes
  and bare/malformed code fences

Each page was fixed and then independently re-verified against the SDK
source, with a repo-wide pattern sweep confirming no instances remain.
Structural IA changes (moving widget-components to /react/, orphan
redirects) are intentionally deferred to the docs rewrite.

* docs(typescript): restructure MCP Server & MCP Apps IA

Promote MCP Apps to its own top-level section in the TypeScript SDK Docs tab and move the 9 React widget-component pages out of /server/widget-components/ into /typescript/react/.

- Move 9 React component pages to typescript/react/ (git renames) with 9 redirects
- Promote MCP Apps to a top-level group (Overview pages + React subgroup)
- Remove the duplicate MCP Apps group from the Home product nav; rehome guides/chatgpt-apps-flow under MCP Apps so it no longer orphans
- Move cli-reference out of MCP Server into a new Tooling group
- Relocate response-helpers -> Core Components, openapi -> Advanced Features, nextjs-drop-in -> Deployment
- Repoint all widget-components links to /typescript/react/
- Fix 3 broken anchor links (inspector CLI env var, mcp-apps metadata, auth providers)

Structure-only change; no page content rewrites. Refs MCP-2466.

* docs: refresh TypeScript server app docs

* docs: add TypeScript API reference

* docs: streamline TypeScript server navigation

* docs: rewrite core TypeScript server guides

* docs: rewrite advanced TypeScript server guides

* docs: rewrite TypeScript server OAuth guides

* docs: rewrite TypeScript server session storage guides

* docs: rewrite MCP Apps section

* docs: add TypeScript MCP client API reference

* docs: add TypeScript MCP agent API reference

* docs: reorder TypeScript API reference nav

* docs: reorganize TypeScript tooling nav

* docs: rewrite inspector guides

* docs: rewrite MCP server tunneling guide

* docs: rewrite CLI client and reference docs

* docs: finalize TypeScript documentation rewrite

* docs: move inspector updates under get started

* Fix Mintlify validation errors

* Fix Mintlify broken links

* docs: update Manufact Cloud deployment guide

* chore: retrigger Mintlify docs preview

* Fix MDX comment syntax on home page

* docs: rework TypeScript server examples

* docs: fix server docs links

* docs: restore SDK links in home sidebar

* docs: move SDK links to end of home sidebar
2026-06-29 10:05:13 -07:00
Pietro Zullo 8348c59a53 docs: reorganize, fix accuracy, and update for agent readability (#1502)
* docs: reorganize navigation and clean up content

- Remove 'Misc' group with misplaced blog posts
- Remove 'Libraries' redirect group from Home nav
- Simplify 'Dev Tools' group (flatten Inspector, CLI, Tunneling)
- Remove individual changelog versions from Python nav (keep summary)
- Remove changelog from TypeScript 'Get Started' group
- Remove tunneling duplicate from Python Development group
- Rewrite mcp101 as clean MCP concepts page (was pitch deck)
- Delete typescript/blog posts (not technical docs)
- Add redirects for deleted blog post URLs

* docs: fix content accuracy and remove sloppy language

- Fix broken python/server/mcp-apps link in home page
- Remove informal pitch-speak from python/server/index.mdx
- Fix grammar error in typescript/server/index.mdx
- Update typescript/client/logging.mdx: remove fake 'coming soon' API code
- Fix non-existent model name gpt-5.1 in typescript quickstart
- Fix mcp_use naming in development contributing guide

* docs: fix incorrect TypeScript server API calls in inspector docs

- Replace server.addTool() with server.tool() (correct mcp-use API)
- Add missing zod import to debugging-chatgpt-apps example

* docs: fix fake model names (gpt-5.1 → gpt-4o) in agent docs

* docs: update model names, fix APIs, and add agent visibility hints

- Replace all deprecated model names with latest: gpt-4.1, gpt-4.1-mini,
  claude-sonnet-4-6, claude-opus-4-7, gemini-2.5-flash across all docs
- Fix TypeScript server.tool() API in installation.mdx (old positional string form)
- Fix TypeScript agent.run() in quickstart.mdx (deprecated string form → object)
- Remove broken manufact.com/docs/llms.txt hidden hints from 5 pages
- Add <Visibility for="agents"> block to mcp101.mdx with install commands,
  key classes, and API signatures for agent-oriented navigation
- Add LangChain provider install note to Python quickstart (mcp-use agent
  requires a separate langchain-* provider package)
- Update model name cards in Python llm-integration.mdx

* docs: clean up remaining stale model names and improve accuracy

- Update supported model lists in Python and TypeScript llm-integration pages
- Fix cost optimization table to use current model IDs
- Update TypeScript agent overview supported providers list

* docs: add LangChain provider install to TypeScript quickstart agent section

The MCPAgent requires a separate @langchain/* provider package; this was
not mentioned before the code example that imports from @langchain/openai.

* docs: update to latest flagship model IDs (May 2026)

- OpenAI: gpt-4.1 → gpt-5.5, gpt-4.1-mini → gpt-5.5-mini
- Google: gemini-2.5-flash → gemini-3.1-flash, gemini-2.5-pro → gemini-3.1-pro
- Groq: llama-3.1-* → llama-4-scout-17b-16e-instruct
- Anthropic (claude-opus-4-7, claude-sonnet-4-6) already current, no change

* docs: replace all em dashes with hyphens

* docs: restore llms.txt hints using Visibility component

* docs: simplify TypeScript logging page to unsupported notice only

* docs: rewrite mcp101 to explain MCP protocol with mcp-use examples and doc links

* docs: remove goal.md

* docs: revert nav changes, keep only Misc group removal and blog redirects

* docs: reorder mcp101 to Server/App -> Client/Inspector -> Agent, restore title

* docs: add code examples for Resources and Prompts in mcp101

* docs: remove em dashes from mcp101

* docs: add MCPClient code examples to mcp101

* docs: add React client example to mcp101

* docs: add agent code examples to mcp101

* docs: expand MCP Apps section in mcp101 with example and links

* docs: restore Contacts, Socials, and Founders sections to mcp101

* docs: add context-setting intro paragraph to mcp101 for new readers

* docs: add MCP stores section to mcp101 intro with Claude, ChatGPT, Cursor

* docs: fix Claude store link

* docs: fix ChatGPT store link

* docs: fix Cursor store link

* docs: replace store Cards with linked image grid

* docs: add captions to store images

* docs: add Notifications to client primitives table in mcp101

* docs: add lead-in paragraph before resource cards at bottom of mcp101

* docs: move resource cards to end of page after Contacts/Socials/Founders

* docs: demote Contacts/Socials/Founders to bold text to remove from TOC

* docs: move Contacts/Socials/Founders to very end of mcp101

* docs: add Resources and Contacts section headers, link official MCP docs

* chore(docs): update site metadata, footer links, and rename mcp_use to mcp-use

* update docs metadata + images

* docs: enhance MCP section by highlighting the reach of MCP stores with 1 billion weekly active users

* api ref
2026-05-14 18:49:06 +02:00
Enrico Toniato 6d7c4df9ef Canary (#1290)
* fix(inspector): sync URL tab param on tab change to preserve state on refresh

When switching tabs via header clicks, keyboard shortcuts, or command palette,
only React state was updated but the URL was not. This meant refreshing the
page would lose the active tab. Now all tab changes also update the ?tab=
query parameter using navigate() with replace:true.

Closes #1157

* feat(inspector): add editable MCP server aliases in connection settings

* fix(inspector): avoid reconnecting on alias-only edits

* chore: add changeset for server alias and updateServerMetadata

* docs: document updateServerMetadata in useMcpClient API reference

* fix: update import paths for Windows compatibility and modify postins… (#1255)

* fix: update import paths for Windows compatibility and modify postinstall script in package.json templates

- Changed import statements in `index.ts` and `mount-widgets-dev.ts` to use `pathToFileURL` for better compatibility across platforms.
- Updated `postinstall` script in `package.json` files of `blank`, `mcp-apps`, and `starter` templates to use `exit 0` instead of `true` for improved error handling during type generation.

* fix: normalize import paths in mount-widgets-dev.ts for cross-platform compatibility

- Updated import statements in `mount-widgets-dev.ts` to replace backslashes with forward slashes, ensuring consistent path handling across different operating systems.

* changeset

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* chore: add changeset

* chore(typescript): version packages (canary)

* chore(deps): bump hono from 4.12.8 to 4.12.12 in /libraries/typescript (#1284)

* docs(readme): update MCP Apps showcase table to include repository links

* fix(architecture): update server routing and middleware usage in architecture documentation

- Changed references from `server.app` to `server` for HTTP route and middleware definitions to align with the latest API.
- Removed outdated link to middleware documentation in the resources section.

* chore(deps): bump hono from 4.12.8 to 4.12.12 in /libraries/typescript

Bumps [hono](https://github.com/honojs/hono) from 4.12.8 to 4.12.12.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.8...v4.12.12)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.12
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add changeset for dependabot updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-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)

* chore(deps): bump vite from 8.0.0 to 8.0.5 in /libraries/typescript (#1280)

* docs(readme): update MCP Apps showcase table to include repository links

* fix(architecture): update server routing and middleware usage in architecture documentation

- Changed references from `server.app` to `server` for HTTP route and middleware definitions to align with the latest API.
- Removed outdated link to middleware documentation in the resources section.

* chore(deps): bump vite from 8.0.0 to 8.0.5 in /libraries/typescript

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 8.0.0 to 8.0.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.0.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 8.0.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add changeset for dependabot updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-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)

* Update architecture.md

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* Update server routing and middleware references

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* feat(chat): add disabledTools prop to ChatTab and useChatMessages for enhanced tool management (#1291)

* docs(readme): update MCP Apps showcase table to include repository links

* fix(architecture): update server routing and middleware usage in architecture documentation

- Changed references from `server.app` to `server` for HTTP route and middleware definitions to align with the latest API.
- Removed outdated link to middleware documentation in the resources section.

* feat(chat): add disabledTools prop to ChatTab and useChatMessages for enhanced tool management

- Introduced a new `disabledTools` prop in both `ChatTab` and `useChatMessages` to allow users to specify tools that should be excluded from the chat session.
- Updated the handling of chat messages to accommodate the new `disabledTools` feature, ensuring proper communication with the server.

* chore(typescript): version packages (canary)

* feat(auth): enhance login command with API key option and implement device code flow (#1292)

* feat(auth): enhance login command with API key option and implement device code flow

- Updated the login command to allow non-interactive login using an API key.
- Introduced device code flow for authentication, including functions to request device codes and poll for access tokens.
- Refactored API key creation to use access tokens and updated related utility functions for better authentication handling.

* refactor(cli): improve code formatting and readability in authentication commands

- Reformatted code in `index.ts`, `auth.ts`, and `api.ts` for better readability by adjusting indentation and line breaks.
- Removed unused import in `auth.ts` to clean up the codebase.
- Enhanced error messages for clarity in authentication processes.

* Revert "feat(auth): enhance login command with API key option and implement d…" (#1293)

This reverts commit cac8e3bc2a.

* feat(inspector): add stream protocol support to ChatTab and useChatMessages (#1299)

- Introduced `streamProtocol` prop to `ChatTab` and `useChatMessages` for specifying the wire protocol used by the streaming endpoint.
- Added `credentials`, `extraHeaders`, and `body` props to enhance request customization.
- Defined `StreamProtocol` type in `chat/types.ts` to support "sse" and "data-stream" protocols.
- Updated relevant components to handle new props and ensure compatibility with streaming functionality.

* chore(typescript): version packages (canary)

* style: run prettier formatting to fix CI lint failures

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

* refactor(inspector): remove unused transportType/setTransportType props from ConnectionSettingsForm

These props were destructured with underscore prefixes but never used — transport is always hardcoded to "http" now.

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

* chore(typescript): version packages (canary)

* feat(server): add Better Auth OAuth provider (#1288)

* feat(server): add Better Auth OAuth provider

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

* feat(examples): add Better Auth OAuth provider example server

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

* refactor(server): rename baseURL to authURL in Better Auth OAuth provider

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

* docs(server): add Better Auth OAuth provider documentation

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

* docs(server): move database migration step after Better Auth setup

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

* chore: format

* chore: add changeset for better-auth oauth provider

* refactor(server): remove explicit stateless session config from better-auth example

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

* docs(skills): add trimmed Better Auth skill reference

Add concise Better Auth authentication skill reference focused on
what the agent needs (setup steps, common mistakes, config options)
without duplicating full code examples from the docs. Update overview
to include Better Auth in the provider table and links.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>

* chore(typescript): version packages (canary)

* feat(chat): enhance ChatTab and MessageList components to support tool invocation serialization and screenshot functionality (#1253)

- Added `messagesAreaRef` to `ChatTab` for targeting screenshot captures.
- Updated `getSerializedMessages` to include tool invocation details in serialized messages.
- Modified `MessageList` to wrap tool invocation results in a div with a unique `data-tool-call-id` for better identification.
- Implemented screenshot handling logic in `ChatTab` to capture and return images of tool invocation results, improving user experience in chat interactions.

* chore(deps): bump @hono/node-server from 1.19.11 to 1.19.13 in /libraries/typescript (#1283)

* docs(readme): update MCP Apps showcase table to include repository links

* fix(architecture): update server routing and middleware usage in architecture documentation

- Changed references from `server.app` to `server` for HTTP route and middleware definitions to align with the latest API.
- Removed outdated link to middleware documentation in the resources section.

* chore(deps): bump @hono/node-server in /libraries/typescript

Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.19.11 to 1.19.13.
- [Release notes](https://github.com/honojs/node-server/releases)
- [Commits](https://github.com/honojs/node-server/compare/v1.19.11...v1.19.13)

---
updated-dependencies:
- dependency-name: "@hono/node-server"
  dependency-version: 1.19.13
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add changeset for dependabot updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-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)

* chore(deps): update TypeScript dependencies and package overrides (#1303)

- Bumped various devDependencies including @changesets/cli, @types/node, @types/react, and eslint packages to their latest versions.
- Updated package overrides for lodash and added new overrides for pnpm in create-mcp-use-app template.
- Adjusted version constraints for dependencies in pnpm-lock.yaml to ensure compatibility.

* chore(typescript): version packages (canary)

* fix(oauth): Auth0 issuer trailing slash and missing scopes in PRM (#1300)

* docs(readme): update MCP Apps showcase table to include repository links

* fix(architecture): update server routing and middleware usage in architecture documentation

- Changed references from `server.app` to `server` for HTTP route and middleware definitions to align with the latest API.
- Removed outdated link to middleware documentation in the resources section.

* fix: update deprecated claude-3-5-sonnet-20241022 model to claude-sonnet-4-6 (#1266)

Model claude-3-5-sonnet-20241022 was retired on 2025-10-28 per Anthropic
deprecations page. Updated default model and documentation examples to use
claude-sonnet-4-6 as recommended replacement.

Fixes #1258

Co-authored-by: Flocky (GitHub Agent) <flocky@silhouette.ai>

* fix(oauth): correct Auth0 issuer trailing slash and endpoint URLs

Auth0 requires the issuer to include a trailing slash per its token
validation. Separate baseUrl (no slash) from issuer (with slash) to
avoid double-slash URLs in JWKS, auth, and token endpoints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(oauth): add direct mode and scopes_supported to protected resource metadata

Set Auth0 provider to direct mode so MCP clients communicate with Auth0
directly for OAuth flows. Add scopes_supported to the protected resource
metadata endpoints (RFC 9728) so MCP clients know what scopes to request
during authorization — without this field clients request no scopes and
Auth0 returns tokens missing openid/profile/email.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: format

---------

Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Alberto Farah Blair <alberto.farah.b@gmail.com>
Co-authored-by: Flocky (GitHub Agent) <flocky@silhouette.ai>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(inspector): remove duplicate onMcpAuthorization call causing auth code reuse (#1301)

* docs(readme): update MCP Apps showcase table to include repository links

* fix(architecture): update server routing and middleware usage in architecture documentation

- Changed references from `server.app` to `server` for HTTP route and middleware definitions to align with the latest API.
- Removed outdated link to middleware documentation in the resources section.

* fix: update deprecated claude-3-5-sonnet-20241022 model to claude-sonnet-4-6 (#1266)

Model claude-3-5-sonnet-20241022 was retired on 2025-10-28 per Anthropic
deprecations page. Updated default model and documentation examples to use
claude-sonnet-4-6 as recommended replacement.

Fixes #1258

Co-authored-by: Flocky (GitHub Agent) <flocky@silhouette.ai>

* fix(inspector): remove duplicate onMcpAuthorization call causing auth code reuse

The OAuth callback page called onMcpAuthorization() twice — once at
module level in main.tsx (fire-and-forget) and once in the OAuthCallback
React component. Both raced to exchange the same single-use authorization
code. On re-auth attempts, Auth0's session cookie made the redirect
near-instant, tightening the race so the second call reliably failed
with "Invalid authorization code".

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

---------

Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Alberto Farah Blair <alberto.farah.b@gmail.com>
Co-authored-by: Flocky (GitHub Agent) <flocky@silhouette.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat(docs): update authentication documentation and changelogs for Better Auth integration

- Added Better Auth as a new OAuth provider in the authentication overview and related documentation.
- Updated changelogs to reflect the addition of Better Auth and enhancements in the Inspector, including stream protocol support and editable server aliases.
- Enhanced connection settings documentation with details on server display names and tab persistence features.

* feat(inspector): update InspectorDashboard with mesh gradient background and animation controls (#1304)

- Integrated MeshGradient from @paper-design/shaders-react for enhanced visual effects in the InspectorDashboard.
- Added functionality to toggle mesh animation and manage its state using local storage.
- Removed deprecated dependencies and updated package.json to reflect new dependencies and scripts.
- Refactored random-gradient-background component to support different noise textures for improved visual fidelity.

* 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: gabrielekarra <gabrielekarra@hotmail.it>
Co-authored-by: 奥尘 <aiello.cxl@alibaba-inc.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Alberto Farah Blair <alberto.farah.b@gmail.com>
Co-authored-by: Flocky (GitHub Agent) <flocky@silhouette.ai>
2026-04-10 12:30:29 +02:00
Enrico Toniato 32b19dc51b Canary (#996)
* feat(inspector): enhance client package with new components and configuration options (#973)

* feat(inspector): enhance client package with new components and configuration options

- Added a new test_app configuration in pnpm-lock.yaml with updated dependencies for improved development.
- Refactored build scripts in package.json to streamline client exports and ensure compatibility.
- Introduced tsup.client.ts for better bundling configuration of client components.
- Expanded the index.ts file to include new chat components and utility functions, enhancing the inspector's functionality.
- Updated ChatTab and related components to support new props for better customization and control.
- Added serverBaseUrl prop to various components to facilitate external API calls without relying on context.
- Implemented new hooks and types for improved chat message handling and configuration management.
- Introduced stubs for Node.js modules to ensure compatibility in browser environments.
- Added rpc-log-bus for logging RPC events, enhancing debugging capabilities in server interactions.

* feat(inspector): add new props for ChatTab, ChatHeader, and ChatLandingForm components

- Introduced `clearButtonLabel`, `hideTitle`, and `hideModelBadge` props to enhance customization options for the ChatTab and ChatHeader components.
- Updated the ChatLandingForm to conditionally render the model badge based on the new `hideModelBadge` prop.
- Improved the display logic for the clear/new-chat button to utilize the `clearButtonLabel` prop, allowing for dynamic labeling.

* feat(inspector): add hideServerUrl prop to ChatTab and ChatLandingForm components

- Introduced `hideServerUrl` prop to both ChatTab and ChatLandingForm components, allowing for conditional rendering of the MCP server URL.
- Updated documentation comments to reflect the new prop's functionality, enhancing customization options for users.

* feat(hmr): enhance TypeScript support and registration synchronization

- Updated the `tsImport` function to accept additional options for improved TypeScript handling, including cache busting and import callbacks.
- Enhanced the `importServerModule` function to provide better warnings for module re-imports and instance management.
- Refined the `syncRegistrationsFrom` method in `MCPServerClass` to return detailed change statistics for tools, prompts, and resources, improving change detection and logging.
- Added debug logging for unchanged registrations to aid in troubleshooting during hot module reloading (HMR).
- Wrapped handler functions with session context to maintain access to context features after HMR updates, ensuring consistent behavior.

* feat(inspector): enhance tool change detection and metadata handling

- Updated the `ToolsTab` component to include additional checks for changes in tool metadata, ensuring more accurate detection of updates.
- Refined the handling of tool metadata during hot module reloading (HMR) to fully replace existing metadata instead of merging, improving consistency.
- Added comprehensive E2E tests to validate tool handler logic changes after HMR, ensuring expected behavior for both text and widget outputs.
- Adjusted the `McpClientProvider` to correctly pass metadata to tools, enhancing the overall functionality and user experience.

* feat(inspector): enhance ChatTab and Layout components with new props and visibility controls

- Added new props to `ChatTab` and `ChatHeader` for customizing the clear/new-chat button, including `clearButtonHideIcon`, `clearButtonHideShortcut`, and `clearButtonVariant`.
- Updated `Layout` and `LayoutHeader` components to support single-tab mode and visibility of tabs based on the `embeddedConfig`, improving user experience in embedded scenarios.
- Refactored tab rendering logic in `LayoutContent` to conditionally display tabs based on the `visibleTabs` configuration, enhancing flexibility for users.

* feat(mcp): propagate widget resources to existing sessions

- Added `propagateWidgetResourcesToSessions` method to `MCPServerClass` to ensure newly registered widget resources are available to existing sessions without requiring a reconnect.
- Updated `uiResourceRegistration` to call the new method, allowing resource propagation regardless of tool registration status.
- Enhanced logging for resource propagation to improve visibility during session updates.

* fix(cli): increase chunk size warning limit for bundles

* feat(inspector): add HMR regression test for widget resource propagation

- Implemented a new E2E test to verify that dynamically added widget resources are correctly registered and propagated to existing sessions during hot module reloading (HMR).
- Enhanced file utility functions to support writing and removing widget resource files, ensuring proper cleanup after tests.
- Updated the MCPServerClass to track session references for resources, improving synchronization during HMR updates.

* feat(logging): add conditional debug logging for widget operations

- Introduced a `debugWidget` flag to control logging for widget-related operations in `shared-routes.ts`, `shared-utils.ts`, and `mount-mcp.ts`.
- Enhanced logging statements to only execute when the `DEBUG` environment variable is set, improving performance and reducing noise in production logs.
- Updated the `requestLogger` to skip logging for noisy GET requests, further optimizing log management.

* chore(pnpm): remove test_app configuration and its dependencies from pnpm-lock.yaml

* fix(inspector): update build configurations and improve type handling

- Modified `package.json` to ensure proper declaration file generation during client exports.
- Adjusted `tsconfig.client.json` to change the root directory and output directory for better organization.
- Enhanced type handling in `McpUIRenderer.tsx` by using a more specific type for resource properties.
- Updated `WidgetDebugContext.tsx` to define a `DeviceType` type for improved type safety.
- Removed unused `rpc-log-bus` definitions to clean up the codebase.

* feat(mcp): improve resource registration logic in MCPServerClass

- Enhanced the resource registration process to skip adding resources that are already propagated to sessions, preventing duplicate registrations.
- Updated logging to provide clearer feedback on resource addition and registration failures.
- Refactored the handling of widget resource templates to ensure they are only registered if not already present in the session, improving efficiency and reducing potential errors.

* feat(mcp): implement dynamic HMR port allocation for development servers

- Added a function to find an available port for Hot Module Replacement (HMR), allowing multiple development servers to run concurrently without port conflicts.
- Updated the Vite server configuration to use the dynamically allocated HMR port instead of a hardcoded value, enhancing flexibility in development environments.
- Improved logging to reflect the dynamically chosen HMR port, ensuring better visibility during server setup.

* fix(inspector): improve same-origin detection for widget iframes

- Updated the logic for determining if the widget iframe is same-origin with the inspector page, enhancing console interception and debug controls.
- Refactored the setting of `isSameOrigin` to use the new computed value, ensuring accurate cross-origin handling for both development and production environments.

* fix(inspector): correct inspector API base URL handling

- Updated the logic for determining the inspector API base URL to use relative URLs, ensuring that API calls target the correct origin of the inspector UI instead of the MCP server.
- Removed the previous logic that derived the base from the MCP server URL, which caused issues when the server ran on a different port, improving cross-origin handling.

* refactor(mcp-server): update syncRegistrationsFrom method to return detailed change summary

- Modified the syncRegistrationsFrom method to return an object containing total changes and detailed counts for added, removed, and updated tools, prompts, and resources.
- This enhancement improves the method's utility by providing comprehensive feedback on registration changes during synchronization.

* fix(tests): enhance waitForHMR function to support no-change scenarios

- Updated the waitForHMR function to accept an options parameter, allowing it to handle cases where no changes are detected during Hot Module Replacement (HMR).
- Modified the integration test to utilize the new functionality, ensuring it can correctly resolve when no changes occur, improving test reliability.

* feat(hmr-sync): add debug logging for HMR changes and improve resource key handling

- Introduced a new function to check if debug logging is enabled, enhancing the visibility of changes during Hot Module Replacement (HMR).
- Updated debug logging to conditionally display changes in configuration and handler, including previews of old and new handlers.
- Refactored resource key handling in MCPServerClass to improve clarity and maintainability.

* feat(hmr): implement widget re-addition test and enhance resource cleanup

- Added a new test to verify that deleting and re-adding a widget resource correctly re-registers it for the same session during Hot Module Replacement (HMR).
- Enhanced the MCPServerClass to ensure proper cleanup of resources from both session and root native server states, preventing registration conflicts when re-adding widgets.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* chore(inspector): update changelog for v0.18.9 and v1.17.4

- Added details for v0.18.9 focusing on log noise reduction and dependency alignment.
- Included v1.17.4 updates addressing widget resource propagation and further log noise reduction.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-14 17:29:21 -08:00
Enrico Toniato 3d787bab34 Canary (#970)
* feat(inspector): add environment variable for iframe embedding configuration (#965)

* feat(inspector): add environment variable for iframe embedding configuration

- Introduced `MCP_INSPECTOR_FRAME_ANCESTORS` environment variable to control which origins can embed the inspector widget in iframes, enhancing security and flexibility for both development and production environments.
- Updated documentation to include usage examples and best practices for setting the variable, ensuring clarity for users embedding the inspector in their applications.
- Refactored server routes and utilities to utilize the new environment variable for setting Content Security Policy (CSP) headers, improving security measures against unauthorized embedding.

* feat(server): enhance tool and resource change handling

- Added logic to ensure tool request handlers are registered on the SDK server, improving initialization for sessions with no tools.
- Updated change detection for tools, prompts, resources, and templates to include removal events, ensuring accurate notifications for list changes.
- Enhanced session server communication by sending updates when tools, prompts, resources, or templates are added or removed, improving responsiveness and user experience.

* feat(server): pre-initialize request handlers for improved error handling

- Added pre-initialization logic for tool, prompt, and resource request handlers on the SDK server to ensure they are available even when starting with zero registrations.
- This change prevents -32601 "Method not found" errors on clients by ensuring that necessary handlers are set up during server initialization.

* feat(inspector): implement localhost URL conversion for server-side fetches

- Added a new utility function `toLocalhostUrl` to convert external proxy URLs to localhost for server-side fetches, ensuring correct content retrieval when running behind reverse proxies.
- Updated the inspector's route handling to utilize the new function, improving reliability of widget content fetching.
- Enhanced handling of asset URLs to ensure they are correctly rewritten for both external and localhost scenarios, addressing potential issues with proxy catch-all routes.
- Configured Vite middleware to allow all hosts, facilitating smoother operation behind various reverse proxies.

* feat(inspector): enhance widget URL handling and logging

- Improved URL rewriting logic for widget assets to ensure correct resolution both locally and behind reverse proxies.
- Added debug logging for fetching and processing widget HTML, aiding in troubleshooting and development.
- Introduced a new global variable `__mcpServerUrl` for widgets to dynamically reference the server origin in API calls, enhancing flexibility.
- Updated handling of asset paths to preserve query parameters, ensuring accurate resource fetching from the development server.

* feat(server): enhance Vite HMR WebSocket support and MCP_URL handling

- Updated MCP_URL assignment to only set if not provided by the user, allowing for external proxy configurations.
- Implemented WebSocket proxy setup for Vite HMR, enabling hot module reloading through reverse proxies.
- Added optional httpServer parameter in ServerConfig for Vite HMR WebSocket support.
- Improved WebSocket upgrade request handling to ensure compatibility with various deployment scenarios.

* feat(server): enhance HMR support for custom routes and widget management

- Introduced a new `shouldRemove` predicate in the sync options to prevent the removal of specific items during HMR, protecting widget-registered tools.
- Added a mutable `_customRoutes` registry in the MCP server to manage custom HTTP route handlers, enabling HMR for routes without re-registering.
- Implemented a middleware to dispatch custom route handlers from the mutable map, ensuring compatibility with Hono's routing system.
- Updated widget tool management to return a boolean indicating existence, allowing for fallback registration if tools are removed during HMR sync.
- Enhanced resource directory handling in the widget mounting process to ensure directories are created dynamically for Vite file watching.

* feat(inspector): enhance runtime configuration for inspector middleware

- Added new configuration options to `mountInspector` for `devMode` and `sandboxOrigin`, allowing for improved handling of development environments and reverse proxy setups.
- Updated `registerStaticRoutes` to inject runtime configuration into the HTML, enabling client-side components to access these settings.
- Modified the inspector UI mounting process to utilize the new configuration options, enhancing flexibility and usability in various deployment scenarios.

* fix(widget-handling): refine widget type determination logic

- Updated widget type assignment to prioritize `appsSdk` when only `appsSdkMetadata` is present, ensuring accurate widget classification.
- Enhanced metadata handling in widget registration to default to an empty object for `ui` when no metadata is available, improving robustness in widget rendering.

* Enhance reverse proxy support and widget handling in inspector

- Introduced `MCP_URL` environment variable to allow users to set an external proxy URL, ensuring correct widget asset URLs and HMR WebSocket connections.
- Updated `mountInspector` configuration options to include `devMode` and `sandboxOrigin`, improving flexibility for development environments.
- Added support for dynamic widget creation and improved HMR reliability, allowing for seamless integration behind reverse proxies.
- Documented best practices for using `MCP_URL` and reverse proxy setups, ensuring clarity for users.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat(typescript): add completion support to resource templates and publish completion capabilities (#966)

* add util for normalizing list callback completions for resource templates

* add resource template completion and publish completion capabilites

* add tests for toResourceTemplateCompleteCallbacks

* add docs for resource templates completion

* add changeset

* update typescript conformance test server to include prompts and resource templates completion examples

* revert default values for arg1 and arg2 and z.string().optional(), change to callback fn

* run lint

* chore(typescript): version packages (canary)

* refactor(tests): remove serial mode configuration from E2E tests for UI widgets, chat, command palette, and setup

* fix(inspector): update sandbox permissions for McpUIRenderer and MCPUIResource components (#974)

- Removed 'allow-same-origin' and 'allow-popups-to-escape-sandbox' from sandbox permissions to enhance security and simplify iframe configurations.

* chore(typescript): version packages (canary)

* feat(inspector, typescript): release v0.18.5 and v1.17.0 with iframe embedding, reverse proxy support, and resource template completion

- Introduced `MCP_INSPECTOR_FRAME_ANCESTORS` for iframe embedding control.
- Enhanced `mountInspector` with `devMode` and `sandboxOrigin` options.
- Added runtime config injection for improved deployment flexibility.
- Improved server-side widget fetches and asset URL handling for reverse proxies.
- Released v1.17.0 with resource template variable completion and custom route HMR support.
- Updated dependencies to ensure compatibility with new features.

* fix(tests): update hmr test prompts to use completable for default values

---------

Co-authored-by: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com>
2026-02-09 17:08:47 -08:00
Enrico Toniato 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 (&#8209;) 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>
2025-12-08 19:35:44 +01:00
Enrico Toniato a145cc7884 Docs/inspector (#492)
* refactor: reorganize documentation structure for Inspector and Dev Tools

- Updated the docs.json file to consolidate Inspector and Tunneling pages under a new "Dev Tools" group.
- Removed redundant entries for Inspector and Tunneling from the documentation structure.
- Added a sidebar title for the Inspector page to enhance navigation.

* docs: enhance Inspector documentation and add new CLI usage guides

- Updated `docs.json` to include new pages for CLI usage, connection settings, keyboard shortcuts, command palette, integration, debugging ChatGPT apps, and development under the Inspector section.
- Expanded the Inspector documentation to cover new features, including CLI usage and detailed guides for keyboard shortcuts and integration.
- Improved the `self-hosting` documentation to reference the new CLI usage guide.
- Enhanced the `apps-sdk-resources` documentation with additional details on widget state and testing procedures using the Inspector.

* fix broken links
2025-11-19 19:22:35 +01:00