Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 11 additions & 33 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
16 changes: 16 additions & 0 deletions cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down Expand Up @@ -378,6 +392,8 @@ async function main(): Promise<void> {
handleError(error);
});

printDeprecationNotice();

try {
const args = parseArgs();

Expand Down
10 changes: 10 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 5 additions & 0 deletions client/bin/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -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...");
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
Loading