Skip to content

Commit 44446b6

Browse files
committed
fix: api key scrapegraph name
1 parent 9a6ec49 commit 44446b6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

server.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"isRequired": false,
2222
"format": "string",
2323
"isSecret": true,
24-
"name": "SCRAPEGRAPH_API_KEY"
24+
"name": "SGAI_API_KEY"
2525
}
2626
]
2727
}

src/scrapegraph_mcp/server.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ def close(self) -> None:
306306
# Pydantic configuration schema for Smithery
307307
class ConfigSchema(BaseModel):
308308
scrapegraph_api_key: Optional[str] = Field(
309-
default=None,
310-
description="Your Scrapegraph API key (optional - can also be set via SCRAPEGRAPH_API_KEY environment variable)"
309+
default=None,
310+
description="Your Scrapegraph API key (optional - can also be set via SGAI_API_KEY environment variable)"
311311
)
312312

313313

@@ -329,14 +329,14 @@ def get_api_key(ctx: Context) -> str:
329329

330330
# If not in config, try environment variable
331331
if not api_key:
332-
api_key = os.getenv('SCRAPEGRAPH_API_KEY')
333-
332+
api_key = os.getenv('SGAI_API_KEY')
333+
334334
# If still no API key found, raise error
335335
if not api_key:
336336
raise ValueError(
337337
"ScapeGraph API key is required. Please provide it either:\n"
338338
"1. In the MCP server configuration as 'scrapegraph_api_key'\n"
339-
"2. As an environment variable 'SCRAPEGRAPH_API_KEY'"
339+
"2. As an environment variable 'SGAI_API_KEY'"
340340
)
341341

342342
return api_key
@@ -501,7 +501,7 @@ def quick_start_examples() -> str:
501501
## 🔧 Configuration
502502
503503
Set your API key via:
504-
- Environment variable: `SCRAPEGRAPH_API_KEY=your_key_here`
504+
- Environment variable: `SGAI_API_KEY=your_key_here`
505505
- MCP configuration: `scrapegraph_api_key: "your_key_here"`
506506
507507
No configuration required - the server works with environment variables!
@@ -540,7 +540,7 @@ def api_status() -> str:
540540
- **Sitemap**: 1 credit per request
541541
542542
## Configuration
543-
- **API Key**: Required (set via SCRAPEGRAPH_API_KEY env var or config)
543+
- **API Key**: Required (set via SGAI_API_KEY env var or config)
544544
- **Timeout**: 120 seconds default (configurable)
545545
- **Rate Limits**: Applied per API key
546546

0 commit comments

Comments
 (0)