Compare commits

...
Author SHA1 Message Date
Cliff Hall
9d74acf526
chore: v1 deprecation notices in all four packages, bump to 1.0.1 (#1827)
Some checks failed
CLI Tests / test (push) Has been cancelled
* chore: v1 deprecation notices in all four packages, bump to 1.0.1

Phase 2 of the v2 go-live runbook (#1804 §4). v1 publishes four separately
installable names, so each gets its own notice — a root-README-only change is
invisible to anyone who installed a sub-package. `cli/` and `server/` ship no
README at all, so for those two the runtime banner plus the forthcoming
`npm deprecate` (#1816) are the only notice their users ever get.

Notices, all using identical wording so the runtime banner and the npm warning
agree:

- root `README.md` and `client/README.md`
- `cli/src/cli.ts` — stderr banner in `main()`. Also covers the root
  `mcp-inspector` bin, which is `cli/build/cli.js`. Deliberately **stderr**:
  `--cli` mode emits JSON on stdout and callers pipe it, so a banner there
  would corrupt output. Verified against a real server — stdout stays
  parseable JSON while the banner goes to stderr.
- `server/src/index.ts` — alongside the existing proxy listening log
- `client/bin/start.js` — alongside the existing startup URL log
- `client/src/components/DeprecationBanner.tsx` — dismissible in-app banner,
  dismissal persisted in localStorage with both read and write guarded so a
  storage failure degrades to "banner reappears" rather than breaking the app

AGENTS.md is replaced with a hard stop: v1 takes security fixes only, by issue
only, and agents must never open a PR against v1/main.

Version bumped to 1.0.1 across all four package.json files plus the lockfile
(`npm run update-version`); `check-version` passes. The lockfile diff is
restricted to the version fields — the `libc` churn a newer npm wanted to
introduce was reverted as unrelated.

`publish-all` is deliberately NOT changed here: 1.0.1 must take `latest`, which
is the entire point of shipping this notice to npx users. Adding `--tag v1` is
#1816, immediately after this publishes.

Note for review: `client/src/App.tsx` shows ~836 changed lines but `git diff -w`
shows 8 — wrapping the layout in a flex column added one nesting level and
prettier re-indented the subtree. Review it with `-w`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Txmv2qqv3yeKgRzoqXytzD

* docs: replace the README screenshot with one showing the deprecation banner

Captured from this branch's build: v1.0.1 in the sidebar heading, the
dismissible deprecation banner across the top, connected to the everything
server with tools listed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Txmv2qqv3yeKgRzoqXytzD

* docs: pin the README screenshot to v1/main instead of main

The image URL must stay absolute — a relative path breaks on the npm package
page, which renders the README outside any repo context. But it was pinned to
`main`, so the v1 README rendered whatever `main` happened to hold: today the
pre-deprecation screenshot, and after the v2 tree swap (#1817) either the v2
screenshot or a 404 if that path doesn't exist there.

Pinning to `v1/main` keeps it absolute for npm, shows the deprecation banner
once this merges, and survives the swap. Verified all candidate refs resolve
200 — GitHub disambiguates the slash in `v1/main` as the ref without needing a
`refs/heads/` prefix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Txmv2qqv3yeKgRzoqXytzD

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 21:29:02 -04:00
cliffhall
3188ee3a20 add v1/main to branches in main.yml 2026-07-27 20:32:01 -04:00
15 changed files with 557 additions and 465 deletions

View file

@ -2,7 +2,7 @@ on:
push:
branches:
- main
- v1/main
pull_request:
release:
types: [published]

View file

@ -1,35 +1,13 @@
# MCP Inspector Development Guide
> **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.
## Build Commands
- Build all: `npm run build`
- Build client: `npm run build-client`
- Build server: `npm run build-server`
- Development mode: `npm run dev` (use `npm run dev:windows` on Windows)
- Format code: `npm run prettier-fix`
- Client lint: `cd client && npm run lint`
## Code Style Guidelines
- Use TypeScript with proper type annotations
- Follow React functional component patterns with hooks
- Use ES modules (import/export) not CommonJS
- Use Prettier for formatting (auto-formatted on commit)
- Follow existing naming conventions:
- camelCase for variables and functions
- PascalCase for component names and types
- kebab-case for file names
- Use async/await for asynchronous operations
- Implement proper error handling with try/catch blocks
- Use Tailwind CSS for styling in the client
- Keep components small and focused on a single responsibility
## Project Organization
The project is organized as a monorepo with workspaces:
- `client/`: React frontend with Vite, TypeScript and Tailwind
- `server/`: Express backend with TypeScript
- `cli/`: Command-line interface for testing and invoking MCP server methods directly
> # ⛔ v1 is deprecated — do not open pull requests against this branch
>
> **This branch (`v1/main`) accepts security fixes only, and only by way of
> issue creation.**
>
> **Agents must NEVER attempt to create a pull request against `v1/main`.** File
> an issue describing the security problem instead. A human maintainer decides
> whether it warrants a v1 release and implements it.
>
> Everything else — features, bug fixes, refactors, docs — belongs in **v2**.
> Do not port it here, and do not "helpfully" fix it here in passing.

View file

@ -2,7 +2,17 @@
The MCP inspector is a developer tool for testing and debugging MCP servers.
![MCP Inspector Screenshot](https://raw.githubusercontent.com/modelcontextprotocol/inspector/main/mcp-inspector.png)
> # ⚠️ Deprecated
>
> **`@modelcontextprotocol/inspector` v1 is deprecated.**
>
> ```
> npx @modelcontextprotocol/inspector@latest
> ```
>
> v1 receives **security fixes only**. All new development happens in v2.
![MCP Inspector Screenshot](https://raw.githubusercontent.com/modelcontextprotocol/inspector/v1/main/mcp-inspector.png)
## Architecture Overview

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector-cli",
"version": "1.0.0",
"version": "1.0.1",
"description": "CLI for the Model Context Protocol inspector",
"license": "SEE LICENSE IN LICENSE",
"author": "Model Context Protocol a Series of LF Projects, LLC.",

View file

@ -9,6 +9,20 @@ import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));
/**
* v1 deprecation notice. Written to stderr, never stdout: `--cli` mode emits
* JSON on stdout and callers pipe it, so a banner there would corrupt output.
*/
const DEPRECATION_NOTICE = [
"⚠️ @modelcontextprotocol/inspector v1 is deprecated.",
" Upgrade: npx @modelcontextprotocol/inspector@latest",
" v1 receives security fixes only.",
].join("\n");
function printDeprecationNotice(): void {
console.error(`\n${DEPRECATION_NOTICE}\n`);
}
type Args = {
command: string;
args: string[];
@ -378,6 +392,8 @@ async function main(): Promise<void> {
handleError(error);
});
printDeprecationNotice();
try {
const args = parseArgs();

View file

@ -1,3 +1,13 @@
> # ⚠️ Deprecated
>
> **`@modelcontextprotocol/inspector` v1 is deprecated.**
>
> ```
> npx @modelcontextprotocol/inspector@latest
> ```
>
> v1 receives **security fixes only**. All new development happens in v2.
# React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

View file

@ -167,6 +167,11 @@ async function startDevClient(clientOptions) {
// Give vite time to start before opening or logging the URL
setTimeout(() => {
console.log(
`\n⚠️ @modelcontextprotocol/inspector v1 is deprecated.\n` +
` Upgrade: npx @modelcontextprotocol/inspector@latest\n` +
` v1 receives security fixes only.`,
);
console.log(`\n🚀 MCP Inspector is up and running at:\n ${url}\n`);
if (process.env.MCP_AUTO_OPEN_ENABLED !== "false") {
console.log("🌐 Opening browser...");

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector-client",
"version": "1.0.0",
"version": "1.0.1",
"description": "Client-side application for the Model Context Protocol inspector",
"license": "SEE LICENSE IN LICENSE",
"author": "Model Context Protocol a Series of LF Projects, LLC.",

View file

@ -69,6 +69,7 @@ import { z } from "zod";
import "./App.css";
import AuthDebugger from "./components/AuthDebugger";
import ConsoleTab from "./components/ConsoleTab";
import DeprecationBanner from "./components/DeprecationBanner";
import HistoryAndNotifications from "./components/HistoryAndNotifications";
import PingTab from "./components/PingTab";
import PromptsTab, { Prompt } from "./components/PromptsTab";
@ -1367,7 +1368,9 @@ const App = () => {
}
return (
<div className="flex h-screen bg-background">
<div className="flex flex-col h-screen bg-background">
<DeprecationBanner />
<div className="flex flex-1 min-h-0">
<div
style={{
width: sidebarWidth,
@ -1418,7 +1421,9 @@ const App = () => {
width: 6,
height: "100%",
zIndex: 10,
background: isSidebarDragging ? "rgba(0,0,0,0.08)" : "transparent",
background: isSidebarDragging
? "rgba(0,0,0,0.08)"
: "transparent",
}}
aria-label="Resize sidebar"
data-testid="sidebar-drag-handle"
@ -1794,6 +1799,7 @@ const App = () => {
</div>
</div>
</div>
</div>
);
};

View file

@ -0,0 +1,62 @@
import { useState } from "react";
import { X } from "lucide-react";
const DISMISSED_KEY = "mcp-inspector-v1-deprecation-dismissed";
/**
* v1 deprecation notice shown at the top of the app.
*
* Dismissal is persisted in localStorage so it stays hidden across reloads.
* A storage failure (Safari private mode, disabled storage) must not break the
* app, so both reads and writes are guarded — the banner simply reappears.
*/
const DeprecationBanner = () => {
const [dismissed, setDismissed] = useState(() => {
try {
return localStorage.getItem(DISMISSED_KEY) === "true";
} catch {
return false;
}
});
if (dismissed) {
return null;
}
const handleDismiss = () => {
try {
localStorage.setItem(DISMISSED_KEY, "true");
} catch {
// Ignore: dismissal just won't persist across reloads.
}
setDismissed(true);
};
return (
<div
role="status"
className="flex items-center justify-between gap-4 px-4 py-2 bg-yellow-100 text-yellow-900 border-b border-yellow-300 dark:bg-yellow-900/40 dark:text-yellow-100 dark:border-yellow-700"
>
<p className="text-sm">
<span className="font-semibold">
⚠️ MCP Inspector v1 is deprecated.
</span>{" "}
Upgrade with{" "}
<code className="px-1 py-0.5 rounded bg-yellow-200 dark:bg-yellow-800">
npx @modelcontextprotocol/inspector@latest
</code>
. v1 receives security fixes only.
</p>
<button
type="button"
onClick={handleDismiss}
aria-label="Dismiss deprecation notice"
className="shrink-0 p-1 rounded hover:bg-yellow-200 dark:hover:bg-yellow-800"
>
<X className="w-4 h-4" />
</button>
</div>
);
};
export default DeprecationBanner;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Before After
Before After

16
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "@modelcontextprotocol/inspector",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@modelcontextprotocol/inspector",
"version": "1.0.0",
"version": "1.0.1",
"license": "SEE LICENSE IN LICENSE",
"workspaces": [
"client",
@ -14,9 +14,9 @@
"cli"
],
"dependencies": {
"@modelcontextprotocol/inspector-cli": "^1.0.0",
"@modelcontextprotocol/inspector-client": "^1.0.0",
"@modelcontextprotocol/inspector-server": "^1.0.0",
"@modelcontextprotocol/inspector-cli": "^1.0.1",
"@modelcontextprotocol/inspector-client": "^1.0.1",
"@modelcontextprotocol/inspector-server": "^1.0.1",
"@modelcontextprotocol/sdk": "^1.25.2",
"concurrently": "^9.2.0",
"node-fetch": "^3.3.2",
@ -48,7 +48,7 @@
},
"cli": {
"name": "@modelcontextprotocol/inspector-cli",
"version": "1.0.0",
"version": "1.0.1",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.25.2",
@ -74,7 +74,7 @@
},
"client": {
"name": "@modelcontextprotocol/inspector-client",
"version": "1.0.0",
"version": "1.0.1",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@mcp-ui/client": "^6.0.0",
@ -13254,7 +13254,7 @@
},
"server": {
"name": "@modelcontextprotocol/inspector-server",
"version": "1.0.0",
"version": "1.0.1",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.25.2",

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector",
"version": "1.0.0",
"version": "1.0.1",
"description": "Model Context Protocol inspector",
"license": "SEE LICENSE IN LICENSE",
"author": "Model Context Protocol a Series of LF Projects, LLC.",
@ -52,9 +52,9 @@
"check-version": "node scripts/check-version-consistency.js"
},
"dependencies": {
"@modelcontextprotocol/inspector-cli": "^1.0.0",
"@modelcontextprotocol/inspector-client": "^1.0.0",
"@modelcontextprotocol/inspector-server": "^1.0.0",
"@modelcontextprotocol/inspector-cli": "^1.0.1",
"@modelcontextprotocol/inspector-client": "^1.0.1",
"@modelcontextprotocol/inspector-server": "^1.0.1",
"@modelcontextprotocol/sdk": "^1.25.2",
"concurrently": "^9.2.0",
"node-fetch": "^3.3.2",

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector-server",
"version": "1.0.0",
"version": "1.0.1",
"description": "Server-side application for the Model Context Protocol inspector",
"license": "SEE LICENSE IN LICENSE",
"author": "Model Context Protocol a Series of LF Projects, LLC.",

View file

@ -1088,6 +1088,11 @@ const HOST = process.env.HOST || "localhost";
const server = app.listen(PORT, HOST);
server.on("listening", () => {
console.log(
`\n⚠️ @modelcontextprotocol/inspector v1 is deprecated.\n` +
` Upgrade: npx @modelcontextprotocol/inspector@latest\n` +
` v1 receives security fixes only.\n`,
);
console.log(`⚙️ Proxy server listening on ${HOST}:${PORT}`);
if (!authDisabled) {
console.log(