inspector/client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 5ef78470de * In App.tsx
- Add state for connectionType
  - Fetch connectionType from localstorage if present

* In Sidebar.tsx
  - Add dropdown for connectionType, only visible if transport type is not stdio

* In Sidebar.test.tsx
  - set connectionType to "proxy"

* In useConnection.ts
  - add connectionType param, defaulting to "proxy"
  - add state for mcpSessionId
  - Only check proxy health if the connection type is proxy
  - create a serverUrl variable which will either be the proxy url OR the server url depending upon the connection type
  - added captureResponseHeaders function to extract the protocol-related headers from a response.
  - when creating transport options and connectionType is "direct" and transportType is not "stdio",
    - add the appropriate `Accept` and `Content-Type` headers
    - capture the protocol related response headers and store them in the custom fetch handler
    - set serverUrl to be the server url, not the proxy url
  - if connection type is proxy set serverUrl to the mcpProxyUrl
  - use serverUrl instead of mcpProxyUrl for the  transport instantiation
* In useConnection.test.tsx
  - replaced test "sends X-MCP-Proxy-Auth header when proxy auth token is configured" with two tests:
    - "sends X-MCP-Proxy-Auth header when proxy auth token is configured for 'proxy' connectionType"
    - "does NOT send X-MCP-Proxy-Auth header when proxy auth token is configured for 'direct' connectionType"
   - added Connection URL Verification section with 2 tests
     - uses server URL directly when connectionType is 'direct'"
     - "uses proxy server URL when connectionType is 'proxy'"
2025-09-16 17:26:29 -04:00
..
bin Fix transport type propagation from CLI to web client 2025-08-05 19:38:44 +01:00
e2e prettier 2025-08-05 14:08:57 +01:00
public switch favicon 2024-11-19 14:13:19 -08:00
src * In App.tsx 2025-09-16 17:26:29 -04:00
.gitignore init client 2024-10-07 16:28:05 -07:00
components.json run prettier 2024-11-04 21:29:59 +00:00
eslint.config.js feat: add default Authorization Bearer header and clean up legacy auth 2025-09-15 20:19:56 +05:30
index.html Full-width #root 2025-07-01 09:30:36 -07:00
jest.config.cjs Formally randomize test order, so Jest prints a seed for local reproducibility of CI 2025-07-24 13:29:59 -07:00
package.json Merge branch 'main' into main 2025-09-15 19:30:18 +05:30
playwright.config.ts prettier fix 2025-06-19 07:02:06 -07:00
postcss.config.js run prettier 2024-11-04 21:29:59 +00:00
README.md init client 2024-10-07 16:28:05 -07:00
tailwind.config.js Make tailwind config work on Windows 2024-11-26 16:51:50 +01:00
tsconfig.app.json Add jest-dom types 2025-03-23 13:22:31 -07:00
tsconfig.jest.json Handle edge case and add tests for functions 2025-02-27 06:40:01 -07:00
tsconfig.json init client 2024-10-07 16:28:05 -07:00
tsconfig.node.json init client 2024-10-07 16:28:05 -07:00
vite.config.ts Update Vite configuration to enable host access and fix proxy server URL to use the current hostname. 2025-03-20 22:04:59 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ["./tsconfig.node.json", "./tsconfig.app.json"],
      tsconfigRootDir: import.meta.dirname,
    },
  },
});
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from "eslint-plugin-react";

export default tseslint.config({
  // Set the react version
  settings: { react: { version: "18.3" } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs["jsx-runtime"].rules,
  },
});