Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml


configSchema:
# JSON Schema defining the configuration options for the MCP.
type: "object"
required: ["scrapegraphApiKey"]
properties:
scrapegraphApiKey:
type: "string"
description: "Your Scrapegraph API key"

runtime: "python"
8 changes: 6 additions & 2 deletions src/scrapegraph_mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import httpx
from fastmcp import Context, FastMCP
from smithery.decorators import smithery
from pydantic import BaseModel, Field
from pydantic import BaseModel, Field, AliasChoices

# Configure logging
logging.basicConfig(
Expand Down Expand Up @@ -342,7 +342,11 @@ def close(self) -> None:
class ConfigSchema(BaseModel):
scrapegraph_api_key: Optional[str] = Field(
default=None,
description="Your Scrapegraph API key (optional - can also be set via SGAI_API_KEY environment variable)"
description="Your Scrapegraph API key (optional - can also be set via SGAI_API_KEY environment variable)",
# Accept both camelCase (from smithery.yaml) and snake_case (internal) for validation,
# and serialize back to camelCase to match Smithery expectations.
validation_alias=AliasChoices("scrapegraphApiKey", "scrapegraph_api_key"),
serialization_alias="scrapegraphApiKey",
)


Expand Down
Loading