├── .eslintignore ├── .eslintrc.json ├── .github ├── CONTRIBUTING.md └── workflows │ ├── ci.yml │ └── deploy-docs.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .prettierrc.json ├── .releaserc.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── docs ├── .vitepress │ └── cache │ │ └── deps │ │ ├── @theme_index.js │ │ ├── @theme_index.js.map │ │ ├── _metadata.json │ │ ├── chunk-5SIPG2HA.js │ │ ├── chunk-5SIPG2HA.js.map │ │ ├── chunk-O3I43HSE.js │ │ ├── chunk-O3I43HSE.js.map │ │ ├── package.json │ │ ├── vitepress___@vue_devtools-api.js │ │ ├── vitepress___@vue_devtools-api.js.map │ │ ├── vitepress___@vueuse_core.js │ │ ├── vitepress___@vueuse_core.js.map │ │ ├── vue.js │ │ └── vue.js.map ├── package.json └── src │ ├── .vitepress │ ├── cache │ │ └── deps │ │ │ ├── @theme_index.js │ │ │ ├── @theme_index.js.map │ │ │ └── _metadata.json │ └── config.ts │ ├── guide │ ├── client │ │ ├── html-resource.md │ │ ├── overview.md │ │ └── usage-examples.md │ ├── getting-started.md │ ├── introduction.md │ ├── protocol-details.md │ ├── server │ │ ├── overview.md │ │ └── usage-examples.md │ └── shared │ │ └── overview.md │ └── index.md ├── examples └── server │ ├── .react-router │ └── types │ │ ├── +register.ts │ │ ├── +virtual.d.ts │ │ └── app │ │ ├── +types │ │ └── root.ts │ │ └── routes │ │ └── +types │ │ ├── home.ts │ │ ├── task.ts │ │ └── user.ts │ ├── README.md │ ├── app │ ├── app.css │ ├── entry.server.tsx │ ├── graph │ │ ├── avatar1.png │ │ ├── avatar2.png │ │ ├── avatar3.png │ │ └── graph.tsx │ ├── images.d.ts │ ├── root.tsx │ ├── routes.ts │ ├── routes │ │ ├── home.tsx │ │ ├── task.tsx │ │ └── user.tsx │ ├── user │ │ └── user.tsx │ └── utils │ │ └── messageUtils.ts │ ├── biome.json │ ├── package-lock.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── pnpm-workspace.yaml │ ├── public │ ├── avatar1.png │ ├── avatar2.png │ └── avatar3.png │ ├── react-router.config.ts │ ├── src │ └── index.ts │ ├── tsconfig.cloudflare.json │ ├── tsconfig.json │ ├── tsconfig.node.json │ ├── vite.config.ts │ ├── worker-configuration.d.ts │ └── wrangler.jsonc ├── package-lock.json ├── package.json ├── packages ├── client │ ├── README.md │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── HtmlResource.tsx │ │ │ └── __tests__ │ │ │ │ └── HtmlResource.test.tsx │ │ ├── index.ts │ │ ├── test-setup.ts │ │ └── types.ts │ ├── tsconfig.json │ ├── vite.config.ts │ └── vitest.config.ts ├── server │ ├── README.md │ ├── package.json │ ├── src │ │ ├── __tests__ │ │ │ └── index.test.ts │ │ ├── index.ts │ │ └── types.ts │ ├── tsconfig.json │ ├── vite.config.ts │ └── vitest.config.ts └── shared │ ├── package.json │ ├── src │ └── index.ts │ ├── tsconfig.json │ └── vite.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── release.config.js ├── tsconfig.base.json ├── vitest.config.ts ├── vitest.setup.ts └── workflows └── ci.yml /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | coverage 4 | *.log 5 | **/*.js 6 | 7 | examples -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "plugins": ["@typescript-eslint", "react"], 5 | "extends": [ 6 | "eslint:recommended", 7 | "plugin:@typescript-eslint/recommended", 8 | "plugin:react/recommended", 9 | "plugin:react/jsx-runtime", 10 | "prettier" 11 | ], 12 | "settings": { 13 | "react": { 14 | "version": "detect" 15 | } 16 | }, 17 | "env": { 18 | "node": true, 19 | "browser": true, 20 | "es2021": true, 21 | "jest": true 22 | }, 23 | "parserOptions": { 24 | "ecmaVersion": "latest", 25 | "sourceType": "module", 26 | "ecmaFeatures": { 27 | "jsx": true 28 | } 29 | }, 30 | "rules": { 31 | "react/prop-types": "off" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to MCP UI 2 | 3 | First of all, thank you for your interest in contributing to MCP UI! We appreciate the time and effort you're willing to invest in improving the project. This document provides guidelines and information to make the contribution process as smooth as possible. 4 | 5 | ## Table of Contents 6 | 7 | - [Getting Started](#getting-started) 8 | - [Local Development](#local-development) 9 | - [Prerequisites](#prerequisites) 10 | - [Setting Up Your Development Environment](#setting-up-your-development-environment) 11 | - [Running the Project Locally](#running-the-project-locally) 12 | - [Testing](#testing) 13 | - [Code Formatting](#code-formatting) 14 | - [Development Workflow](#development-workflow) 15 | - [Project Structure](#project-structure) 16 | - [How to Contribute](#how-to-contribute) 17 | - [Reporting Bugs](#reporting-bugs) 18 | - [Suggesting Enhancements](#suggesting-enhancements) 19 | - [Submitting Pull Requests](#submitting-pull-requests) 20 | - [Style Guidelines](#style-guidelines) 21 | - [Code Style](#code-style) 22 | - [Commit Messages](#commit-messages) 23 | - [Additional Resources](#additional-resources) 24 | 25 | ## Getting Started 26 | 27 | 1. Fork the repository and clone it to your local machine. 28 | 2. Set up the development environment. 29 | 3. Explore the codebase, run tests, and verify that everything works as expected. 30 | 31 | ## Local Development 32 | 33 | ### Prerequisites 34 | 35 | Before you start working on MCP UI, make sure you have the following installed: 36 | 37 | - [Node.js](https://nodejs.org/) (version 18 or higher recommended) 38 | - [pnpm](https://pnpm.io/) (version 8.15.7 or higher) 39 | - Git 40 | 41 | ### Setting Up Your Development Environment 42 | 43 | 1. Clone your forked repository: 44 | 45 | ```bash 46 | git clone https://github.com/your-username/git-mcp.git 47 | cd git-mcp 48 | ``` 49 | 50 | 2. Install dependencies: 51 | 52 | ```bash 53 | pnpm install 54 | ``` 55 | 56 | 3. Set up environment variables: 57 | - Create a `.env.local` file in the root directory 58 | - Add any necessary environment variables (ask project maintainers if you need access to specific API keys) 59 | 60 | ### Running the Project Locally 61 | 62 | To start the development server: 63 | 64 | ```bash 65 | pnpm vercel dev 66 | ``` 67 | 68 | This will start the Next.js development server, typically at http://localhost:3000. 69 | 70 | For running with the MCP Inspector (useful for debugging MCP endpoints): 71 | 72 | ```bash 73 | pnpm run inspector 74 | ``` 75 | 76 | ### Testing 77 | 78 | To run tests: 79 | 80 | ```bash 81 | pnpm test 82 | ``` 83 | 84 | MCP UI uses Vitest as the testing framework. When adding new features, please include appropriate tests. 85 | 86 | ### Code Formatting 87 | 88 | MCP UI uses Prettier for code formatting and lint-staged to ensure code is properly formatted before committing. Pre-commit hooks are set up with Husky to run these checks automatically. 89 | 90 | To manually format your code: 91 | 92 | ```bash 93 | pnpm prettier --write . 94 | ``` 95 | 96 | ### Development Workflow 97 | 98 | 1. Create a new branch for your feature/bugfix 99 | 2. Make your changes 100 | 3. Add tests for your changes when applicable 101 | 4. Run the tests to ensure they pass 102 | 5. Commit your changes following the commit message guidelines 103 | 6. Push your branch and open a pull request 104 | 105 | ### Project Structure 106 | 107 | - `api/`: Contains the server-side code and MCP implementation 108 | - `tools/`: MCP tools implementation 109 | - `utils/`: Utility functions for the API 110 | - `app/`: Next.js app directory with React components 111 | - `pages/`: Additional Next.js pages 112 | - `public/`: Static assets 113 | - `shared/`: Shared utilities used across the codebase 114 | 115 | ## How to Contribute 116 | 117 | ### Reporting Bugs 118 | 119 | If you encounter a bug or issue while using MCP UI, please open a new issue on the [GitHub Issues](https://github.com/idosal/mcp-ui/issues) page. Provide a clear and concise description of the problem, steps to reproduce it, and any relevant error messages or logs. 120 | 121 | ### Suggesting Enhancements 122 | 123 | We welcome ideas for improvements and new features. To suggest an enhancement, open a new issue on the [GitHub Issues](https://github.com/idosal/mcp-ui/issues) page. Describe the enhancement in detail, explain the use case, and outline the benefits it would bring to the project. 124 | 125 | ### Submitting Pull Requests 126 | 127 | 1. Create a new branch for your feature or bugfix. Use a descriptive name like `feature/your-feature-name` or `fix/your-bugfix-name`. 128 | 2. Make your changes, following the [Style Guidelines](#style-guidelines) below. 129 | 3. Test your changes and ensure that they don't introduce new issues or break existing functionality. 130 | 4. Commit your changes, following the [commit message guidelines](#commit-messages). 131 | 5. Push your branch to your fork on GitHub. 132 | 6. Open a new pull request against the `main` branch of the Wolverine repository. Include a clear and concise description of your changes, referencing any related issues. 133 | 134 | ## Style Guidelines 135 | 136 | ### Code Style 137 | 138 | MCP UI uses [ESLint](https://eslint.org/) as its code style guide. Please ensure that your code follows these guidelines. 139 | 140 | ### Commit Messages 141 | 142 | Write clear and concise commit messages that briefly describe the changes made in each commit. Use the imperative mood and start with a capitalized verb, e.g., "Add new feature" or "Fix bug in function". 143 | 144 | ## Additional Resources 145 | 146 | - [GitHub Help](https://help.github.com/) 147 | - [GitHub Pull Request Documentation](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests) 148 | - [ESLint Style Guide](https://eslint.org/) 149 | 150 | Thank you once again for your interest in contributing to MCP UI. We look forward to collaborating with you and creating an even better project together! 151 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build_lint_test: 13 | runs-on: ubuntu-latest 14 | strategy: 15 | matrix: 16 | node-version: [22.x] 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@v4 20 | 21 | - name: Setup pnpm 22 | uses: pnpm/action-setup@v2 23 | with: 24 | version: 10 25 | 26 | - name: Setup Node.js ${{ matrix.node-version }} 27 | uses: actions/setup-node@v4 28 | with: 29 | node-version: ${{ matrix.node-version }} 30 | cache: 'pnpm' 31 | 32 | - name: Install dependencies 33 | run: pnpm install --frozen-lockfile 34 | 35 | - name: Lint 36 | run: pnpm lint 37 | 38 | - name: Test 39 | run: pnpm test 40 | 41 | - name: Build libraries (excluding docs) 42 | run: pnpm --filter=!@mcp-ui/docs build 43 | 44 | - name: Build docs 45 | if: matrix.node-version == '20.x' # Build docs only on one Node version to save time 46 | run: pnpm --filter=@mcp-ui/docs build 47 | 48 | publish: 49 | needs: build_lint_test 50 | runs-on: ubuntu-latest 51 | # Run on pushes to the main branch. semantic-release will determine if a release is needed. 52 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !startsWith(github.head_commit.message, 'chore(release):') && !(contains(join(github.event.commits.*.files_changed, ','), 'examples/') || contains(join(github.event.commits.*.files_changed, ','), 'docs/')) 53 | permissions: 54 | contents: write # Needed to push new version tags, commit changelog/package.json updates 55 | issues: write # Needed to create/comment on release-related issues (optional, but good practice) 56 | id-token: write # Required for publishing to NPM with OIDC 57 | steps: 58 | - name: Checkout repository 59 | uses: actions/checkout@v4 60 | with: 61 | # Fetch all history for all tags and branches so semantic-release can analyze commits 62 | fetch-depth: 0 63 | 64 | - name: Setup pnpm 65 | uses: pnpm/action-setup@v2 66 | with: 67 | version: 10 68 | 69 | - name: Setup Node.js 70 | uses: actions/setup-node@v4 71 | with: 72 | node-version: 22.x # Use a Node version compatible with semantic-release 73 | cache: 'pnpm' 74 | 75 | - name: Install dependencies 76 | run: pnpm install --frozen-lockfile 77 | 78 | - name: Build all packages 79 | run: pnpm --filter="./packages/*" build 80 | 81 | - name: List contents of client dist 82 | run: | 83 | echo "--- Listing packages/client/dist ---" 84 | ls -R packages/client/dist || echo "packages/client/dist not found or empty" 85 | echo "--- End of packages/client/dist ---" 86 | 87 | - name: List contents of server dist 88 | run: | 89 | echo "--- Listing packages/server/dist ---" 90 | ls -R packages/server/dist || echo "packages/server/dist not found or empty" 91 | echo "--- End of packages/server/dist ---" 92 | 93 | - name: Semantic Release 94 | env: 95 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by Actions, used by @semantic-release/github and @semantic-release/git 96 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Your NPM token, used by @semantic-release/npm 97 | run: npx semantic-release -------------------------------------------------------------------------------- /.github/workflows/deploy-docs.yml: -------------------------------------------------------------------------------- 1 | # 2 | name: Deploy VitePress site to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the `main` branch. Change this to `master` if you\'re 6 | # using the `master` branch as the default branch. 7 | push: 8 | branches: [main] 9 | 10 | # Allows you to run this workflow manually from the Actions tab 11 | workflow_dispatch: 12 | 13 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 14 | permissions: 15 | contents: read 16 | pages: write 17 | id-token: write 18 | 19 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 20 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 21 | concurrency: 22 | group: pages 23 | cancel-in-progress: false 24 | 25 | jobs: 26 | # Build job 27 | build: 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Checkout 31 | uses: actions/checkout@v4 32 | with: 33 | fetch-depth: 0 # Not needed if lastUpdated is not enabled 34 | - name: Use pnpm 35 | uses: pnpm/action-setup@v3 36 | with: 37 | version: 10 # Specify pnpm version from package.json 38 | - name: Setup Node 39 | uses: actions/setup-node@v4 40 | with: 41 | node-version: 20 42 | cache: 'pnpm' 43 | - name: Setup Pages 44 | uses: actions/configure-pages@v4 45 | - name: Install dependencies 46 | run: pnpm install 47 | - name: Build with VitePress 48 | run: pnpm docs:build # This script is \'vitepress build docs\' 49 | - name: Upload artifact 50 | uses: actions/upload-pages-artifact@v3 51 | with: 52 | # Path to the output directory of 'vitepress build docs/src' 53 | path: docs/src/.vitepress/dist 54 | 55 | # Deployment job 56 | deploy: 57 | environment: 58 | name: github-pages 59 | url: ${{ steps.deployment.outputs.page_url }} 60 | needs: build 61 | runs-on: ubuntu-latest 62 | name: Deploy 63 | steps: 64 | - name: Deploy to GitHub Pages 65 | id: deployment 66 | uses: actions/deploy-pages@v4 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | examples/server/build 20 | 21 | # Directory for instrumented libs generated by jscoverage/JSCover 22 | lib-cov 23 | 24 | # Coverage directory used by tools like istanbul 25 | coverage 26 | *.lcov 27 | 28 | # nyc test coverage 29 | .nyc_output 30 | 31 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 32 | .grunt 33 | 34 | # Bower dependency directory (https://bower.io/) 35 | bower_components 36 | 37 | # node-waf configuration 38 | .lock-wscript 39 | 40 | # Compiled binary addons (https://nodejs.org/api/addons.html) 41 | build/Release 42 | 43 | # Dependency directories 44 | node_modules/ 45 | jspm_packages/ 46 | 47 | # Snowpack dependency directory (https://snowpack.dev/) 48 | web_modules/ 49 | 50 | # PNPM 51 | .pnpm-store/ 52 | 53 | # TypeScript cache 54 | *.tsbuildinfo 55 | 56 | # Optional npm cache directory 57 | .npm 58 | 59 | # Optional eslint cache 60 | .eslintcache 61 | 62 | # Microbundle cache 63 | .rpt2_cache/ 64 | .rts2_cache_cjs/ 65 | .rts2_cache_es/ 66 | .rts2_cache_umd/ 67 | 68 | # Optional REPL history 69 | .node_repl_history 70 | 71 | # Output of 'npm pack' 72 | *.tgz 73 | 74 | # Yarn Integrity file 75 | .yarnclean 76 | 77 | # dotenv environment variables file 78 | .env 79 | .env.development.local 80 | .env.test.local 81 | .env.production.local 82 | .env.local 83 | 84 | # Serverless directories 85 | .serverless/ 86 | 87 | # FuseBox cache 88 | .fusebox/ 89 | 90 | # DynamoDB Local files 91 | DynamoDBLocal_lib/ 92 | 93 | # TernJS port file 94 | .tern-port 95 | 96 | # Stores VSCode versions used for testing VSCode extensions 97 | .vscode-test 98 | 99 | # yarn v2 100 | .yarn/cache 101 | .yarn/unplugged 102 | .yarn/build-state.yml 103 | .yarn/install-state.gz 104 | .pnp.* 105 | 106 | # Parcel cache files 107 | .cache 108 | .parcel-cache 109 | 110 | # Next.js build output 111 | .next 112 | out 113 | 114 | # Nuxt.js build output 115 | .nuxt 116 | 117 | # Svelte build output 118 | .svelte-kit 119 | 120 | # Docusaurus build output 121 | .docusaurus 122 | 123 | # Gatsby cache 124 | .cache/ 125 | 126 | 127 | # Vite build output 128 | dist 129 | 130 | # VitePress 131 | docs/src/.vitepress/dist 132 | docs/src/.vitepress/cache 133 | 134 | # Monorepo specific 135 | /packages/**/dist 136 | /packages/**/coverage 137 | /apps/**/dist 138 | /apps/**/coverage 139 | 140 | # OS generated files # 141 | ###################### 142 | .DS_Store 143 | .DS_Store? 144 | ._* 145 | .Spotlight-V100 146 | .Trashes 147 | ehthumbs.db 148 | Thumbs.db 149 | 150 | # IDEs and Editors # 151 | #################### 152 | 153 | # VSCode 154 | .vscode/* 155 | !.vscode/settings.json 156 | !.vscode/tasks.json 157 | !.vscode/launch.json 158 | !.vscode/extensions.json 159 | *.code-workspace 160 | 161 | # JetBrains 162 | .idea/ 163 | *.iws 164 | *.iml 165 | *.ipr 166 | 167 | # Sublime Text 168 | *.sublime-project 169 | *.sublime-workspace 170 | 171 | # Compilation artifacts 172 | ####################### 173 | *.o 174 | *.obj 175 | *.exe 176 | *.dll 177 | *.so 178 | *.dylib 179 | 180 | # C/C++ specific 181 | *.gch 182 | *.pch 183 | 184 | # Python specific 185 | __pycache__/ 186 | *.py[cod] 187 | *$py.class 188 | 189 | # Environment variables 190 | .env* 191 | !.env.example 192 | 193 | # Husky 194 | .husky/_/ 195 | .husky/.gitignore -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Ignore artifacts: 2 | node_modules 3 | dist 4 | build 5 | coverage 6 | 7 | # Ignore package manager files (if you commit them) 8 | package-lock.json 9 | yarn.lock 10 | pnpm-lock.yaml 11 | 12 | # Ignore specific configuration files if managed elsewhere or intentionally unformatted 13 | # .vscode/ 14 | # .idea/ 15 | 16 | # Ignore generated files 17 | *.generated.* 18 | 19 | *.log 20 | *.md -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "all", 4 | "singleQuote": true, 5 | "printWidth": 80, 6 | "tabWidth": 2, 7 | "endOfLine": "lf" 8 | } -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "all", 4 | "singleQuote": true, 5 | "printWidth": 100, 6 | "tabWidth": 2, 7 | "plugins": ["prettier-plugin-tailwindcss"] 8 | } 9 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "branches": ["main"], 3 | "plugins": [ 4 | "@semantic-release/commit-analyzer", 5 | "@semantic-release/release-notes-generator", 6 | "@semantic-release/changelog", 7 | [ 8 | "@semantic-release/npm", 9 | { 10 | "pkgRoot": "packages/client", 11 | "npmPublish": true 12 | } 13 | ], 14 | [ 15 | "@semantic-release/npm", 16 | { 17 | "pkgRoot": "packages/server", 18 | "npmPublish": true 19 | } 20 | ], 21 | [ 22 | "@semantic-release/npm", 23 | { 24 | "npmPublish": false 25 | } 26 | ], 27 | [ 28 | "@semantic-release/exec", 29 | { 30 | "prepareCmd": "pnpm install --lockfile-only --ignore-scripts" 31 | } 32 | ], 33 | [ 34 | "@semantic-release/git", 35 | { 36 | "assets": [ 37 | "CHANGELOG.md", 38 | "package.json", 39 | "packages/client/package.json", 40 | "packages/server/package.json", 41 | "pnpm-lock.yaml" 42 | ], 43 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 44 | } 45 | ], 46 | "@semantic-release/github" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # [2.2.0](https://github.com/idosal/mcp-ui/compare/v2.1.0...v2.2.0) (2025-06-03) 2 | 3 | 4 | ### Features 5 | 6 | * support ui action result types ([#6](https://github.com/idosal/mcp-ui/issues/6)) ([899d152](https://github.com/idosal/mcp-ui/commit/899d1527286a281a23fbb8f3a207d435dfc3fe96)) 7 | 8 | # [2.1.0](https://github.com/idosal/mcp-ui/compare/v2.0.0...v2.1.0) (2025-05-31) 9 | 10 | 11 | ### Features 12 | 13 | * consolidate ui:// and ui-app:// ([#8](https://github.com/idosal/mcp-ui/issues/8)) ([2e08035](https://github.com/idosal/mcp-ui/commit/2e08035676bb6a46ef3c94dba916bc895f1fa3cc)) 14 | 15 | # [2.0.0](https://github.com/idosal/mcp-ui/compare/v1.1.0...v2.0.0) (2025-05-23) 16 | 17 | 18 | ### Documentation 19 | 20 | * bump ([#4](https://github.com/idosal/mcp-ui/issues/4)) ([ad4d163](https://github.com/idosal/mcp-ui/commit/ad4d1632cc1f9c99072349a8f0cdaac343236132)) 21 | 22 | 23 | ### BREAKING CHANGES 24 | 25 | * (previous one didn't take due to semantic-release misalignment) 26 | 27 | # [1.1.0](https://github.com/idosal/mcp-ui/compare/v1.0.7...v1.1.0) (2025-05-16) 28 | 29 | 30 | ### Bug Fixes 31 | 32 | * update deps ([4091ef4](https://github.com/idosal/mcp-ui/commit/4091ef47da048fab3c4feb002f5287b2ff295744)) 33 | 34 | 35 | ### Features 36 | 37 | * change onGenericMcpAction to optional onUiAction ([1913b59](https://github.com/idosal/mcp-ui/commit/1913b5977c30811f9e67659949e2d961f2eda983)) 38 | 39 | ## [1.0.7](https://github.com/idosal/mcp-ui/compare/v1.0.6...v1.0.7) (2025-05-16) 40 | 41 | 42 | ### Bug Fixes 43 | 44 | * **client:** specify iframe ([fd0b70a](https://github.com/idosal/mcp-ui/commit/fd0b70a84948d3aa5d7a79269ff7c3bcd0946689)) 45 | 46 | ## [1.0.6](https://github.com/idosal/mcp-ui/compare/v1.0.5...v1.0.6) (2025-05-16) 47 | 48 | 49 | ### Bug Fixes 50 | 51 | * support react-router ([21ffb95](https://github.com/idosal/mcp-ui/commit/21ffb95fe6d77a348b95b38dbf3741ba6442894e)) 52 | 53 | ## [1.0.5](https://github.com/idosal/mcp-ui/compare/v1.0.4...v1.0.5) (2025-05-16) 54 | 55 | 56 | ### Bug Fixes 57 | 58 | * **client:** styling ([6ff9b68](https://github.com/idosal/mcp-ui/commit/6ff9b685fd1be770fd103943e45275e9ec86905c)) 59 | 60 | ## [1.0.4](https://github.com/idosal/mcp-ui/compare/v1.0.3...v1.0.4) (2025-05-16) 61 | 62 | 63 | ### Bug Fixes 64 | 65 | * packaging ([9e6babd](https://github.com/idosal/mcp-ui/commit/9e6babd3a587213452ea7aec4cc9ae3a50fa1965)) 66 | 67 | ## [1.0.3](https://github.com/idosal/mcp-ui/compare/v1.0.2...v1.0.3) (2025-05-16) 68 | 69 | 70 | ### Bug Fixes 71 | 72 | * exports ([3a93a16](https://github.com/idosal/mcp-ui/commit/3a93a16e1b7438ba7b2ef49ca854479f755abcc6)) 73 | 74 | ## [1.0.2](https://github.com/idosal/mcp-ui/compare/v1.0.1...v1.0.2) (2025-05-16) 75 | 76 | 77 | ### Bug Fixes 78 | 79 | * remove shared dependency ([e66e8f4](https://github.com/idosal/mcp-ui/commit/e66e8f49b1ba46090db6e4682060488566f4fe41)) 80 | 81 | ## [1.0.1](https://github.com/idosal/mcp-ui/compare/v1.0.0...v1.0.1) (2025-05-16) 82 | 83 | 84 | ### Bug Fixes 85 | 86 | * publish ([0943e7a](https://github.com/idosal/mcp-ui/commit/0943e7acaf17f32aae085c2313bfbec47bc59f1f)) 87 | 88 | # 1.0.0 (2025-05-16) 89 | 90 | 91 | ### Bug Fixes 92 | 93 | * dependencies ([887f61f](https://github.com/idosal/mcp-ui/commit/887f61f827b4585c17493d4fa2dfb251ea598587)) 94 | * lint ([4487820](https://github.com/idosal/mcp-ui/commit/44878203a71c3c9173d463b809be36769e996ba9)) 95 | * lint ([d0a91f9](https://github.com/idosal/mcp-ui/commit/d0a91f9a07ec0042690240c3d8d0bad620f8c765)) 96 | * package config ([8dc1e53](https://github.com/idosal/mcp-ui/commit/8dc1e5358c3c8e641206a5e6851427d360cc1955)) 97 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2025 Ido Salomon 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 📦 Model Context Protocol UI SDK 2 | 3 |

4 | Server Version 5 | Client Version 6 |

7 | 8 |

9 | What's mcp-ui? • 10 | Installation • 11 | Quickstart • 12 | Core Concepts • 13 | Examples • 14 | Roadmap • 15 | Contributing • 16 | License 17 |

18 | 19 | ---- 20 | 21 | **`mcp-ui`** brings interactive web components to the [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP). Deliver rich, dynamic UI resources directly from your MCP server to be rendered by the client. Take AI interaction to the next level! 22 | 23 | > *This project is an experimental playground for MCP UI ideas. Expect rapid iteration and community-driven enhancements!* 24 | 25 | 26 | 27 | ## 💡 What's `mcp-ui`? 28 | 29 | `mcp-ui` is a TypeScript SDK comprising two packages: 30 | 31 | * **`@mcp-ui/server`**: Utilities to generate `HtmlResourceBlock` objects on your MCP server. 32 | * **`@mcp-ui/client`**: UI components (e.g., ``) to render those blocks in the browser and handle their events. 33 | 34 | Together, they let you define reusable UI resource blocks on the server side, seamlessly display them in the client, and react to their actions in the MCP host environment. 35 | 36 | 37 | ## ✨ Core Concepts 38 | 39 | ### HtmlResource 40 | 41 | The primary payload exchanged between the server and the client: 42 | 43 | ```ts 44 | interface HtmlResourceBlock { 45 | type: 'resource'; 46 | resource: { 47 | uri: string; // ui://component/id" 48 | mimeType: 'text/html' | 'text/uri-list'; // text/html for HTML content, text/uri-list for URL content 49 | text?: string; // Inline HTML or external URL 50 | blob?: string; // Base64-encoded HTML or URL 51 | }; 52 | } 53 | ``` 54 | 55 | * **`uri`**: Unique identifier for caching and routing 56 | * `ui://…` — UI resources (rendering method determined by mimeType) 57 | * **`mimeType`**: `text/html` for HTML content (iframe srcDoc), `text/uri-list` for URL content (iframe src) 58 | * **MCP-UI requires a single URL**: While `text/uri-list` format supports multiple URLs, MCP-UI uses only the first valid URL and logs others 59 | * **`text` vs. `blob`**: Choose `text` for simple strings; use `blob` for larger or encoded content. 60 | 61 | It's rendered in the client with the `` React component. 62 | 63 | The HTML method is limited, and the external app method isn't secure enough for untrusted 3rd party sites. We need a better method. Some ideas we should explore: RSC, remotedom, etc. 64 | 65 | ### UI Action 66 | 67 | UI blocks must be able to interact with the agent. In `mcp-ui`, this is done by hooking into events sent from the UI block and reacting to them in the host. For example, an HTML may trigger a tool call when a button is clicked by sending an event which will be caught handled by the client. 68 | 69 | ## 🏗️ Installation 70 | 71 | ```bash 72 | # using npm 73 | npm install @mcp-ui/server @mcp-ui/client 74 | 75 | # or pnpm 76 | pnpm add @mcp-ui/server @mcp-ui/client 77 | 78 | # or yarn 79 | yarn add @mcp-ui/server @mcp-ui/client 80 | ``` 81 | 82 | ## 🎬 Quickstart 83 | 84 | 1. **Server-side**: Build your resource blocks 85 | 86 | ```ts 87 | import { createHtmlResource } from '@mcp-ui/server'; 88 | 89 | // Inline HTML 90 | const direct = createHtmlResource({ 91 | uri: 'ui://greeting/1', 92 | content: { type: 'rawHtml', htmlString: '

Hello, MCP UI!

' }, 93 | delivery: 'text', 94 | }); 95 | 96 | // External URL 97 | const external = createHtmlResource({ 98 | uri: 'ui://widget/session-42', 99 | content: { type: 'externalUrl', iframeUrl: 'https://example.com/widget' }, 100 | delivery: 'text', 101 | }); 102 | ``` 103 | 104 | 2. **Client-side**: Render in your MCP host 105 | 106 | ```tsx 107 | import React from 'react'; 108 | import { HtmlResource } from '@mcp-ui/client'; 109 | 110 | function App({ mcpResource }) { 111 | if ( 112 | mcpResource.type === 'resource' && 113 | mcpResource.resource.uri?.startsWith('ui://') 114 | ) { 115 | return ( 116 | { 119 | console.log('Action:', result); 120 | return { status: 'ok' }; 121 | }} 122 | /> 123 | ); 124 | } 125 | return

Unsupported resource

; 126 | } 127 | ``` 128 | 129 | 3. **Enjoy** interactive MCP UIs — no extra configuration required. 130 | 131 | ## 🌍 Examples 132 | 133 | **Client example** 134 | * [ui-inspector](https://github.com/idosal/ui-inspector) - inspect local `mcp-ui`-enabled servers. Check out the [hosted version](https://scira-mcp-chat-git-main-idosals-projects.vercel.app/)! 135 | * [MCP-UI Chat](https://github.com/idosal/scira-mcp-ui-chat) - interactive chat built with the `mcp-ui` client. 136 | 137 | **Server example** 138 | Try out the hosted app - 139 | * **HTTP Streaming**: `https://remote-mcp-server-authless.idosalomon.workers.dev/mcp` 140 | * **SSE**: `https://remote-mcp-server-authless.idosalomon.workers.dev/sse` 141 | 142 | The app is deployed from `examples/server`. 143 | 144 | Drop those URLs into any MCP-compatible host to see `mcp-ui` in action. 145 | 146 | 147 | ## 🛣️ Roadmap 148 | 149 | - [X] Add online playground 150 | - [ ] Support React Server Components 151 | - [ ] Support Remote-DOM 152 | - [ ] Support additional client-side libraries (e.g., Vue) 153 | - [ ] Expand UI Action API (beyond tool calls) 154 | - [ ] Do more with Resources and Sampling 155 | 156 | ## 🤝 Contributing 157 | 158 | Contributions, ideas, and bug reports are welcome! See the [contribution guidelines](https://github.com/idosal/mcp-ui/blob/main/.github/CONTRIBUTING.md) to get started. 159 | 160 | 161 | ## 📄 License 162 | 163 | Apache License 2.0 © [The MCP UI Authors](LICENSE) 164 | 165 | ## Disclaimer 166 | 167 | This project is provided "as is", without warranty of any kind. The `mcp-ui` authors and contributors shall not be held liable for any damages, losses, or issues arising from the use of this software. Use at your own risk. 168 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "ea534343", 3 | "configHash": "bcb9b8b0", 4 | "lockfileHash": "de901af9", 5 | "browserHash": "6269a7f8", 6 | "optimized": { 7 | "vue": { 8 | "src": "../../../../node_modules/.pnpm/vue@3.5.14_typescript@5.8.3/node_modules/vue/dist/vue.runtime.esm-bundler.js", 9 | "file": "vue.js", 10 | "fileHash": "57d991d9", 11 | "needsInterop": false 12 | }, 13 | "vitepress > @vue/devtools-api": { 14 | "src": "../../../../node_modules/.pnpm/@vue+devtools-api@7.7.6/node_modules/@vue/devtools-api/dist/index.js", 15 | "file": "vitepress___@vue_devtools-api.js", 16 | "fileHash": "73e4779e", 17 | "needsInterop": false 18 | }, 19 | "vitepress > @vueuse/core": { 20 | "src": "../../../../node_modules/.pnpm/@vueuse+core@12.8.2_typescript@5.8.3/node_modules/@vueuse/core/index.mjs", 21 | "file": "vitepress___@vueuse_core.js", 22 | "fileHash": "1696037d", 23 | "needsInterop": false 24 | }, 25 | "@theme/index": { 26 | "src": "../../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.25.0_@types+node@20.17.47_@types+react@18.3.21_postc_3d2t5mvdnqmir7u3qhtpv6wwsi/node_modules/vitepress/dist/client/theme-default/index.js", 27 | "file": "@theme_index.js", 28 | "fileHash": "f945b636", 29 | "needsInterop": false 30 | } 31 | }, 32 | "chunks": { 33 | "chunk-5SIPG2HA": { 34 | "file": "chunk-5SIPG2HA.js" 35 | }, 36 | "chunk-O3I43HSE": { 37 | "file": "chunk-O3I43HSE.js" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vitepress___@vueuse_core.js: -------------------------------------------------------------------------------- 1 | import { 2 | DefaultMagicKeysAliasMap, 3 | StorageSerializers, 4 | TransitionPresets, 5 | assert, 6 | breakpointsAntDesign, 7 | breakpointsBootstrapV5, 8 | breakpointsElement, 9 | breakpointsMasterCss, 10 | breakpointsPrimeFlex, 11 | breakpointsQuasar, 12 | breakpointsSematic, 13 | breakpointsTailwind, 14 | breakpointsVuetify, 15 | breakpointsVuetifyV2, 16 | breakpointsVuetifyV3, 17 | bypassFilter, 18 | camelize, 19 | clamp, 20 | cloneFnJSON, 21 | computedAsync, 22 | computedEager, 23 | computedInject, 24 | computedWithControl, 25 | containsProp, 26 | controlledRef, 27 | createEventHook, 28 | createFetch, 29 | createFilterWrapper, 30 | createGlobalState, 31 | createInjectionState, 32 | createRef, 33 | createReusableTemplate, 34 | createSharedComposable, 35 | createSingletonPromise, 36 | createTemplatePromise, 37 | createUnrefFn, 38 | customStorageEventName, 39 | debounceFilter, 40 | defaultDocument, 41 | defaultLocation, 42 | defaultNavigator, 43 | defaultWindow, 44 | executeTransition, 45 | extendRef, 46 | formatDate, 47 | formatTimeAgo, 48 | get, 49 | getLifeCycleTarget, 50 | getSSRHandler, 51 | hasOwn, 52 | hyphenate, 53 | identity, 54 | increaseWithUnit, 55 | injectLocal, 56 | invoke, 57 | isClient, 58 | isDef, 59 | isDefined, 60 | isIOS, 61 | isObject, 62 | isWorker, 63 | makeDestructurable, 64 | mapGamepadToXbox360Controller, 65 | noop, 66 | normalizeDate, 67 | notNullish, 68 | now, 69 | objectEntries, 70 | objectOmit, 71 | objectPick, 72 | onClickOutside, 73 | onElementRemoval, 74 | onKeyDown, 75 | onKeyPressed, 76 | onKeyStroke, 77 | onKeyUp, 78 | onLongPress, 79 | onStartTyping, 80 | pausableFilter, 81 | promiseTimeout, 82 | provideLocal, 83 | provideSSRWidth, 84 | pxValue, 85 | rand, 86 | reactify, 87 | reactifyObject, 88 | reactiveComputed, 89 | reactiveOmit, 90 | reactivePick, 91 | refAutoReset, 92 | refDebounced, 93 | refDefault, 94 | refThrottled, 95 | refWithControl, 96 | resolveRef, 97 | resolveUnref, 98 | set, 99 | setSSRHandler, 100 | syncRef, 101 | syncRefs, 102 | templateRef, 103 | throttleFilter, 104 | timestamp, 105 | toArray, 106 | toReactive, 107 | toRef, 108 | toRefs, 109 | toValue, 110 | tryOnBeforeMount, 111 | tryOnBeforeUnmount, 112 | tryOnMounted, 113 | tryOnScopeDispose, 114 | tryOnUnmounted, 115 | unrefElement, 116 | until, 117 | useActiveElement, 118 | useAnimate, 119 | useArrayDifference, 120 | useArrayEvery, 121 | useArrayFilter, 122 | useArrayFind, 123 | useArrayFindIndex, 124 | useArrayFindLast, 125 | useArrayIncludes, 126 | useArrayJoin, 127 | useArrayMap, 128 | useArrayReduce, 129 | useArraySome, 130 | useArrayUnique, 131 | useAsyncQueue, 132 | useAsyncState, 133 | useBase64, 134 | useBattery, 135 | useBluetooth, 136 | useBreakpoints, 137 | useBroadcastChannel, 138 | useBrowserLocation, 139 | useCached, 140 | useClipboard, 141 | useClipboardItems, 142 | useCloned, 143 | useColorMode, 144 | useConfirmDialog, 145 | useCountdown, 146 | useCounter, 147 | useCssVar, 148 | useCurrentElement, 149 | useCycleList, 150 | useDark, 151 | useDateFormat, 152 | useDebounceFn, 153 | useDebouncedRefHistory, 154 | useDeviceMotion, 155 | useDeviceOrientation, 156 | useDevicePixelRatio, 157 | useDevicesList, 158 | useDisplayMedia, 159 | useDocumentVisibility, 160 | useDraggable, 161 | useDropZone, 162 | useElementBounding, 163 | useElementByPoint, 164 | useElementHover, 165 | useElementSize, 166 | useElementVisibility, 167 | useEventBus, 168 | useEventListener, 169 | useEventSource, 170 | useEyeDropper, 171 | useFavicon, 172 | useFetch, 173 | useFileDialog, 174 | useFileSystemAccess, 175 | useFocus, 176 | useFocusWithin, 177 | useFps, 178 | useFullscreen, 179 | useGamepad, 180 | useGeolocation, 181 | useIdle, 182 | useImage, 183 | useInfiniteScroll, 184 | useIntersectionObserver, 185 | useInterval, 186 | useIntervalFn, 187 | useKeyModifier, 188 | useLastChanged, 189 | useLocalStorage, 190 | useMagicKeys, 191 | useManualRefHistory, 192 | useMediaControls, 193 | useMediaQuery, 194 | useMemoize, 195 | useMemory, 196 | useMounted, 197 | useMouse, 198 | useMouseInElement, 199 | useMousePressed, 200 | useMutationObserver, 201 | useNavigatorLanguage, 202 | useNetwork, 203 | useNow, 204 | useObjectUrl, 205 | useOffsetPagination, 206 | useOnline, 207 | usePageLeave, 208 | useParallax, 209 | useParentElement, 210 | usePerformanceObserver, 211 | usePermission, 212 | usePointer, 213 | usePointerLock, 214 | usePointerSwipe, 215 | usePreferredColorScheme, 216 | usePreferredContrast, 217 | usePreferredDark, 218 | usePreferredLanguages, 219 | usePreferredReducedMotion, 220 | usePreferredReducedTransparency, 221 | usePrevious, 222 | useRafFn, 223 | useRefHistory, 224 | useResizeObserver, 225 | useSSRWidth, 226 | useScreenOrientation, 227 | useScreenSafeArea, 228 | useScriptTag, 229 | useScroll, 230 | useScrollLock, 231 | useSessionStorage, 232 | useShare, 233 | useSorted, 234 | useSpeechRecognition, 235 | useSpeechSynthesis, 236 | useStepper, 237 | useStorage, 238 | useStorageAsync, 239 | useStyleTag, 240 | useSupported, 241 | useSwipe, 242 | useTemplateRefsList, 243 | useTextDirection, 244 | useTextSelection, 245 | useTextareaAutosize, 246 | useThrottleFn, 247 | useThrottledRefHistory, 248 | useTimeAgo, 249 | useTimeout, 250 | useTimeoutFn, 251 | useTimeoutPoll, 252 | useTimestamp, 253 | useTitle, 254 | useToNumber, 255 | useToString, 256 | useToggle, 257 | useTransition, 258 | useUrlSearchParams, 259 | useUserMedia, 260 | useVModel, 261 | useVModels, 262 | useVibrate, 263 | useVirtualList, 264 | useWakeLock, 265 | useWebNotification, 266 | useWebSocket, 267 | useWebWorker, 268 | useWebWorkerFn, 269 | useWindowFocus, 270 | useWindowScroll, 271 | useWindowSize, 272 | watchArray, 273 | watchAtMost, 274 | watchDebounced, 275 | watchDeep, 276 | watchIgnorable, 277 | watchImmediate, 278 | watchOnce, 279 | watchPausable, 280 | watchThrottled, 281 | watchTriggerable, 282 | watchWithFilter, 283 | whenever, 284 | } from './chunk-5SIPG2HA.js'; 285 | import './chunk-O3I43HSE.js'; 286 | export { 287 | DefaultMagicKeysAliasMap, 288 | StorageSerializers, 289 | TransitionPresets, 290 | assert, 291 | computedAsync as asyncComputed, 292 | refAutoReset as autoResetRef, 293 | breakpointsAntDesign, 294 | breakpointsBootstrapV5, 295 | breakpointsElement, 296 | breakpointsMasterCss, 297 | breakpointsPrimeFlex, 298 | breakpointsQuasar, 299 | breakpointsSematic, 300 | breakpointsTailwind, 301 | breakpointsVuetify, 302 | breakpointsVuetifyV2, 303 | breakpointsVuetifyV3, 304 | bypassFilter, 305 | camelize, 306 | clamp, 307 | cloneFnJSON, 308 | computedAsync, 309 | computedEager, 310 | computedInject, 311 | computedWithControl, 312 | containsProp, 313 | computedWithControl as controlledComputed, 314 | controlledRef, 315 | createEventHook, 316 | createFetch, 317 | createFilterWrapper, 318 | createGlobalState, 319 | createInjectionState, 320 | reactify as createReactiveFn, 321 | createRef, 322 | createReusableTemplate, 323 | createSharedComposable, 324 | createSingletonPromise, 325 | createTemplatePromise, 326 | createUnrefFn, 327 | customStorageEventName, 328 | debounceFilter, 329 | refDebounced as debouncedRef, 330 | watchDebounced as debouncedWatch, 331 | defaultDocument, 332 | defaultLocation, 333 | defaultNavigator, 334 | defaultWindow, 335 | computedEager as eagerComputed, 336 | executeTransition, 337 | extendRef, 338 | formatDate, 339 | formatTimeAgo, 340 | get, 341 | getLifeCycleTarget, 342 | getSSRHandler, 343 | hasOwn, 344 | hyphenate, 345 | identity, 346 | watchIgnorable as ignorableWatch, 347 | increaseWithUnit, 348 | injectLocal, 349 | invoke, 350 | isClient, 351 | isDef, 352 | isDefined, 353 | isIOS, 354 | isObject, 355 | isWorker, 356 | makeDestructurable, 357 | mapGamepadToXbox360Controller, 358 | noop, 359 | normalizeDate, 360 | notNullish, 361 | now, 362 | objectEntries, 363 | objectOmit, 364 | objectPick, 365 | onClickOutside, 366 | onElementRemoval, 367 | onKeyDown, 368 | onKeyPressed, 369 | onKeyStroke, 370 | onKeyUp, 371 | onLongPress, 372 | onStartTyping, 373 | pausableFilter, 374 | watchPausable as pausableWatch, 375 | promiseTimeout, 376 | provideLocal, 377 | provideSSRWidth, 378 | pxValue, 379 | rand, 380 | reactify, 381 | reactifyObject, 382 | reactiveComputed, 383 | reactiveOmit, 384 | reactivePick, 385 | refAutoReset, 386 | refDebounced, 387 | refDefault, 388 | refThrottled, 389 | refWithControl, 390 | resolveRef, 391 | resolveUnref, 392 | set, 393 | setSSRHandler, 394 | syncRef, 395 | syncRefs, 396 | templateRef, 397 | throttleFilter, 398 | refThrottled as throttledRef, 399 | watchThrottled as throttledWatch, 400 | timestamp, 401 | toArray, 402 | toReactive, 403 | toRef, 404 | toRefs, 405 | toValue, 406 | tryOnBeforeMount, 407 | tryOnBeforeUnmount, 408 | tryOnMounted, 409 | tryOnScopeDispose, 410 | tryOnUnmounted, 411 | unrefElement, 412 | until, 413 | useActiveElement, 414 | useAnimate, 415 | useArrayDifference, 416 | useArrayEvery, 417 | useArrayFilter, 418 | useArrayFind, 419 | useArrayFindIndex, 420 | useArrayFindLast, 421 | useArrayIncludes, 422 | useArrayJoin, 423 | useArrayMap, 424 | useArrayReduce, 425 | useArraySome, 426 | useArrayUnique, 427 | useAsyncQueue, 428 | useAsyncState, 429 | useBase64, 430 | useBattery, 431 | useBluetooth, 432 | useBreakpoints, 433 | useBroadcastChannel, 434 | useBrowserLocation, 435 | useCached, 436 | useClipboard, 437 | useClipboardItems, 438 | useCloned, 439 | useColorMode, 440 | useConfirmDialog, 441 | useCountdown, 442 | useCounter, 443 | useCssVar, 444 | useCurrentElement, 445 | useCycleList, 446 | useDark, 447 | useDateFormat, 448 | refDebounced as useDebounce, 449 | useDebounceFn, 450 | useDebouncedRefHistory, 451 | useDeviceMotion, 452 | useDeviceOrientation, 453 | useDevicePixelRatio, 454 | useDevicesList, 455 | useDisplayMedia, 456 | useDocumentVisibility, 457 | useDraggable, 458 | useDropZone, 459 | useElementBounding, 460 | useElementByPoint, 461 | useElementHover, 462 | useElementSize, 463 | useElementVisibility, 464 | useEventBus, 465 | useEventListener, 466 | useEventSource, 467 | useEyeDropper, 468 | useFavicon, 469 | useFetch, 470 | useFileDialog, 471 | useFileSystemAccess, 472 | useFocus, 473 | useFocusWithin, 474 | useFps, 475 | useFullscreen, 476 | useGamepad, 477 | useGeolocation, 478 | useIdle, 479 | useImage, 480 | useInfiniteScroll, 481 | useIntersectionObserver, 482 | useInterval, 483 | useIntervalFn, 484 | useKeyModifier, 485 | useLastChanged, 486 | useLocalStorage, 487 | useMagicKeys, 488 | useManualRefHistory, 489 | useMediaControls, 490 | useMediaQuery, 491 | useMemoize, 492 | useMemory, 493 | useMounted, 494 | useMouse, 495 | useMouseInElement, 496 | useMousePressed, 497 | useMutationObserver, 498 | useNavigatorLanguage, 499 | useNetwork, 500 | useNow, 501 | useObjectUrl, 502 | useOffsetPagination, 503 | useOnline, 504 | usePageLeave, 505 | useParallax, 506 | useParentElement, 507 | usePerformanceObserver, 508 | usePermission, 509 | usePointer, 510 | usePointerLock, 511 | usePointerSwipe, 512 | usePreferredColorScheme, 513 | usePreferredContrast, 514 | usePreferredDark, 515 | usePreferredLanguages, 516 | usePreferredReducedMotion, 517 | usePreferredReducedTransparency, 518 | usePrevious, 519 | useRafFn, 520 | useRefHistory, 521 | useResizeObserver, 522 | useSSRWidth, 523 | useScreenOrientation, 524 | useScreenSafeArea, 525 | useScriptTag, 526 | useScroll, 527 | useScrollLock, 528 | useSessionStorage, 529 | useShare, 530 | useSorted, 531 | useSpeechRecognition, 532 | useSpeechSynthesis, 533 | useStepper, 534 | useStorage, 535 | useStorageAsync, 536 | useStyleTag, 537 | useSupported, 538 | useSwipe, 539 | useTemplateRefsList, 540 | useTextDirection, 541 | useTextSelection, 542 | useTextareaAutosize, 543 | refThrottled as useThrottle, 544 | useThrottleFn, 545 | useThrottledRefHistory, 546 | useTimeAgo, 547 | useTimeout, 548 | useTimeoutFn, 549 | useTimeoutPoll, 550 | useTimestamp, 551 | useTitle, 552 | useToNumber, 553 | useToString, 554 | useToggle, 555 | useTransition, 556 | useUrlSearchParams, 557 | useUserMedia, 558 | useVModel, 559 | useVModels, 560 | useVibrate, 561 | useVirtualList, 562 | useWakeLock, 563 | useWebNotification, 564 | useWebSocket, 565 | useWebWorker, 566 | useWebWorkerFn, 567 | useWindowFocus, 568 | useWindowScroll, 569 | useWindowSize, 570 | watchArray, 571 | watchAtMost, 572 | watchDebounced, 573 | watchDeep, 574 | watchIgnorable, 575 | watchImmediate, 576 | watchOnce, 577 | watchPausable, 578 | watchThrottled, 579 | watchTriggerable, 580 | watchWithFilter, 581 | whenever, 582 | }; 583 | //# sourceMappingURL=vitepress___@vueuse_core.js.map 584 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "sources": [], 4 | "sourcesContent": [], 5 | "mappings": "", 6 | "names": [] 7 | } 8 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vue.js: -------------------------------------------------------------------------------- 1 | import { 2 | BaseTransition, 3 | BaseTransitionPropsValidators, 4 | Comment, 5 | DeprecationTypes, 6 | EffectScope, 7 | ErrorCodes, 8 | ErrorTypeStrings, 9 | Fragment, 10 | KeepAlive, 11 | ReactiveEffect, 12 | Static, 13 | Suspense, 14 | Teleport, 15 | Text, 16 | TrackOpTypes, 17 | Transition, 18 | TransitionGroup, 19 | TriggerOpTypes, 20 | VueElement, 21 | assertNumber, 22 | callWithAsyncErrorHandling, 23 | callWithErrorHandling, 24 | camelize, 25 | capitalize, 26 | cloneVNode, 27 | compatUtils, 28 | compile, 29 | computed, 30 | createApp, 31 | createBaseVNode, 32 | createBlock, 33 | createCommentVNode, 34 | createElementBlock, 35 | createHydrationRenderer, 36 | createPropsRestProxy, 37 | createRenderer, 38 | createSSRApp, 39 | createSlots, 40 | createStaticVNode, 41 | createTextVNode, 42 | createVNode, 43 | customRef, 44 | defineAsyncComponent, 45 | defineComponent, 46 | defineCustomElement, 47 | defineEmits, 48 | defineExpose, 49 | defineModel, 50 | defineOptions, 51 | defineProps, 52 | defineSSRCustomElement, 53 | defineSlots, 54 | devtools, 55 | effect, 56 | effectScope, 57 | getCurrentInstance, 58 | getCurrentScope, 59 | getCurrentWatcher, 60 | getTransitionRawChildren, 61 | guardReactiveProps, 62 | h, 63 | handleError, 64 | hasInjectionContext, 65 | hydrate, 66 | hydrateOnIdle, 67 | hydrateOnInteraction, 68 | hydrateOnMediaQuery, 69 | hydrateOnVisible, 70 | initCustomFormatter, 71 | initDirectivesForSSR, 72 | inject, 73 | isMemoSame, 74 | isProxy, 75 | isReactive, 76 | isReadonly, 77 | isRef, 78 | isRuntimeOnly, 79 | isShallow, 80 | isVNode, 81 | markRaw, 82 | mergeDefaults, 83 | mergeModels, 84 | mergeProps, 85 | nextTick, 86 | normalizeClass, 87 | normalizeProps, 88 | normalizeStyle, 89 | onActivated, 90 | onBeforeMount, 91 | onBeforeUnmount, 92 | onBeforeUpdate, 93 | onDeactivated, 94 | onErrorCaptured, 95 | onMounted, 96 | onRenderTracked, 97 | onRenderTriggered, 98 | onScopeDispose, 99 | onServerPrefetch, 100 | onUnmounted, 101 | onUpdated, 102 | onWatcherCleanup, 103 | openBlock, 104 | popScopeId, 105 | provide, 106 | proxyRefs, 107 | pushScopeId, 108 | queuePostFlushCb, 109 | reactive, 110 | readonly, 111 | ref, 112 | registerRuntimeCompiler, 113 | render, 114 | renderList, 115 | renderSlot, 116 | resolveComponent, 117 | resolveDirective, 118 | resolveDynamicComponent, 119 | resolveFilter, 120 | resolveTransitionHooks, 121 | setBlockTracking, 122 | setDevtoolsHook, 123 | setTransitionHooks, 124 | shallowReactive, 125 | shallowReadonly, 126 | shallowRef, 127 | ssrContextKey, 128 | ssrUtils, 129 | stop, 130 | toDisplayString, 131 | toHandlerKey, 132 | toHandlers, 133 | toRaw, 134 | toRef, 135 | toRefs, 136 | toValue, 137 | transformVNodeArgs, 138 | triggerRef, 139 | unref, 140 | useAttrs, 141 | useCssModule, 142 | useCssVars, 143 | useHost, 144 | useId, 145 | useModel, 146 | useSSRContext, 147 | useShadowRoot, 148 | useSlots, 149 | useTemplateRef, 150 | useTransitionState, 151 | vModelCheckbox, 152 | vModelDynamic, 153 | vModelRadio, 154 | vModelSelect, 155 | vModelText, 156 | vShow, 157 | version, 158 | warn, 159 | watch, 160 | watchEffect, 161 | watchPostEffect, 162 | watchSyncEffect, 163 | withAsyncContext, 164 | withCtx, 165 | withDefaults, 166 | withDirectives, 167 | withKeys, 168 | withMemo, 169 | withModifiers, 170 | withScopeId, 171 | } from './chunk-O3I43HSE.js'; 172 | export { 173 | BaseTransition, 174 | BaseTransitionPropsValidators, 175 | Comment, 176 | DeprecationTypes, 177 | EffectScope, 178 | ErrorCodes, 179 | ErrorTypeStrings, 180 | Fragment, 181 | KeepAlive, 182 | ReactiveEffect, 183 | Static, 184 | Suspense, 185 | Teleport, 186 | Text, 187 | TrackOpTypes, 188 | Transition, 189 | TransitionGroup, 190 | TriggerOpTypes, 191 | VueElement, 192 | assertNumber, 193 | callWithAsyncErrorHandling, 194 | callWithErrorHandling, 195 | camelize, 196 | capitalize, 197 | cloneVNode, 198 | compatUtils, 199 | compile, 200 | computed, 201 | createApp, 202 | createBlock, 203 | createCommentVNode, 204 | createElementBlock, 205 | createBaseVNode as createElementVNode, 206 | createHydrationRenderer, 207 | createPropsRestProxy, 208 | createRenderer, 209 | createSSRApp, 210 | createSlots, 211 | createStaticVNode, 212 | createTextVNode, 213 | createVNode, 214 | customRef, 215 | defineAsyncComponent, 216 | defineComponent, 217 | defineCustomElement, 218 | defineEmits, 219 | defineExpose, 220 | defineModel, 221 | defineOptions, 222 | defineProps, 223 | defineSSRCustomElement, 224 | defineSlots, 225 | devtools, 226 | effect, 227 | effectScope, 228 | getCurrentInstance, 229 | getCurrentScope, 230 | getCurrentWatcher, 231 | getTransitionRawChildren, 232 | guardReactiveProps, 233 | h, 234 | handleError, 235 | hasInjectionContext, 236 | hydrate, 237 | hydrateOnIdle, 238 | hydrateOnInteraction, 239 | hydrateOnMediaQuery, 240 | hydrateOnVisible, 241 | initCustomFormatter, 242 | initDirectivesForSSR, 243 | inject, 244 | isMemoSame, 245 | isProxy, 246 | isReactive, 247 | isReadonly, 248 | isRef, 249 | isRuntimeOnly, 250 | isShallow, 251 | isVNode, 252 | markRaw, 253 | mergeDefaults, 254 | mergeModels, 255 | mergeProps, 256 | nextTick, 257 | normalizeClass, 258 | normalizeProps, 259 | normalizeStyle, 260 | onActivated, 261 | onBeforeMount, 262 | onBeforeUnmount, 263 | onBeforeUpdate, 264 | onDeactivated, 265 | onErrorCaptured, 266 | onMounted, 267 | onRenderTracked, 268 | onRenderTriggered, 269 | onScopeDispose, 270 | onServerPrefetch, 271 | onUnmounted, 272 | onUpdated, 273 | onWatcherCleanup, 274 | openBlock, 275 | popScopeId, 276 | provide, 277 | proxyRefs, 278 | pushScopeId, 279 | queuePostFlushCb, 280 | reactive, 281 | readonly, 282 | ref, 283 | registerRuntimeCompiler, 284 | render, 285 | renderList, 286 | renderSlot, 287 | resolveComponent, 288 | resolveDirective, 289 | resolveDynamicComponent, 290 | resolveFilter, 291 | resolveTransitionHooks, 292 | setBlockTracking, 293 | setDevtoolsHook, 294 | setTransitionHooks, 295 | shallowReactive, 296 | shallowReadonly, 297 | shallowRef, 298 | ssrContextKey, 299 | ssrUtils, 300 | stop, 301 | toDisplayString, 302 | toHandlerKey, 303 | toHandlers, 304 | toRaw, 305 | toRef, 306 | toRefs, 307 | toValue, 308 | transformVNodeArgs, 309 | triggerRef, 310 | unref, 311 | useAttrs, 312 | useCssModule, 313 | useCssVars, 314 | useHost, 315 | useId, 316 | useModel, 317 | useSSRContext, 318 | useShadowRoot, 319 | useSlots, 320 | useTemplateRef, 321 | useTransitionState, 322 | vModelCheckbox, 323 | vModelDynamic, 324 | vModelRadio, 325 | vModelSelect, 326 | vModelText, 327 | vShow, 328 | version, 329 | warn, 330 | watch, 331 | watchEffect, 332 | watchPostEffect, 333 | watchSyncEffect, 334 | withAsyncContext, 335 | withCtx, 336 | withDefaults, 337 | withDirectives, 338 | withKeys, 339 | withMemo, 340 | withModifiers, 341 | withScopeId, 342 | }; 343 | //# sourceMappingURL=vue.js.map 344 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vue.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "sources": [], 4 | "sourcesContent": [], 5 | "mappings": "", 6 | "names": [] 7 | } 8 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@mcp-ui/docs", 3 | "version": "0.1.0", 4 | "private": false, 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vitepress dev src", 8 | "build": "vitepress build src", 9 | "preview": "vitepress preview src" 10 | }, 11 | "devDependencies": { 12 | "vitepress": "^1.0.0-rc.44", 13 | "vue": "^3.3.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/src/.vitepress/cache/deps/_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "24ae7914", 3 | "configHash": "4d8f23bf", 4 | "lockfileHash": "f40a324f", 5 | "browserHash": "57cac89d", 6 | "optimized": { 7 | "vue": { 8 | "src": "../../../../../node_modules/.pnpm/vue@3.5.14_typescript@5.8.3/node_modules/vue/dist/vue.runtime.esm-bundler.js", 9 | "file": "vue.js", 10 | "fileHash": "4d545f98", 11 | "needsInterop": false 12 | }, 13 | "vitepress > @vue/devtools-api": { 14 | "src": "../../../../../node_modules/.pnpm/@vue+devtools-api@7.7.6/node_modules/@vue/devtools-api/dist/index.js", 15 | "file": "vitepress___@vue_devtools-api.js", 16 | "fileHash": "0eb634c2", 17 | "needsInterop": false 18 | }, 19 | "vitepress > @vueuse/core": { 20 | "src": "../../../../../node_modules/.pnpm/@vueuse+core@12.8.2_typescript@5.8.3/node_modules/@vueuse/core/index.mjs", 21 | "file": "vitepress___@vueuse_core.js", 22 | "fileHash": "a207eb3c", 23 | "needsInterop": false 24 | }, 25 | "@theme/index": { 26 | "src": "../../../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.25.0_@types+node@22.15.18_@types+react@18.3.21_postc_a2ow5vd3dm2t7inebqftg4t7xi/node_modules/vitepress/dist/client/theme-default/index.js", 27 | "file": "@theme_index.js", 28 | "fileHash": "8e216fe2", 29 | "needsInterop": false 30 | } 31 | }, 32 | "chunks": { 33 | "chunk-2DFNRHEN": { 34 | "file": "chunk-2DFNRHEN.js" 35 | }, 36 | "chunk-IUSDUMZG": { 37 | "file": "chunk-IUSDUMZG.js" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /docs/src/.vitepress/config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitepress'; 2 | 3 | export default defineConfig({ 4 | lang: 'en-US', 5 | title: 'MCP UI', 6 | description: 'MCP-UI Client & Server SDK Documentation', 7 | base: '/mcp-ui/', // For GitHub Pages deployment 8 | 9 | vite: { 10 | // Vite specific config for VitePress 11 | plugins: [], 12 | }, 13 | 14 | themeConfig: { 15 | nav: [ 16 | { text: 'Home', link: '/' }, 17 | { text: 'Guide', link: '/guide/introduction' }, 18 | // Add links to API docs if generated, e.g., using TypeDoc 19 | // { text: 'API', items: [ 20 | // { text: 'Client API', link: '/api/client/' }, 21 | // { text: 'Server API', link: '/api/server/' }, 22 | // { text: 'Shared API', link: '/api/shared/' }, 23 | // ]} 24 | ], 25 | 26 | sidebar: { 27 | '/guide/': [ 28 | { 29 | text: 'Overview', 30 | items: [ 31 | { text: 'Introduction', link: '/guide/introduction' }, 32 | { text: 'Getting Started', link: '/guide/getting-started' }, 33 | { text: 'Protocol Details', link: '/guide/protocol-details' }, 34 | ], 35 | }, 36 | { 37 | text: 'Server SDK (@mcp-ui/server)', 38 | items: [ 39 | { text: 'Overview', link: '/guide/server/overview' }, 40 | { text: 'Usage & Examples', link: '/guide/server/usage-examples' }, 41 | // { text: 'API', link: '/guide/server/api' } // Placeholder 42 | ], 43 | }, 44 | { 45 | text: 'Client SDK (@mcp-ui/client)', 46 | items: [ 47 | { text: 'Overview', link: '/guide/client/overview' }, 48 | { 49 | text: 'HtmlResource Component', 50 | link: '/guide/client/html-resource', 51 | }, 52 | { text: 'Usage & Examples', link: '/guide/client/usage-examples' }, 53 | // { text: 'API', link: '/guide/client/api' } // Placeholder 54 | ], 55 | }, 56 | ], 57 | }, 58 | 59 | socialLinks: [ 60 | { icon: 'github', link: 'https://github.com/idosal/mcp-ui' }, // TODO: Update this link 61 | ], 62 | 63 | footer: { 64 | message: 'Released under the Apache 2.0 License.', 65 | copyright: 'Copyright © 2025-present Ido Salomon', 66 | }, 67 | }, 68 | markdown: { 69 | // options for markdown-it-anchor 70 | // anchor: { permalink: anchor.permalink.headerLink() }, 71 | // options for markdown-it-toc 72 | // toc: { includeLevel: [1, 2] }, 73 | }, 74 | }); 75 | -------------------------------------------------------------------------------- /docs/src/guide/client/html-resource.md: -------------------------------------------------------------------------------- 1 | # HtmlResource Component 2 | 3 | The `` component is currently the main component of the`@mcp-ui/client` package. It's the only export you need to render interactive HTML resources in your React app. 4 | 5 | ## Props 6 | 7 | ```typescript 8 | import type { Resource } from '@modelcontextprotocol/sdk/types'; 9 | 10 | export interface HtmlResourceProps { 11 | resource: Partial; 12 | onUiAction?: (result: UiActionResult) => Promise; 13 | style?: React.CSSProperties; 14 | } 15 | ``` 16 | 17 | - **`resource`**: The resource object from an `HtmlResourceBlock`. It should include `uri`, `mimeType`, and either `text` or `blob`. 18 | - **`onUiAction`**: An optional callback that fires when the iframe content (for `ui://` resources) posts a message to your app. The message should look like: 19 | ```typescript 20 | { type: 'tool', payload: { toolName: string, params: Record } } | 21 | { type: 'intent', payload: { intent: string, params: Record } } | 22 | { type: 'prompt', payload: { prompt: string } } | 23 | { type: 'notification', payload: { message: string } } | 24 | { type: 'link', payload: { url: string } } | 25 | ``` 26 | If you don't provide a callback for a specific type, the default handler will be used. 27 | - **`style`** (optional): Custom styles for the iframe. 28 | 29 | ## How It Works 30 | 31 | 1. **Checks Content Type**: If `resource.mimeType` isn't `"text/html"` or `"text/uri-list"`, you'll see an error. 32 | 2. **Handles URI Schemes**: 33 | - For resources with `mimeType: 'text/uri-list'`: 34 | - Expects `resource.text` or `resource.blob` to contain a single URL in URI list format 35 | - **MCP-UI requires a single URL**: While the format supports multiple URLs, only the first valid URL is used 36 | - Multiple URLs are supported for fallback specification but will trigger warnings 37 | - Ignores comment lines starting with `#` and empty lines 38 | - If using `blob`, it decodes it from Base64. 39 | - Renders an `