@getmocked/mcp 0.2.0
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 +110 -0
- package/bin/cli.js +38204 -0
- package/bin/cli.js.map +7 -0
- package/index.js +36770 -0
- package/index.js.map +7 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# @getmocked/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for [GetMocked](https://getmocked.ai) — create, manage, and test mock APIs from natural language.
|
|
4
|
+
|
|
5
|
+
Works with Claude Code, Cursor, Windsurf, VS Code Copilot, and any MCP-compatible client.
|
|
6
|
+
|
|
7
|
+
## Quick Start (Claude Code)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @getmocked/mcp login
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This opens a browser to sign in. After authenticating:
|
|
14
|
+
- Credentials are stored locally
|
|
15
|
+
- The MCP server is registered globally (works in all projects)
|
|
16
|
+
- Tool permissions are pre-approved (no per-tool prompts)
|
|
17
|
+
|
|
18
|
+
Restart Claude Code and you're ready to go.
|
|
19
|
+
|
|
20
|
+
## Setup for Other Clients
|
|
21
|
+
|
|
22
|
+
### Cursor
|
|
23
|
+
|
|
24
|
+
Add to `.cursor/mcp.json`:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"getmocked": {
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": ["@getmocked/mcp"]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### VS Code (Copilot)
|
|
38
|
+
|
|
39
|
+
Add to `.vscode/settings.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcp": {
|
|
44
|
+
"servers": {
|
|
45
|
+
"getmocked": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["@getmocked/mcp"]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Windsurf
|
|
55
|
+
|
|
56
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"getmocked": {
|
|
62
|
+
"command": "npx",
|
|
63
|
+
"args": ["@getmocked/mcp"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Manual / Other Clients
|
|
70
|
+
|
|
71
|
+
Run `npx @getmocked/mcp login` first to authenticate, then configure your client to run `npx @getmocked/mcp` as a stdio MCP server.
|
|
72
|
+
|
|
73
|
+
## Available Tools
|
|
74
|
+
|
|
75
|
+
| Tool | Description |
|
|
76
|
+
|------|-------------|
|
|
77
|
+
| `create_mock_api` | Create a mock API from a natural language description |
|
|
78
|
+
| `list_mock_apis` | List all your mock APIs |
|
|
79
|
+
| `get_mock_api` | Get details of a specific mock API |
|
|
80
|
+
| `update_mock_api` | Update name, description, or schemas using AI |
|
|
81
|
+
| `test_mock_api` | Execute a mock API and see sample response |
|
|
82
|
+
| `delete_mock_api` | Delete a mock API |
|
|
83
|
+
| `create_mock_project` | Create a multi-API project from a description |
|
|
84
|
+
| `list_mock_projects` | List all your mock projects |
|
|
85
|
+
| `get_mock_project` | Get project details with all APIs |
|
|
86
|
+
| `add_api_to_project` | Add a new API to an existing project |
|
|
87
|
+
| `delete_mock_project` | Delete a mock project |
|
|
88
|
+
|
|
89
|
+
## CLI Commands
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx @getmocked/mcp login # Sign in and auto-configure
|
|
93
|
+
npx @getmocked/mcp status # Check authentication status
|
|
94
|
+
npx @getmocked/mcp logout # Clear stored credentials
|
|
95
|
+
npx @getmocked/mcp --help # Show help
|
|
96
|
+
npx @getmocked/mcp --version # Show version
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Authentication
|
|
100
|
+
|
|
101
|
+
You can authenticate in two ways:
|
|
102
|
+
|
|
103
|
+
1. **Interactive login** (recommended): `npx @getmocked/mcp login`
|
|
104
|
+
2. **API key**: Set the `GETMOCKED_API_KEY` environment variable
|
|
105
|
+
|
|
106
|
+
Credentials are stored in `~/.getmocked/credentials.json`.
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT
|