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
1 change: 1 addition & 0 deletions weather-mcp-server/.actor/actor.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"meta": {
"templateId": "python-mcp-server"
},
"environmentVariables": { "AGNOST_AI_ORG_ID": "@AGNOST_AI_ORG_ID" },
"input": {
"title": "Actor input schema",
"description": "This is Actor input schema",
Expand Down
2 changes: 0 additions & 2 deletions weather-mcp-server/src/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

SESSION_TIMEOUT_SECS = 60

AGNOST_AI_ORG_ID = '8f1f0d89-5677-47ac-94ec-15298106a605'


class ChargeEvents(str, Enum):
"""Event types for charging MCP operations.
Expand Down
3 changes: 2 additions & 1 deletion weather-mcp-server/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ async def capturing_send(message: dict[str, Any]) -> None:

return capturing_send

async def create_starlette_app(self, mcp_server: Server) -> Starlette:
async def create_starlette_app(self, mcp_server: Server) -> Starlette: # noqa: PLR0915
"""Create a Starlette app that exposes /mcp endpoint for Streamable HTTP transport."""
event_store = InMemoryEventStore()
session_manager = StreamableHTTPSessionManager(
Expand All @@ -273,6 +273,7 @@ async def create_starlette_app(self, mcp_server: Server) -> Starlette:
json_response=False,
)
# Enable Agnost.ai tracking
logger.info(f'Agnost.ai tracking is: {"enabled" if self._agnost_org_id else "disabled"}')
self._agnost_org_id and track(mcp_server, self._agnost_org_id)

@contextlib.asynccontextmanager
Expand Down
Loading