@fre4x/mcp-inspector 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @fre4x/mcp-inspector
|
|
2
|
+
|
|
3
|
+
MCP server that lets AI agents **connect to, inspect, and test any MCP server at runtime** — no browser required.
|
|
4
|
+
|
|
5
|
+
It wraps the MCP SDK `Client` directly, so an agent can:
|
|
6
|
+
1. **Spawn** a target MCP server (stdio) or connect to a remote one (SSE / Streamable HTTP)
|
|
7
|
+
2. **Maintain a live session** and call multiple operations
|
|
8
|
+
3. **Tear down** the connection when done
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Tools
|
|
13
|
+
|
|
14
|
+
| Tool | Description |
|
|
15
|
+
|------|-------------|
|
|
16
|
+
| `inspector_connect` | Spawn/connect to an MCP server. Returns `session_id`. |
|
|
17
|
+
| `inspector_disconnect` | Close an active session. |
|
|
18
|
+
| `inspector_list_sessions` | List all active sessions with targets. |
|
|
19
|
+
| `inspector_list_tools` | List tools exposed by the connected server. |
|
|
20
|
+
| `inspector_call_tool` | Call a tool and return its result. |
|
|
21
|
+
| `inspector_list_resources` | List resources exposed by the server. |
|
|
22
|
+
| `inspector_read_resource` | Read a resource by URI. |
|
|
23
|
+
| `inspector_list_resource_templates` | List resource URI templates. |
|
|
24
|
+
| `inspector_list_prompts` | List prompts exposed by the server. |
|
|
25
|
+
| `inspector_get_prompt` | Retrieve a rendered prompt with arguments. |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
### Connecting to a stdio server
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
inspector_connect(command="node", server_args=["dist/index.js"])
|
|
35
|
+
→ { session_id: "session-0" }
|
|
36
|
+
|
|
37
|
+
inspector_list_tools(session_id="session-0")
|
|
38
|
+
→ { tools: [...] }
|
|
39
|
+
|
|
40
|
+
inspector_call_tool(session_id="session-0", tool_name="hn_get_top_stories", tool_args={ limit: 5 })
|
|
41
|
+
→ { content: [...] }
|
|
42
|
+
|
|
43
|
+
inspector_disconnect(session_id="session-0")
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Connecting to a remote server
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
inspector_connect(server_url="https://example.com/mcp", transport="http")
|
|
50
|
+
inspector_connect(server_url="https://example.com/sse", transport="sse",
|
|
51
|
+
headers={ "Authorization": "Bearer <token>" })
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Mock Mode
|
|
57
|
+
|
|
58
|
+
Run without any real server:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
MOCK=true npx @fre4x/mcp-inspector
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
All tools return realistic fixture data when `MOCK=true` or `INSPECTOR_MOCK=true`.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Claude Desktop Configuration
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"mcp-inspector": {
|
|
74
|
+
"command": "npx",
|
|
75
|
+
"args": ["-y", "@fre4x/mcp-inspector"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fre4x/mcp-inspector",
|
|
3
|
+
"version": "1.0.15",
|
|
4
|
+
"description": "MCP server wrapping the MCP Inspector CLI — lets AI agents test any MCP server without a browser.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mcp-inspector-server": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "npx esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node",
|
|
15
|
+
"typecheck": "tsc --noEmit",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"dev": "tsx src/index.ts",
|
|
18
|
+
"test": "vitest run --exclude dist",
|
|
19
|
+
"test:watch": "vitest",
|
|
20
|
+
"inspector": "MOCK=true npx @modelcontextprotocol/inspector dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"mcp",
|
|
24
|
+
"mcp-inspector",
|
|
25
|
+
"mcp-server",
|
|
26
|
+
"testing",
|
|
27
|
+
"ai"
|
|
28
|
+
],
|
|
29
|
+
"author": "fritzprix",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/inspector": "^0.21.1",
|
|
33
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
34
|
+
"zod": "^3.24.1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^25.3.0",
|
|
38
|
+
"tsx": "^4.21.0",
|
|
39
|
+
"typescript": "^5.9.3"
|
|
40
|
+
}
|
|
41
|
+
}
|