@stophy/mcp 1.0.5 → 2.0.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/LICENSE +21 -0
- package/README.md +58 -234
- package/dist/index.js +35 -31
- package/package.json +22 -19
- package/dist/http.js +0 -54
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Stophy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,111 +1,84 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Stophy MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Give your AI agent public web data: web search, YouTube, Reddit, TikTok, Instagram, LinkedIn, maps, shopping, jobs, real estate, finance, and more. Your agent reaches every Stophy endpoint through three MCP tools.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Connect to the hosted server
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Most apps can connect to the hosted server directly. There is nothing to install.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
| URL | How you connect | What your agent can use |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `https://api.stophy.dev/mcp` | No key | The free endpoints: web search, YouTube search, and YouTube transcripts |
|
|
12
|
+
| `https://api.stophy.dev/mcp` | `Authorization: Bearer <key>` header | Every endpoint |
|
|
13
|
+
| `https://api.stophy.dev/mcp-oauth` | Sign in with your browser | Every endpoint |
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Get an API key at [stophy.dev/signup](https://stophy.dev/signup).
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
https://mcp.stophy.dev/$STOPHY_API_KEY/mcp
|
|
15
|
-
```
|
|
17
|
+
### Claude Code
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
To sign in with your browser, add the server, then run `/mcp` and choose **Authenticate**:
|
|
18
20
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
"mcpServers": {
|
|
22
|
-
"stophy": {
|
|
23
|
-
"url": "https://mcp.stophy.dev/$STOPHY_API_KEY/mcp"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
21
|
+
```bash
|
|
22
|
+
claude mcp add --transport http stophy https://api.stophy.dev/mcp-oauth
|
|
27
23
|
```
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
To use an API key:
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
```bash
|
|
28
|
+
claude mcp add --transport http stophy https://api.stophy.dev/mcp --header "Authorization: Bearer <key>"
|
|
29
|
+
```
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
To start without a key:
|
|
36
32
|
|
|
37
33
|
```bash
|
|
38
|
-
|
|
34
|
+
claude mcp add --transport http stophy https://api.stophy.dev/mcp
|
|
39
35
|
```
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
### Codex
|
|
38
|
+
|
|
39
|
+
To use the key in your `STOPHY_API_KEY` environment variable:
|
|
42
40
|
|
|
43
41
|
```bash
|
|
44
|
-
|
|
45
|
-
env STOPHY_API_KEY=$STOPHY_API_KEY stophy-mcp
|
|
42
|
+
codex mcp add stophy --url https://api.stophy.dev/mcp --bearer-token-env-var STOPHY_API_KEY
|
|
46
43
|
```
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
To sign in with your browser instead, add the sign-in URL, then log in:
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
```bash
|
|
48
|
+
codex mcp add stophy --url https://api.stophy.dev/mcp-oauth
|
|
49
|
+
codex mcp login stophy
|
|
50
|
+
```
|
|
51
51
|
|
|
52
|
-
###
|
|
52
|
+
### Cursor
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
- macOS: `~/Library/Application Support/Claude/`
|
|
56
|
-
- Windows: `%APPDATA%\Claude\`
|
|
54
|
+
Add this to `.cursor/mcp.json`:
|
|
57
55
|
|
|
58
56
|
```json
|
|
59
57
|
{
|
|
60
58
|
"mcpServers": {
|
|
61
59
|
"stophy": {
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"env": {
|
|
65
|
-
"STOPHY_API_KEY": "your_api_key_here"
|
|
66
|
-
}
|
|
60
|
+
"url": "https://api.stophy.dev/mcp",
|
|
61
|
+
"headers": { "Authorization": "Bearer <key>" }
|
|
67
62
|
}
|
|
68
63
|
}
|
|
69
64
|
}
|
|
70
65
|
```
|
|
71
66
|
|
|
72
|
-
|
|
67
|
+
To start without a key, leave out `headers`.
|
|
73
68
|
|
|
74
|
-
|
|
69
|
+
## Run it as a local server
|
|
75
70
|
|
|
76
|
-
|
|
71
|
+
Some apps can only start a local MCP server. For those, use this package. It runs on your computer and passes every request to the hosted server, so it always has the same tools.
|
|
77
72
|
|
|
78
73
|
```bash
|
|
79
|
-
|
|
74
|
+
npx -y @stophy/mcp
|
|
80
75
|
```
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
claude mcp add --transport http stophy https://mcp.stophy.dev/$STOPHY_API_KEY/mcp
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Cursor
|
|
89
|
-
|
|
90
|
-
File: `.cursor/mcp.json` (per project) or `~/.cursor/mcp.json` (global)
|
|
77
|
+
With `STOPHY_API_KEY` set, your agent can use every endpoint. Without it, your agent gets the free endpoints.
|
|
91
78
|
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
"mcpServers": {
|
|
95
|
-
"stophy": {
|
|
96
|
-
"command": "npx",
|
|
97
|
-
"args": ["-y", "@stophy/mcp"],
|
|
98
|
-
"env": {
|
|
99
|
-
"STOPHY_API_KEY": "$STOPHY_API_KEY"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Windsurf
|
|
79
|
+
### Claude Desktop
|
|
107
80
|
|
|
108
|
-
|
|
81
|
+
Add this to `claude_desktop_config.json`, then restart Claude Desktop:
|
|
109
82
|
|
|
110
83
|
```json
|
|
111
84
|
{
|
|
@@ -113,185 +86,36 @@ File: `~/.codeium/windsurf/mcp_config.json`
|
|
|
113
86
|
"stophy": {
|
|
114
87
|
"command": "npx",
|
|
115
88
|
"args": ["-y", "@stophy/mcp"],
|
|
116
|
-
"env": {
|
|
117
|
-
"STOPHY_API_KEY": "$STOPHY_API_KEY"
|
|
118
|
-
}
|
|
89
|
+
"env": { "STOPHY_API_KEY": "<key>" }
|
|
119
90
|
}
|
|
120
91
|
}
|
|
121
92
|
}
|
|
122
93
|
```
|
|
123
94
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Add to `config.yaml` under `mcp_servers`:
|
|
127
|
-
|
|
128
|
-
```yaml
|
|
129
|
-
mcp_servers:
|
|
130
|
-
- name: stophy
|
|
131
|
-
command: npx
|
|
132
|
-
args: ["-y", "@stophy/mcp"]
|
|
133
|
-
env:
|
|
134
|
-
STOPHY_API_KEY: your_api_key_here
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Any other MCP client
|
|
95
|
+
To start without a key, leave out `env`.
|
|
138
96
|
|
|
139
|
-
|
|
97
|
+
The package needs Node.js 18 or later.
|
|
140
98
|
|
|
141
|
-
|
|
99
|
+
| Variable | What it does |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `STOPHY_API_KEY` | Your Stophy API key. Optional. |
|
|
102
|
+
| `STOPHY_MCP_URL` | The server to connect to. The default is `https://api.stophy.dev/mcp`. |
|
|
142
103
|
|
|
143
|
-
|
|
104
|
+
## Tools
|
|
144
105
|
|
|
145
106
|
| Tool | What it does |
|
|
146
|
-
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
149
|
-
| `
|
|
150
|
-
| `stophy_get_playlist` | Fetch every video in a playlist. |
|
|
151
|
-
| `stophy_get_suggestions` | YouTube autocomplete for a partial query. |
|
|
152
|
-
| `stophy_get_credits` | Your remaining credit balance. Free. |
|
|
153
|
-
|
|
154
|
-
## Tool reference
|
|
155
|
-
|
|
156
|
-
### stophy_search_videos
|
|
157
|
-
|
|
158
|
-
Search YouTube. Use this to discover videos on a topic or find recent uploads. Not for fetching a specific video you already have the URL for — use `stophy_get_video` instead.
|
|
159
|
-
|
|
160
|
-
Arguments:
|
|
161
|
-
- `q` (required): what to search for
|
|
162
|
-
- `type`: `"video"`, `"short"`, `"channel"`, or `"playlist"`
|
|
163
|
-
- `uploadDate`: `"hour"`, `"today"`, `"week"`, `"month"`, or `"year"`
|
|
164
|
-
- `duration`: `"short"`, `"medium"`, or `"long"`
|
|
165
|
-
- `sortBy`: `"relevance"`, `"popularity"`, `"date"`, or `"rating"`
|
|
166
|
-
- `continuationToken`: token from previous response for the next page
|
|
167
|
-
|
|
168
|
-
```json
|
|
169
|
-
{
|
|
170
|
-
"q": "typescript tutorial",
|
|
171
|
-
"uploadDate": "week",
|
|
172
|
-
"type": "video"
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Returns `items[]` and an optional `continuationToken`.
|
|
177
|
-
|
|
178
|
-
### stophy_get_video
|
|
179
|
-
|
|
180
|
-
Get details, transcript, comments, comment replies, or live chat for a known video.
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| `stophy_search_endpoints` | Finds the endpoint for a task, with its cost |
|
|
109
|
+
| `stophy_describe_endpoint` | Shows the input an endpoint takes and whether it has more pages |
|
|
110
|
+
| `stophy_call` | Runs an endpoint and returns markdown, or JSON when you ask for it |
|
|
181
111
|
|
|
182
|
-
|
|
183
|
-
- `videoUrl` (required): YouTube video URL or ID
|
|
184
|
-
- `type` (required): `"details"`, `"transcript"`, `"comments"`, or `"livechat"`
|
|
185
|
-
- `sortBy`: `"top"` or `"latest"` for comments
|
|
186
|
-
- `chatType`: `"top"` or `"live"` for live chat
|
|
187
|
-
- `continuationToken`: next page of comments, or a comment's `repliesToken` for replies
|
|
112
|
+
Your agent usually searches, then describes, then calls. Each result says how many credits it used.
|
|
188
113
|
|
|
189
|
-
|
|
114
|
+
## More
|
|
190
115
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
"videoUrl": "https://youtube.com/watch?v=d56mG7DezGs",
|
|
194
|
-
"type": "transcript"
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Comments:
|
|
199
|
-
|
|
200
|
-
```json
|
|
201
|
-
{
|
|
202
|
-
"videoUrl": "https://youtube.com/watch?v=d56mG7DezGs",
|
|
203
|
-
"type": "comments",
|
|
204
|
-
"sortBy": "top"
|
|
205
|
-
}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
For comment replies, call again with `type: "comments"` and set `continuationToken` to the comment's `repliesToken`.
|
|
209
|
-
|
|
210
|
-
### stophy_get_channel
|
|
211
|
-
|
|
212
|
-
Browse a channel.
|
|
213
|
-
|
|
214
|
-
Arguments:
|
|
215
|
-
- `channelUrl` (required): channel URL, handle (@username), or channel ID
|
|
216
|
-
- `tab`: `"video"`, `"short"`, `"playlist"`, or `"about"` (default: `"video"`)
|
|
217
|
-
- `sortBy`: `"latest"`, `"popular"`, or `"oldest"` for the video tab
|
|
218
|
-
- `continuationToken`: next page
|
|
219
|
-
|
|
220
|
-
```json
|
|
221
|
-
{
|
|
222
|
-
"channelUrl": "https://youtube.com/@t3dotgg",
|
|
223
|
-
"tab": "video",
|
|
224
|
-
"sortBy": "latest"
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
The `about` tab returns the channel's country, join date, view count, and links.
|
|
229
|
-
|
|
230
|
-
### stophy_get_playlist
|
|
231
|
-
|
|
232
|
-
All videos in a playlist.
|
|
233
|
-
|
|
234
|
-
Arguments:
|
|
235
|
-
- `playlistUrl` (required): playlist URL or ID
|
|
236
|
-
- `continuationToken`: next page
|
|
237
|
-
|
|
238
|
-
```json
|
|
239
|
-
{
|
|
240
|
-
"playlistUrl": "https://youtube.com/playlist?list=PLTjRvDozrdlxEIuOBZkMAK5uiqp8rHUax"
|
|
241
|
-
}
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### stophy_get_suggestions
|
|
245
|
-
|
|
246
|
-
YouTube autocomplete. Good for topic discovery and query expansion.
|
|
247
|
-
|
|
248
|
-
Arguments:
|
|
249
|
-
- `q` (required): partial query
|
|
250
|
-
- `hl`: language code, default `en`
|
|
251
|
-
- `gl`: region code, default `US`
|
|
252
|
-
|
|
253
|
-
```json
|
|
254
|
-
{
|
|
255
|
-
"q": "react hooks",
|
|
256
|
-
"hl": "en",
|
|
257
|
-
"gl": "US"
|
|
258
|
-
}
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
## Pagination
|
|
263
|
-
|
|
264
|
-
Any tool that returns `continuationToken` supports pagination. Pass the token back with the same arguments to get the next page. A missing or null token means you've reached the end.
|
|
265
|
-
|
|
266
|
-
## Empty results
|
|
267
|
-
|
|
268
|
-
When a video has no transcript, comments are off, or a comment has no replies, Stophy returns an `empty` object:
|
|
269
|
-
|
|
270
|
-
```json
|
|
271
|
-
{
|
|
272
|
-
"empty": {
|
|
273
|
-
"code": "EMPTY_TRANSCRIPT_SEGMENTS",
|
|
274
|
-
"message": "No transcript segments found."
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
Possible codes: `EMPTY_TRANSCRIPT_SEGMENTS`, `EMPTY_COMMENTS`, `EMPTY_COMMENT_REPLIES`.
|
|
280
|
-
|
|
281
|
-
## Errors
|
|
282
|
-
|
|
283
|
-
Errors come back as text in the MCP tool response:
|
|
284
|
-
|
|
285
|
-
```
|
|
286
|
-
Stophy error (UNAUTHORIZED): Invalid API key.
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
Stophy error (MISSING_API_KEY): No Stophy API key provided. Set STOPHY_API_KEY (stdio) or include your key in the URL path (hosted). Get a key at https://stophy.dev/dashboard.
|
|
291
|
-
```
|
|
116
|
+
- [Stophy docs](https://docs.stophy.dev)
|
|
117
|
+
- [Dashboard and API keys](https://stophy.dev/dashboard)
|
|
292
118
|
|
|
293
|
-
##
|
|
119
|
+
## License
|
|
294
120
|
|
|
295
|
-
|
|
296
|
-
|----------|----------|-----------|
|
|
297
|
-
| `STOPHY_API_KEY` | Stdio only | Your Stophy API key. Not needed for hosted — the key is in the URL path. |
|
|
121
|
+
MIT
|