Commit graph

1,464 commits

Author SHA1 Message Date
Ola Hungerford
51eb7cf849
Update client/src/utils/schemaUtils.ts
Co-authored-by: Cliff Hall <cliff@futurescale.com>
2025-06-10 21:21:43 -07:00
Felix Weinberger
32e6bdd13c
feat: improve error messaging for proxy authentication failures
- Update connection error message to guide users about proxy token configuration
- Add specific message when proxy token is missing directing to Configuration section
- Help users quickly identify and resolve authentication issues
2025-06-10 18:16:41 +01:00
Felix Weinberger
9dbd17343c
feat: disable auto-open when authentication is enabled
- Auto-open browser only works when DANGEROUSLY_OMIT_AUTH=true
- When auth is enabled (default), users must use the secure URL with token
- Server displays clear message that auto-open is disabled with auth
- Updates documentation to reflect this behavior

This improves UX by preventing the browser from opening without auth token,
forcing users to use the secure pre-filled URL instead.
2025-06-10 18:16:38 +01:00
Felix Weinberger
15ecb59a96
feat: add origin validation to prevent DNS rebinding attacks
- Add origin validation middleware to check Origin header
- Default allowed origins respect CLIENT_PORT environment variable
- Support ALLOWED_ORIGINS environment variable for additional origins
- Apply validation to all protected endpoints before auth check
- Return 403 Forbidden with clear message for invalid origins
- Add DNS Rebinding Protection section to README

This completes the security hardening by preventing malicious websites
from making requests to the local proxy server.
2025-06-10 18:16:35 +01:00
Felix Weinberger
908d0ee36a
feat: add client support for proxy authentication
- Add MCP_PROXY_AUTH_TOKEN configuration field to store session token
- Update useConnection hook to include proxy auth token in all requests
- Add separate proxy auth headers to avoid conflicts with MCP server auth
- Add specific error handling for proxy authentication failures
- Show helpful toast message directing users to Configuration settings
- Update README with instructions for configuring token in UI

The client now properly authenticates with the proxy server using the
session token displayed in the proxy console.
2025-06-10 18:16:32 +01:00
Felix Weinberger
111e282386
feat: add session token authentication to proxy server
- Generate random session token on server startup using crypto.randomBytes
- Add authentication middleware requiring Bearer token for all sensitive endpoints
- Apply auth to /mcp, /stdio, /sse, and /message endpoints
- Display session token in console on startup
- Add DANGEROUSLY_OMIT_AUTH environment variable to disable auth for development
- Update README with authentication documentation

This prevents unauthorized access to the proxy server's ability to execute
local processes and connect to MCP servers.
2025-06-10 18:16:28 +01:00
Felix Weinberger
e8e990987c
fix: bind to localhost by default to prevent DNS rebinding attacks
- Change default binding from 0.0.0.0 (all interfaces) to 127.0.0.1 (localhost only)
- Add HOST environment variable to override binding address when needed
- Update console output to show actual binding address
- Document security change in README with warnings about binding to all interfaces

This prevents remote attackers from accessing the MCP Inspector proxy server,
which has the ability to execute local processes. The proxy should only be
accessible from the local machine unless explicitly configured otherwise.
2025-06-10 18:16:24 +01:00
Sebastian Ko
6c7c417645
add comment 2025-06-10 12:32:52 -04:00
Sebastian Ko
da003c7553
Change '' to "" 2025-06-10 12:32:15 -04:00
Sebastian Ko
66e247b274
Remove additional slash in the end of the proxy base url 2025-06-10 12:17:12 -04:00
Cliff Hall
c8016cd989
Merge branch 'main' into dockerfile 2025-06-09 12:05:44 -04:00
Marc Abramowitz
2c0af88f50 Take screenshots on failure 2025-06-07 08:36:30 -07:00
Marc Abramowitz
cdb9180629 Generate report with https://github.com/daun/playwright-report-summary 2025-06-07 08:22:15 -07:00
Marc Abramowitz
705d7b46c2 e2e_tests.yml: playwright-report and test-result in client dir 2025-06-06 19:33:55 -07:00
Marc Abramowitz
a2a58c2bc2 Install Playwright dependencies 2025-06-06 19:33:55 -07:00
Marc Abramowitz
f06a6e1fb7 npm run prettier-fix 2025-06-06 19:33:55 -07:00
Marc Abramowitz
a421f329e9 git add playwright.config.ts 2025-06-06 19:33:55 -07:00
Marc Abramowitz
826bc35cf2 Upload Playwright Report and Screenshots 2025-06-06 19:33:55 -07:00
Marc Abramowitz
1df83d73f9 Do npm run start in background
so that the CI job can proceed
2025-06-06 19:33:55 -07:00
Marc Abramowitz
66ad85aadc npm run prettier-fix 2025-06-06 19:33:55 -07:00
Marc Abramowitz
4f6a4cebde Add .github/workflows/e2e_tests.yml 2025-06-06 19:33:55 -07:00
Marc Abramowitz
c803d9327e Move test:e2e up with other two test scripts 2025-06-06 19:33:54 -07:00
Marc Abramowitz
89e1efc443 Add more Playwright tests 2025-06-06 19:33:54 -07:00
Marc Abramowitz
3a28efe586 Mention npm run test:e2e in CONTRIBUTING.md 2025-06-06 19:33:54 -07:00
Marc Abramowitz
8babc44f0b Make npm run test:e2e work 2025-06-06 19:33:54 -07:00
Marc Abramowitz
8a13526c8b Exclude e2e from Jest 2025-06-06 19:33:54 -07:00
Marc Abramowitz
69da70acb7 npm run prettier-fix 2025-06-06 19:33:54 -07:00
Marc Abramowitz
226ad251bd Add a Playwright e2e test 2025-06-06 19:33:54 -07:00
Cliff Hall
03edbb01ce
Merge pull request #488 from msabramo/tooltip-for-url-field
Add tooltip for URL field
2025-06-06 13:38:44 -04:00
Marc Abramowitz
d5ef137c42 Merge branch 'main' into tooltip-for-url-field 2025-06-06 06:00:37 -07:00
Marc Abramowitz
9a7ba3451a npm run prettier-fix 2025-06-06 05:49:49 -07:00
shaun smith
5ade12d0b1
Merge pull request #478 from cliffhall/normalize-connection-logging
Normalize connection logging
2025-06-05 13:58:49 -07:00
Cliff Hall
cf07937f8e
Merge branch 'main' into normalize-connection-logging 2025-06-05 16:55:27 -04:00
evalstate
38e0776193 Merge remote-tracking branch 'upstream/main' 2025-06-05 14:32:24 +01:00
Marc Abramowitz
2ecfdb0f2e Display tooltip only if sseUrl is set. 2025-06-05 00:25:18 -07:00
Ola Hungerford
e28e08d37d
Merge branch 'main' into fix-required 2025-06-04 19:59:52 -07:00
Ola Hungerford
a2d2cf6f3d
Merge pull request #459 from msabramo/resizable-left-sidebar
Resizable left sidebar
2025-06-04 19:58:59 -07:00
Ola Hungerford
6f80feb0b2
Merge branch 'main' into fix-required 2025-06-04 18:35:50 -07:00
olaservo
7bb76b0ddf Merge branch 'main' of https://github.com/olaservo/inspector 2025-06-04 18:33:09 -07:00
Aaron Powell
37bd103cdb Support for multi-platform builds 2025-06-05 10:30:09 +10:00
Aaron Powell
30a74d734c
Merge branch 'main' into dockerfile 2025-06-05 10:20:00 +10:00
Aaron Powell
676d454457
Merge branch 'modelcontextprotocol:main' into main 2025-06-05 10:18:42 +10:00
Ola Hungerford
798bc1b793
Merge pull request #489 from cliffhall/bump-version-0.14.0 0.14.0
Bump Inspector to 0.14.0
2025-06-04 13:46:39 -07:00
cliffhall
8ef91e359e Bump Inspector packages to 0.14.0, and sdk to 1.12.1 2025-06-04 16:13:35 -04:00
olaservo
45c9a7b1d7 Merge branch 'main' of https://github.com/olaservo/inspector 2025-06-04 12:10:59 -07:00
Cliff Hall
4bffa62516
Merge pull request #485 from dr3s/450-template-queries
fix: Resource template query parameters not appended to request URI
2025-06-04 14:58:22 -04:00
Cliff Hall
cc28a891e9
Merge branch 'main' into 450-template-queries 2025-06-04 14:54:57 -04:00
dr3s
9508cc4627 pretty 2025-06-04 14:44:15 -04:00
Cliff Hall
3772ff30a2
Merge pull request #469 from modelcontextprotocol/pcarleton/auth-debugger-draft
[auth] Support new auth metadata endpoint from draft spec
2025-06-04 13:22:08 -04:00
Marc Abramowitz
5da1dc3256 Add tooltip for URL field
A quick way to see the full URL if it's cut off

Inspired by @cliffhall's
[comment](https://github.com/modelcontextprotocol/inspector/pull/459#issuecomment-2932277785)
2025-06-03 22:54:19 -07:00