Skip to content

Commit 8ff82d7

Browse files
Merge pull request modelcontextprotocol#30 from modelcontextprotocol/justin/npm
Switch to `npm`
2 parents b4c70ed + 69a4a74 commit 8ff82d7

Some content is hidden

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

99 files changed

+5921
-22356
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
yarn.lock linguist-generated=true
2-
packages/**/* linguist-generated=true
1+
package-lock.json linguist-generated=true

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 18
18+
cache: npm
19+
20+
- uses: actions/checkout@v4
21+
with:
22+
repository: modelcontextprotocol/typescript-sdk
23+
ssh-key: ${{ secrets.TYPESCRIPT_SDK_KEY }}
24+
path: packages/@modelcontextprotocol/sdk
25+
26+
- run: npm ci
27+
working-directory: packages/@modelcontextprotocol/sdk
28+
29+
- run: npm pack
30+
working-directory: packages/@modelcontextprotocol/sdk
31+
32+
- run: npm install --save packages/@modelcontextprotocol/sdk/modelcontextprotocol-sdk-*.tgz
33+
34+
# Working around https://github.com/npm/cli/issues/4828
35+
# - run: npm ci
36+
- run: npm install --no-package-lock
37+
- run: npm run build

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ The MCP inspector is a developer tool for testing and debugging MCP servers.
55
Setup:
66

77
```bash
8-
yarn
8+
npm install
99
```
1010

1111
You can run it in dev mode via:
1212

1313
```bash
14-
yarn dev
14+
npm run dev
1515
```
1616

1717
This will start both the client and server.
1818

1919
To run in production mode:
2020

2121
```bash
22-
yarn build
23-
yarn start
22+
npm run build
23+
npm start
2424
```

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13+
"@modelcontextprotocol/sdk": "*",
1314
"@radix-ui/react-icons": "^1.3.0",
1415
"@radix-ui/react-label": "^2.1.0",
1516
"@radix-ui/react-select": "^2.1.2",
@@ -18,7 +19,6 @@
1819
"class-variance-authority": "^0.7.0",
1920
"clsx": "^2.1.1",
2021
"lucide-react": "^0.447.0",
21-
"mcp-typescript": "file:../packages/mcp-typescript",
2222
"react": "^18.3.1",
2323
"react-dom": "^18.3.1",
2424
"tailwind-merge": "^2.5.3",

client/src/App.tsx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
import { Client } from "mcp-typescript/client/index.js";
2-
import { SSEClientTransport } from "mcp-typescript/client/sse.js";
1+
import { Button } from "@/components/ui/button";
2+
import { Input } from "@/components/ui/input";
33
import {
4-
ListResourcesResultSchema,
4+
Select,
5+
SelectContent,
6+
SelectItem,
7+
SelectTrigger,
8+
SelectValue,
9+
} from "@/components/ui/select";
10+
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
11+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
12+
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
13+
import {
14+
CallToolResultSchema,
15+
ClientRequest,
16+
EmptyResultSchema,
517
GetPromptResultSchema,
18+
ListPromptsResultSchema,
19+
ListResourcesResultSchema,
620
ListToolsResultSchema,
21+
ProgressNotificationSchema,
722
ReadResourceResultSchema,
8-
CallToolResultSchema,
9-
ListPromptsResultSchema,
1023
Resource,
11-
Tool,
12-
ClientRequest,
13-
ProgressNotificationSchema,
1424
ServerNotification,
15-
EmptyResultSchema,
16-
} from "mcp-typescript/types.js";
17-
import { useState, useRef, useEffect } from "react";
25+
Tool,
26+
} from "@modelcontextprotocol/sdk/types.js";
1827
import {
19-
Send,
20-
Terminal,
21-
Files,
2228
Bell,
23-
MessageSquare,
29+
Files,
2430
Hammer,
31+
MessageSquare,
2532
Play,
33+
Send,
34+
Terminal,
2635
} from "lucide-react";
27-
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
28-
import { Input } from "@/components/ui/input";
29-
import { Button } from "@/components/ui/button";
30-
import {
31-
Select,
32-
SelectContent,
33-
SelectItem,
34-
SelectTrigger,
35-
SelectValue,
36-
} from "@/components/ui/select";
36+
import { useEffect, useRef, useState } from "react";
3737

38+
import { AnyZodObject } from "zod";
39+
import "./App.css";
3840
import ConsoleTab from "./components/ConsoleTab";
39-
import Sidebar from "./components/Sidebar";
41+
import HistoryAndNotifications from "./components/History";
42+
import PingTab from "./components/PingTab";
43+
import PromptsTab, { Prompt } from "./components/PromptsTab";
4044
import RequestsTab from "./components/RequestsTabs";
4145
import ResourcesTab from "./components/ResourcesTab";
42-
import PromptsTab, { Prompt } from "./components/PromptsTab";
46+
import Sidebar from "./components/Sidebar";
4347
import ToolsTab from "./components/ToolsTab";
44-
import { AnyZodObject } from "zod";
45-
import HistoryAndNotifications from "./components/History";
46-
import "./App.css";
47-
import PingTab from "./components/PingTab";
4848

4949
const App = () => {
5050
const [connectionStatus, setConnectionStatus] = useState<

client/src/components/History.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { useState } from "react";
1+
import { ServerNotification } from "@modelcontextprotocol/sdk/types.js";
22
import { Copy } from "lucide-react";
3-
import { ServerNotification } from "mcp-typescript/types.js";
3+
import { useState } from "react";
44

55
const HistoryAndNotifications = ({
66
requestHistory,

client/src/components/PromptsTab.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { AlertCircle } from "lucide-react";
2-
import { Button } from "@/components/ui/button";
31
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
4-
import { TabsContent } from "@/components/ui/tabs";
2+
import { Button } from "@/components/ui/button";
53
import { Input } from "@/components/ui/input";
4+
import { Label } from "@/components/ui/label";
5+
import { TabsContent } from "@/components/ui/tabs";
66
import { Textarea } from "@/components/ui/textarea";
7+
import { ListPromptsResult } from "@modelcontextprotocol/sdk/types.js";
8+
import { AlertCircle } from "lucide-react";
79
import { useState } from "react";
8-
import { Label } from "@/components/ui/label";
910
import ListPane from "./ListPane";
10-
import { ListPromptsResult } from "mcp-typescript/types.js";
1111

1212
export type Prompt = {
1313
name: string;

client/src/components/ResourcesTab.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { FileText, ChevronRight, AlertCircle, RefreshCw } from "lucide-react";
2-
import { Button } from "@/components/ui/button";
31
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
2+
import { Button } from "@/components/ui/button";
43
import { TabsContent } from "@/components/ui/tabs";
5-
import { ListResourcesResult, Resource } from "mcp-typescript/types.js";
4+
import { ListResourcesResult, Resource } from "@modelcontextprotocol/sdk/types.js";
5+
import { AlertCircle, ChevronRight, FileText, RefreshCw } from "lucide-react";
66
import ListPane from "./ListPane";
77

88
const ResourcesTab = ({

client/src/components/ToolsTab.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { TabsContent } from "@/components/ui/tabs";
1+
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
22
import { Button } from "@/components/ui/button";
33
import { Input } from "@/components/ui/input";
4-
import { Send, AlertCircle } from "lucide-react";
5-
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
6-
import { ListToolsResult, Tool } from "mcp-typescript/types.js";
7-
import { useState } from "react";
84
import { Label } from "@/components/ui/label";
5+
import { TabsContent } from "@/components/ui/tabs";
6+
import { ListToolsResult, Tool } from "@modelcontextprotocol/sdk/types.js";
7+
import { AlertCircle, Send } from "lucide-react";
8+
import { useState } from "react";
99
import ListPane from "./ListPane";
1010

1111
const ToolsTab = ({

0 commit comments

Comments
 (0)