File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 11# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2+
3+
4+ configSchema :
5+ # JSON Schema defining the configuration options for the MCP.
6+ type : " object"
7+ required : ["scrapegraphApiKey"]
8+ properties :
9+ scrapegraphApiKey :
10+ type : " string"
11+ description : " Your Scrapegraph API key"
12+
213runtime : " python"
Original file line number Diff line number Diff line change 1717import httpx
1818from fastmcp import Context , FastMCP
1919from smithery .decorators import smithery
20- from pydantic import BaseModel , Field
20+ from pydantic import BaseModel , Field , AliasChoices
2121
2222# Configure logging
2323logging .basicConfig (
@@ -342,7 +342,11 @@ def close(self) -> None:
342342class ConfigSchema (BaseModel ):
343343 scrapegraph_api_key : Optional [str ] = Field (
344344 default = None ,
345- description = "Your Scrapegraph API key (optional - can also be set via SGAI_API_KEY environment variable)"
345+ description = "Your Scrapegraph API key (optional - can also be set via SGAI_API_KEY environment variable)" ,
346+ # Accept both camelCase (from smithery.yaml) and snake_case (internal) for validation,
347+ # and serialize back to camelCase to match Smithery expectations.
348+ validation_alias = AliasChoices ("scrapegraphApiKey" , "scrapegraph_api_key" ),
349+ serialization_alias = "scrapegraphApiKey" ,
346350 )
347351
348352
You can’t perform that action at this time.
0 commit comments