Skip to content

Commit 8cb8457

Browse files
authored
Merge branch 'main' into inspector/error-popup
2 parents 68788fc + 4a4968f commit 8cb8457

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+7119
-2488
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ If applicable, add screenshots to help explain your problem.
3434

3535
**Additional context**
3636
Add any other context about the problem here.
37+
38+
**Version Consideration**
39+
40+
Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on **bug fixes and MCP spec compliance**. See [CONTRIBUTING.md](../../CONTRIBUTING.md) for more details.

.github/pull_request_template.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## Summary
2+
3+
<!-- Provide a brief description of what this PR does -->
4+
5+
> **Note:** Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on **bug fixes and MCP spec compliance**. See [CONTRIBUTING.md](../CONTRIBUTING.md) for more details.
6+
7+
## Type of Change
8+
9+
<!-- Mark the relevant option with an "x" -->
10+
11+
- [ ] Bug fix (non-breaking change that fixes an issue)
12+
- [ ] New feature (non-breaking change that adds functionality)
13+
- [ ] Documentation update
14+
- [ ] Refactoring (no functional changes)
15+
- [ ] Test updates
16+
- [ ] Build/CI improvements
17+
18+
## Changes Made
19+
20+
<!-- Describe the changes in detail. Include screenshots/recordings if applicable -->
21+
22+
## Related Issues
23+
24+
<!-- Link to related issues using #issue_number or "Fixes #issue_number" -->
25+
26+
## Testing
27+
28+
<!-- Describe how you tested these changes, where applicable -->
29+
30+
- [ ] Tested in UI mode
31+
- [ ] Tested in CLI mode
32+
- [ ] Tested with STDIO transport
33+
- [ ] Tested with SSE transport
34+
- [ ] Tested with Streamable HTTP transport
35+
- [ ] Added/updated automated tests
36+
- [ ] Manual testing performed
37+
38+
### Test Results and/or Instructions
39+
40+
<!-- Provide steps for reviewers to test your changes -->
41+
42+
Screenshots are encouraged to share your testing results for this change.
43+
44+
## Checklist
45+
46+
- [ ] Code follows the style guidelines (ran `npm run prettier-fix`)
47+
- [ ] Self-review completed
48+
- [ ] Code is commented where necessary
49+
- [ ] Documentation updated (README, comments, etc.)
50+
51+
## Breaking Changes
52+
53+
<!-- If this is a breaking change, describe the impact and migration path -->
54+
55+
## Additional Context
56+
57+
<!-- Add any other context, screenshots, or information about the PR here -->

.github/workflows/claude.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,48 @@ jobs:
2727
id-token: write
2828
actions: read
2929
steps:
30+
- name: Get PR details
31+
if: |
32+
(github.event_name == 'issue_comment' && github.event.issue.pull_request) ||
33+
github.event_name == 'pull_request_review_comment' ||
34+
github.event_name == 'pull_request_review'
35+
id: pr
36+
uses: actions/github-script@v7
37+
with:
38+
script: |
39+
let prNumber;
40+
if (context.eventName === 'issue_comment') {
41+
prNumber = context.issue.number;
42+
} else {
43+
prNumber = context.payload.pull_request.number;
44+
}
45+
46+
const pr = await github.rest.pulls.get({
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
pull_number: prNumber
50+
});
51+
52+
core.setOutput('sha', pr.data.head.sha);
53+
core.setOutput('repo', pr.data.head.repo.full_name);
54+
55+
- name: Checkout PR branch
56+
if: steps.pr.outcome == 'success'
57+
uses: actions/checkout@v4
58+
with:
59+
ref: ${{ steps.pr.outputs.sha }}
60+
repository: ${{ steps.pr.outputs.repo }}
61+
fetch-depth: 0
62+
3063
- name: Checkout repository
64+
if: steps.pr.outcome != 'success'
3165
uses: actions/checkout@v4
3266
with:
33-
fetch-depth: 1
67+
fetch-depth: 0
3468

3569
- name: Run Claude Code
3670
id: claude
37-
uses: anthropics/claude-code-action@beta
71+
uses: anthropics/claude-code-action@v1
3872
with:
3973
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
4074

@@ -45,9 +79,6 @@ jobs:
4579
# Trigger when assigned to an issue
4680
assignee_trigger: "claude"
4781

48-
# Allow Claude to run bash
49-
# This should be safe given the repo is already public
50-
allowed_tools: "Bash"
51-
52-
custom_instructions: |
53-
If posting a comment to GitHub, give a concise summary of the comment at the top and put all the details in a <details> block.
82+
claude_args: |
83+
--allowedTools Bash
84+
--system-prompt "If posting a comment to GitHub, give a concise summary of the comment at the top and put all the details in a <details> block."

.github/workflows/e2e_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
test:
11-
# Installing Playright dependencies can take quite awhile, and also depends on GitHub CI load.
11+
# Installing Playwright dependencies can take quite awhile, and also depends on GitHub CI load.
1212
timeout-minutes: 15
1313
runs-on: ubuntu-latest
1414

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ client/tsconfig.node.tsbuildinfo
1010
cli/build
1111
test-output
1212
tool-test-output
13+
metadata-test-output
1314
# symlinked by `npm run link:sdk`:
1415
sdk
1516
client/playwright-report/

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# MCP Inspector Development Guide
22

3+
> **Note:** Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on **bug fixes and MCP spec compliance**. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
4+
35
## Build Commands
46

57
- Build all: `npm run build`

CONTRIBUTING.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ Thanks for your interest in contributing! This guide explains how to get involve
99
3. Run `npm run dev` to start both client and server in development mode
1010
4. Use the web UI at http://localhost:6274 to interact with the inspector
1111

12+
## Inspector V2 Development
13+
14+
We're actively developing **Inspector V2** to address architectural and UX improvements. We invite you to follow progress and participate in the Inspector V2 Working Group in [Discord](https://modelcontextprotocol.io/community/communication), [weekly meetings](https://meet.modelcontextprotocol.io/tag/inspector-v2-wg), and [GitHub Discussions](https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/categories/meeting-notes-other) (where notes are posted after meetings).
15+
16+
**Current version (V1) contribution scope:**
17+
18+
- Bug fixes and MCP spec compliance are actively maintained
19+
- Documentation updates are always appreciated
20+
- Major changes will be directed to V2 development
21+
1222
## Development Process & Pull Requests
1323

1424
1. Create a new branch for your changes
@@ -30,7 +40,7 @@ If you find a security vulnerability, please refer to our [Security Policy](SECU
3040

3141
## Questions?
3242

33-
Feel free to [open an issue](https://github.com/modelcontextprotocol/mcp-inspector/issues) for questions or create a discussion for general topics.
43+
Feel free to [open an issue](https://github.com/modelcontextprotocol/inspector/issues) for questions or join the MCP Contributor [Discord server](https://modelcontextprotocol.io/community/communication). Also, please see notes above on Inspector V2 Development.
3444

3545
## License
3646

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ The server will start up and the UI will be accessible at `http://localhost:6274
3434
You can also start it in a Docker container with the following command:
3535

3636
```bash
37-
docker run --rm --network host -p 6274:6274 -p 6277:6277 ghcr.io/modelcontextprotocol/inspector:latest
37+
docker run --rm \
38+
-p 127.0.0.1:6274:6274 \
39+
-p 127.0.0.1:6277:6277 \
40+
-e HOST=0.0.0.0 \
41+
-e MCP_AUTO_OPEN_ENABLED=false \
42+
ghcr.io/modelcontextprotocol/inspector:latest
3843
```
3944

4045
### From an MCP server repository
@@ -236,13 +241,15 @@ ALLOWED_ORIGINS=http://localhost:6274,http://localhost:8000 npm start
236241

237242
The MCP Inspector supports the following configuration settings. To change them, click on the `Configuration` button in the MCP Inspector UI:
238243

239-
| Setting | Description | Default |
240-
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
241-
| `MCP_SERVER_REQUEST_TIMEOUT` | Timeout for requests to the MCP server (ms) | 10000 |
242-
| `MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS` | Reset timeout on progress notifications | true |
243-
| `MCP_REQUEST_MAX_TOTAL_TIMEOUT` | Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications) | 60000 |
244-
| `MCP_PROXY_FULL_ADDRESS` | Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577 | "" |
245-
| `MCP_AUTO_OPEN_ENABLED` | Enable automatic browser opening when inspector starts (works with authentication enabled). Only as environment var, not configurable in browser. | true |
244+
| Setting | Description | Default |
245+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
246+
| `MCP_SERVER_REQUEST_TIMEOUT` | Client-side timeout (ms) - Inspector will cancel the request if no response is received within this time. Note: servers may have their own timeouts | 300000 |
247+
| `MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS` | Reset timeout on progress notifications | true |
248+
| `MCP_REQUEST_MAX_TOTAL_TIMEOUT` | Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications) | 60000 |
249+
| `MCP_PROXY_FULL_ADDRESS` | Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577 | "" |
250+
| `MCP_AUTO_OPEN_ENABLED` | Enable automatic browser opening when inspector starts (works with authentication enabled). Only as environment var, not configurable in browser. | true |
251+
252+
**Note on Timeouts:** The timeout settings above control when the Inspector (as an MCP client) will cancel requests. These are independent of any server-side timeouts. For example, if a server tool has a 10-minute timeout but the Inspector's timeout is set to 30 seconds, the Inspector will cancel the request after 30 seconds. Conversely, if the Inspector's timeout is 10 minutes but the server times out after 30 seconds, you'll receive the server's timeout error. For tools that require user interaction (like elicitation) or long-running operations, ensure the Inspector's timeout is set appropriately.
246253

247254
These settings can be adjusted in real-time through the UI and will persist across sessions.
248255

@@ -361,7 +368,7 @@ http://localhost:6274/?transport=stdio&serverCommand=npx&serverArgs=arg1%20arg2
361368
You can also set initial config settings via query params, for example:
362369

363370
```
364-
http://localhost:6274/?MCP_SERVER_REQUEST_TIMEOUT=10000&MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS=false&MCP_PROXY_FULL_ADDRESS=http://10.1.1.22:5577
371+
http://localhost:6274/?MCP_SERVER_REQUEST_TIMEOUT=60000&MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS=false&MCP_PROXY_FULL_ADDRESS=http://10.1.1.22:5577
365372
```
366373

367374
Note that if both the query param and the corresponding localStorage item are set, the query param will take precedence.
@@ -456,6 +463,17 @@ npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --me
456463
| **Automation** | N/A | Ideal for CI/CD pipelines, batch processing, and integration with coding assistants |
457464
| **Learning MCP** | Rich visual interface helps new users understand server capabilities | Simplified commands for focused learning of specific endpoints |
458465

466+
## Tool Input Validation Guidelines
467+
468+
When implementing or modifying tool input parameter handling in the Inspector:
469+
470+
- **Omit optional fields with empty values** - When processing form inputs, omit empty strings or null values for optional parameters, UNLESS the field has an explicit default value in the schema that matches the current value
471+
- **Preserve explicit default values** - If a field schema contains an explicit default (e.g., `default: null`), and the current value matches that default, include it in the request. This is a meaningful value the tool expects
472+
- **Always include required fields** - Preserve required field values even when empty, allowing the MCP server to validate and return appropriate error messages
473+
- **Defer deep validation to the server** - Implement basic field presence checking in the Inspector client, but rely on the MCP server for parameter validation according to its schema
474+
475+
These guidelines maintain clean parameter passing and proper separation of concerns between the Inspector client and MCP servers.
476+
459477
## License
460478

461479
This project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.

cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-cli",
3-
"version": "0.17.1",
3+
"version": "0.18.0",
44
"description": "CLI for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -24,7 +24,7 @@
2424
},
2525
"devDependencies": {},
2626
"dependencies": {
27-
"@modelcontextprotocol/sdk": "^1.18.0",
27+
"@modelcontextprotocol/sdk": "^1.25.2",
2828
"commander": "^13.1.0",
2929
"spawn-rx": "^5.1.2"
3030
}

0 commit comments

Comments
 (0)