Code

Code Integrations

Use these guides to connect the MCP server to popular SDKs. Each example covers authentication, tool scoping, and best practices for handling responses.

Supported SDKs

All samples assume the MCP endpoint https://mcp.api.xweather.com/mcp and a combined API key stored in XWEATHER_API_KEY.

Remember to review Filtering & Tool Scoping before rolling out to production so agents only see the functions you intend.