scorchcrawl-mcp 1.0.1 → 1.0.2
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/dist/cli.js +7 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -13,20 +13,24 @@
|
|
|
13
13
|
* SCORCHCRAWL_URL=https://your-server.com/mcp-api/scorchcrawl/YOUR_KEY scorchcrawl-mcp
|
|
14
14
|
*
|
|
15
15
|
* Environment variables:
|
|
16
|
-
* SCORCHCRAWL_URL - Base URL of the ScorchCrawl MCP server (
|
|
16
|
+
* SCORCHCRAWL_URL - Base URL of the ScorchCrawl MCP server (preferred)
|
|
17
|
+
* SCORCHCRAWL_API_URL - Backward-compatible alias for SCORCHCRAWL_URL
|
|
17
18
|
* GITHUB_TOKEN - GitHub PAT for Copilot SDK agent (optional, sent as x-copilot-token)
|
|
18
19
|
* SCORCHCRAWL_LOCAL_PROXY - Set to "true" to route scraping through your local IP
|
|
19
20
|
*/
|
|
20
21
|
import { config } from 'dotenv';
|
|
21
22
|
config({ quiet: true });
|
|
22
|
-
const SCORCHCRAWL_URL = process.env.SCORCHCRAWL_URL ||
|
|
23
|
+
const SCORCHCRAWL_URL = process.env.SCORCHCRAWL_URL ||
|
|
24
|
+
process.env.SCORCHCRAWL_API_URL ||
|
|
25
|
+
'http://localhost:24787';
|
|
23
26
|
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
|
|
24
27
|
const LOCAL_PROXY = process.env.SCORCHCRAWL_LOCAL_PROXY === 'true';
|
|
25
28
|
/**
|
|
26
29
|
* Forward a JSON-RPC request to the remote ScorchCrawl server.
|
|
27
30
|
*/
|
|
28
31
|
async function forwardToServer(request) {
|
|
29
|
-
const
|
|
32
|
+
const baseUrl = SCORCHCRAWL_URL.replace(/\/$/, '');
|
|
33
|
+
const url = baseUrl.endsWith('/mcp') ? baseUrl : `${baseUrl}/mcp`;
|
|
30
34
|
const headers = {
|
|
31
35
|
'Content-Type': 'application/json',
|
|
32
36
|
'Accept': 'application/json, text/event-stream',
|