Skip to content

Commit a5d5593

Browse files
Merge branch 'main' into meta_properies_in_tools
2 parents a45247a + 452d8dd commit a5d5593

File tree

19 files changed

+184
-53
lines changed

19 files changed

+184
-53
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. See [CONTRIBUTING.md](CONTRIBUTING.md) for information about V2 development.

.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. See [CONTRIBUTING.md](CONTRIBUTING.md) for information about V2 development.
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/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

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. These guidelines apply to the current version (V1). See [CONTRIBUTING.md](CONTRIBUTING.md) for information about V2 development.
4+
35
## Build Commands
46

57
- Build all: `npm run build`

CONTRIBUTING.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ 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+
- Critical issues are actively maintained
19+
- Small UX improvements are welcome
20+
- Documentation updates are always appreciated
21+
- Major changes will be directed to V2 development
22+
1223
## Development Process & Pull Requests
1324

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

3142
## Questions?
3243

33-
Feel free to [open an issue](https://github.com/modelcontextprotocol/mcp-inspector/issues) for questions or create a discussion for general topics.
44+
Feel free to [open an issue](https://github.com/modelcontextprotocol/mcp-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.
3445

3546
## License
3647

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-cli",
3-
"version": "0.17.2",
3+
"version": "0.17.3",
44
"description": "CLI for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-client",
3-
"version": "0.17.2",
3+
"version": "0.17.3",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

client/src/components/DynamicJsonForm.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ const DynamicJsonForm = forwardRef<DynamicJsonFormRef, DynamicJsonFormProps>(
113113
setJsonError(errorMessage);
114114

115115
// Reset to default for clearly invalid JSON (not just incomplete typing)
116-
const trimmed = jsonString.trim();
117-
if (trimmed.length > 5 && !trimmed.match(/^[\s[{]/)) {
116+
const trimmed = jsonString?.trim();
117+
if (trimmed && trimmed.length > 5 && !trimmed.match(/^[\s[{]/)) {
118118
onChange(generateDefaultValue(schema));
119119
}
120120
}
@@ -155,7 +155,7 @@ const DynamicJsonForm = forwardRef<DynamicJsonFormRef, DynamicJsonFormProps>(
155155

156156
const formatJson = () => {
157157
try {
158-
const jsonStr = rawJsonValue.trim();
158+
const jsonStr = rawJsonValue?.trim();
159159
if (!jsonStr) {
160160
return;
161161
}
@@ -171,7 +171,7 @@ const DynamicJsonForm = forwardRef<DynamicJsonFormRef, DynamicJsonFormProps>(
171171
const validateJson = () => {
172172
if (!isJsonMode) return { isValid: true, error: null };
173173
try {
174-
const jsonStr = rawJsonValue.trim();
174+
const jsonStr = rawJsonValue?.trim();
175175
if (!jsonStr) return { isValid: true, error: null };
176176
const parsed = JSON.parse(jsonStr);
177177
// Clear any pending debounced update and immediately update parent

client/src/components/ToolsTab.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,18 @@ const ToolsTab = ({
225225
...params,
226226
[key]: checked
227227
? null
228-
: prop.default !== null
229-
? prop.default
230-
: prop.type === "boolean"
231-
? false
232-
: prop.type === "string"
233-
? ""
234-
: prop.type === "number" ||
235-
prop.type === "integer"
236-
? undefined
237-
: undefined,
228+
: prop.type === "array"
229+
? undefined
230+
: prop.default !== null
231+
? prop.default
232+
: prop.type === "boolean"
233+
? false
234+
: prop.type === "string"
235+
? ""
236+
: prop.type === "number" ||
237+
prop.type === "integer"
238+
? undefined
239+
: undefined,
238240
})
239241
}
240242
/>

client/src/lib/auth.ts

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,40 @@ export const clearClientInformationFromSessionStorage = ({
102102
sessionStorage.removeItem(key);
103103
};
104104

105+
export const getScopeFromSessionStorage = (
106+
serverUrl: string,
107+
): string | undefined => {
108+
const key = getServerSpecificKey(SESSION_KEYS.SCOPE, serverUrl);
109+
const value = sessionStorage.getItem(key);
110+
return value || undefined;
111+
};
112+
113+
export const saveScopeToSessionStorage = (
114+
serverUrl: string,
115+
scope: string | undefined,
116+
) => {
117+
const key = getServerSpecificKey(SESSION_KEYS.SCOPE, serverUrl);
118+
if (scope) {
119+
sessionStorage.setItem(key, scope);
120+
} else {
121+
sessionStorage.removeItem(key);
122+
}
123+
};
124+
125+
export const clearScopeFromSessionStorage = (serverUrl: string) => {
126+
const key = getServerSpecificKey(SESSION_KEYS.SCOPE, serverUrl);
127+
sessionStorage.removeItem(key);
128+
};
129+
105130
export class InspectorOAuthClientProvider implements OAuthClientProvider {
106-
constructor(
107-
protected serverUrl: string,
108-
scope?: string,
109-
) {
110-
this.scope = scope;
131+
constructor(protected serverUrl: string) {
111132
// Save the server URL to session storage
112133
sessionStorage.setItem(SESSION_KEYS.SERVER_URL, serverUrl);
113134
}
114-
scope: string | undefined;
135+
136+
get scope(): string | undefined {
137+
return getScopeFromSessionStorage(this.serverUrl);
138+
}
115139

116140
get redirectUrl() {
117141
return window.location.origin + "/oauth/callback";

0 commit comments

Comments
 (0)