Visual Crossing Weather MCP Server

Visual Crossing MCP Server

Visual Crossing provides an official, first-party remote MCP server for weather data. It supports current conditions, forecasts, recent historical weather and specialized weather elements, and is available on all Visual Crossing plans using an existing API key.

The MCP server is designed for teams building AI assistants, agent workflows, weather-aware applications, and automated systems that need reliable structured weather data without building a custom Weather API integration.

Want to try the MCP server before configuring a client?

Use the Weather MCP Playground to ask weather questions directly in your browser and see how an AI client calls the Visual Crossing MCP weather tools.

The Visual Crossing Weather MCP Server can be used with MCP-compatible clients such as Claude Desktop, MCP Inspector, and other applications that support remote MCP servers.

What plan is required for MCP Access?

All Visual Crossing plans include MCP access. Requests made through MCP use the weather data entitlements and usage limits of your Visual Crossing account and are billed in the same way as equivalent Weather API requests.

API-key authentication is available to all Visual Crossing accounts. OAuth authentication is also supported, but OAuth onboarding and configuration currently require Visual Crossing provisioning

What Is MCP?

MCP, or Model Context Protocol, is an open standard that allows AI applications to connect to external systems such as APIs, databases, tools, and workflows.

For Visual Crossing, MCP provides a standard way for AI clients to discover and call weather tools backed by the Visual Crossing Weather API. An MCP-compatible client can discover the available Visual Crossing tools, understand their input parameters, call them, and receive structured weather results.

This provides a standard integration model across compatible AI clients while continuing to use the same Visual Crossing weather data, account entitlements, and usage controls as the Weather API.

Why MCP Matters

MCP makes it easier for AI applications and agents to work directly with weather data.

Benefits include:

  • a standard connection model across MCP-compatible clients
  • simpler integration with AI assistants and agent workflows
  • structured weather responses that AI tools can interpret directly
  • access to Visual Crossing weather capabilities without implementing a custom REST integration
  • the ability to use the same Visual Crossing account and weather data entitlements across Weather API and MCP applications

Weather MCP Server Use Cases

The Visual Crossing MCP Server is designed for AI assistants, agents, and developer tools that need direct access to weather data.

Example use cases include:

  • asking an AI assistant for current conditions or a weather forecast for a location
  • retrieving recent historical weather for weather-aware analysis
  • validating weather-sensitive workflows inside an AI agent
  • testing weather retrieval from Claude Desktop, MCP Inspector, or another MCP-compatible client
  • prototyping workflows that use solar radiation, agriculture, air-quality, wind, marine, severe-weather, or other supported weather elements
  • building agents that use weather conditions as part of planning, monitoring, or automated decision workflows

Available MCP Tools

The Visual Crossing MCP Server currently exposes one weather retrieval tool:

- `get_weather`

The get_weather tool provides the weather retrieval interface. Specialized data such as solar radiation, agricultural weather, air quality, extended wind, and other supported weather data are requested using weather elements within get_weather; they are not separate MCP tools.

Available elements depend on the requested location, date, forecast period, and Visual Crossing plan entitlement.

get_weather Tool Parameters

ParameterRequiredDescriptionExample
latitudeLocation dependentDecimal latitude. Use together with longitude. Latitude/longitude is the preferred location form when coordinates are available.40.7128
longitudeLocation dependentDecimal longitude. Use together with latitude.-74.0060
cityLocation dependentCity name for a structured location lookup. Normally used with country.London
countryLocation dependentTwo-character country code. Required with structured locations such as city or postal code. Not required when using latitude/longitude.GB
postalCodeLocation dependentZIP or postal code. Requires country.20170
admin1OptionalState or first-level administrative region.Virginia
admin2OptionalSecond-level administrative region where supported.Fairfax County
nameOptionalOptional display name for the location.London Office
startDateOptionalISO-8601 local date or date-time. Omit both dates to use the default forecast period.2026-09-25
endDateOptionalInclusive end date. Requires startDate when supplied.2026-09-28
unitGroupOptionalPreferred unit-group parameter. Supported values are us, metric, uk, and base. Defaults to us.metric
unitsOptionalAlias for unitGroup.metric
includeOptionalSections to return. Supported values are days, hours, current, and alerts. May be supplied as a JSON array or comma-separated value.["days", "hours"]
elementsOptionalSpecific weather elements to return. Element availability depends on the account, location, date, and forecast period.["datetime", "temp", "precip", "windspeed"]

A location is required, but latitude and longitude are not specifically required. The tool accepts either a latitude/longitude pair or supported structured location fields.

When both startDate and endDate are omitted, get_weather returns the default forecast response covering today and the following seven days. Hourly forecast data covers the first 48 hours of the default response.

Explicit date ranges currently support recent historical weather and forecast dates within the range supported by the MCP weather service.

The MCP parameter schema is designed for tool use and therefore differs slightly from a direct Timeline Weather API HTTP request. For example, MCP accepts unitGroup as well as the units alias, and list values such as include and elements can be supplied as JSON arrays.

If you are new to Visual Crossing weather parameters, use the Query Builder or Weather Data Dictionary to explore available weather elements.

This tool supports timeline-style weather retrieval for approved Visual Crossing accounts. Depending on your account and plan entitlement, limits may apply to date range, include values, and supported elements. If you are new to Visual Crossing weather parameters, use the Query Builder or Weather Data Dictionary to explore available elements before calling get_weather through MCP.

MCP Server URL

Use this MCP server URL:

https://mcp.visualcrossing.com/VisualCrossingWebServices/rest/api/v1/mcp

This is the URL that should normally be configured in an MCP-compatible client.

The Visual Crossing endpoint implements MCP over HTTP using JSON-RPC 2.0. Compatible clients perform the standard MCP initialization and tool-discovery process using this endpoint.

Clients do not normally need to create a Visual Crossing MCP session explicitly. When required, session establishment is handled as part of the MCP initialization flow and the client carries the returned Mcp-Session-Id on subsequent requests.

Visual Crossing currently supports MCP protocol version 2025-03-26.

Quick Start

Choose the authentication method appropriate for your client.

Option 1. API Key

API-key authentication is the simplest way to connect to the Visual Crossing MCP Server and is available with all Visual Crossing plans.

You need:

  • a Visual Crossing account
  • a Visual Crossing API key

You can sign up for a free Visual Crossing account if you do not already have one and retrieve your API key from your account page.

The API key is supplied to the MCP server using:

X-VC-API-Key: YOUR_API_KEY

API-key requests use the plan, usage limits, and weather data entitlements associated with that Visual Crossing account.

We recommend creating a dedicated API key for MCP usage when practical so MCP traffic can be monitored, rotated, or disabled independently from other Weather API integrations.

Option 2. User OAuth

User OAuth is designed for interactive MCP clients where a user signs in through a browser-based authorization flow.

This is useful for clients such as Claude that support remote MCP OAuth discovery and authentication.

OAuth access currently requires Visual Crossing onboarding and configuration.

Visual Crossing provides the required OAuth configuration for supported clients. The client can then discover the authentication requirements from the MCP server and direct the user through the sign-in process.

Option 3. Machine-to-Machine (M2M) OAuth

Machine-to-Machine OAuth is intended for backend services and integrations that authenticate without an interactive user.

M2M OAuth currently requires Visual Crossing provisioning. Visual Crossing provides the required client configuration and maps the OAuth client to the appropriate Visual Crossing account.

This method is appropriate for:

  • server-to-server integrations
  • automated workflows
  • partner services
  • backend applications that should not store a Visual Crossing API key directly

Authentication Methods

API Key Authentication

Send your Visual Crossing API key using the X-VC-API-Key header.

No OAuth token exchange is required.

This is generally the best authentication method for development, testing, scripted integrations, and clients that support custom HTTP headers.

User OAuth Authentication

User OAuth allows an MCP client to authenticate a Visual Crossing user through a browser-based sign-in flow.

The MCP server exposes OAuth discovery information to compatible clients. When authentication is required, the client can discover the appropriate authorization flow and continue after the user signs in.

User OAuth currently requires Visual Crossing provisioning.

Machine-to-Machine OAuth Authentication

Machine-to-Machine OAuth allows a backend application or service to authenticate using an OAuth client rather than an interactive user.

The OAuth client must be provisioned and mapped by Visual Crossing to the appropriate Visual Crossing account before weather requests can be made.

Typical MCP Connection Flow

For most MCP clients, the connection flow is:

  1. Configure the Visual Crossing MCP server URL.
  2. Provide an API key or complete the supported OAuth authentication flow.
  3. The client sends initialize.
  4. The client completes MCP initialization.
  5. The client discovers available tools using tools/list.
  6. The client calls get_weather using tools/call.

Session handling is normally managed automatically by the MCP client and server. Applications should not need to call Visual Crossing-specific session-management endpoints directly.

Example get_weather Requests

Forecast using a named location

Example tool call:

{
  "name": "get_weather",
  "arguments": {
    "city": "London",
    "country": "GB",
    "unitGroup": "metric",
    "include": ["days", "hours"],
    "elements": ["datetime", "temp", "precip", "windspeed"]
  }
}

Because no dates are supplied, the request uses the default forecast period.

Forecast using latitude and longitude

{
  "name": "get_weather",
  "arguments": {
    "latitude": 40.7128,
    "longitude": -74.0060,
    "startDate": "2026-09-25",
    "endDate": "2026-09-28",
    "unitGroup": "us",
    "include": ["days"],
    "elements": ["datetime", "tempmin", "tempmax", "precip", "windspeed"]
  }
}

The tool returns structured weather data for the requested location, date range, unit group, include sections, and weather elements.

Testing With Claude

Claude and other MCP-compatible clients can connect to the Visual Crossing MCP Server using the MCP server URL.

For OAuth-enabled connections:

  1. Add the Visual Crossing MCP server using the MCP server URL.
  2. Start the connection process.
  3. Complete the browser-based authorization flow when prompted.
  4. Return to the client after authorization completes.
  5. Ask the client to list the available Visual Crossing tools or request weather for a location.

For API-key connections, use the X-VC-API-Key header if the client supports custom MCP request headers.

Example Prompts for MCP Clients

After connecting the Visual Crossing MCP server, try prompts such as:

  • “What is the weather forecast for London for the next five days?”
  • “Get the hourly forecast for New York City for the next 24 hours.”
  • “Retrieve temperature, precipitation, and wind speed for 38.8951, -77.0364.”
  • “What were the weather conditions at this location yesterday?”
  • “Get solar radiation values for this location.”
  • “Check whether heat, wind, or rain could affect outdoor work at this location today.”
  • “List the Visual Crossing weather tools you have available.”

Testing With MCP Inspector

MCP Inspector is a useful general-purpose client for testing MCP connectivity and tool calls.

Launch Inspector:

npx -y @modelcontextprotocol/inspector

Then open the localhost URL displayed by Inspector.

Inspector With an API Key

Configure Inspector with the Visual Crossing MCP server URL:

https://mcp.visualcrossing.com/VisualCrossingWebServices/rest/api/v1/mcp

Add the following request header:

X-VC-API-Key: YOUR_API_KEY

Inspector can then initialize the MCP connection, discover get_weather, and execute weather requests.

Inspector With User OAuth

Inspector can also be used to test OAuth authentication when OAuth has been enabled for your integration.

The OAuth client must have the required callback configuration. Inspector can then drive the browser-based login flow and continue using the returned bearer token.

Inspector With Machine-to-Machine OAuth

MCP Inspector can test M2M authentication if you already have a valid bearer token.

Add:

Authorization: Bearer YOUR_ACCESS_TOKEN

and connect to the same Visual Crossing MCP server URL.

Security Guidance

  • Never expose API keys, client secrets, or bearer tokens in public code, prompts, screenshots, email, or shared chat logs.
  • Rotate credentials that may have been exposed.
  • Consider using a separate Visual Crossing API key for MCP integrations.
  • MCP weather requests have access to the weather capabilities and entitlements of the associated Visual Crossing account.

Troubleshooting

API Key Authentication Fails

Check that:

  • the API key is active
  • the API key belongs to the intended Visual Crossing account
  • the client is sending the key using the X-VC-API-Key header

All current Visual Crossing plans support MCP access, so separate MCP plan activation is not normally required.

OAuth Browser Flow Fails

Check that:

  • OAuth has been provisioned for the integration
  • the OAuth callback URL matches the client configuration
  • the requested OAuth scopes are allowed

If you receive an OAuth callback or redirect mismatch error, contact Visual Crossing support and include the exact callback URL reported by the MCP client.

M2M OAuth Fails After Token Issuance

Check that:

  • the OAuth client has been provisioned by Visual Crossing
  • the client is mapped to the correct Visual Crossing account
  • the access token contains the required MCP scopes
  • the token has not expired

get_weather Rejects a Request

Check that:

  • a valid location has been provided
  • latitude and longitude, when used, are both supplied
  • structured locations contain the required country information
  • requested dates are within the range supported by the MCP weather service
  • include contains supported values
  • requested weather elements are available for the account, location, and requested period

Frequently Asked Questions

What weather data can I access through MCP?

The current MCP server exposes weather retrieval through the get_weather tool.

It supports current conditions, forecasts, recent historical weather, and supported specialized weather elements. Available elements depend on the requested location, date, forecast period, and Visual Crossing plan entitlement.

Specialized data such as solar radiation, agriculture, air quality, extended wind, marine, and severe-weather data are requested as elements through get_weather; they are not separate MCP tools.

What Visual Crossing plan do I need?

All current Visual Crossing plans support MCP access. MCP requests use the weather data entitlement and usage limits associated with your existing Visual Crossing account.

If you do not yet have an account, you can sign up for a free Visual Crossing account.

Can I use the Visual Crossing MCP server with Claude?

Yes. Compatible Claude clients can connect to the Visual Crossing remote MCP server. API-key authentication can be used where the client supports custom headers. OAuth-based connections currently require Visual Crossing OAuth provisioning.

Can I use an API key instead of OAuth?

Yes. Send your Visual Crossing API key using the X-VC-API-Key request header.

For many developer and testing use cases, API-key authentication is the simplest way to connect to the Visual Crossing MCP Server.

Does MCP replace the Visual Crossing Weather API?

No. MCP provides an AI-client interface to Visual Crossing weather capabilities.

Use MCP when an AI assistant, agent, or MCP-compatible development tool needs direct access to weather data. Continue using the Visual Crossing Weather API directly for conventional application integrations, websites, dashboards, backend services, and other REST API workflows.

Support

For OAuth onboarding, account questions, weather-data entitlement issues, or MCP support, contact Visual Crossing Support.

Testing With Claude Desktop

Claude Desktop is a good way to validate the user-authenticated OAuth flow.

Recommended approach:

  1. Add the Visual Crossing MCP server in Claude Desktop using the MCP server URL.
  2. Start the connection flow.
  3. When prompted, sign in through the Cognito-hosted browser flow.
  4. After authorization completes, return to Claude Desktop.
  5. Ask Claude to list available tools or request weather for a location and date range.

What this validates:

  • OAuth discovery
  • browser-based login flow
  • user token exchange
  • MCP tool availability
  • get_weather execution

If you receive an OAuth callback or redirect mismatch error, contact support and include the exact callback URL shown by the client.

Example Prompts for MCP Clients

After connecting the Visual Crossing MCP server, try prompts such as:

  • “List the available Visual Crossing MCP tools.”
  • “Get the daily forecast for New York City from June 17 to June 19.”
  • “Retrieve temperature, precipitation, and wind speed for this latitude and longitude.”
  • “Compare today’s forecast with the historical weather for the same location.”
  • “Use Visual Crossing weather data to check whether outdoor work conditions may be affected by heat, wind, or rain.”

Testing With MCP Inspector

MCP Inspector is a good general-purpose client for testing.

Launch Inspector:

npx -y @modelcontextprotocol/inspector

Then open the localhost URL shown by Inspector in your browser.

Inspector With API Key

Configure Inspector to connect to:

https://mcp.visualcrossing.com/VisualCrossingWebServices/rest/api/v1/mcp

Add header:

X-VC-API-Key: YOUR_API_KEY

Then run:

  • initialize
  • tools/list
  • tools/call

Inspector With User OAuth

Inspector can also test the user-authenticated OAuth flow.

Requirements:

  • Your Visual Crossing account must be enabled for OAuth access.
  • The OAuth client must have the correct callback URL configured.

In this mode, Inspector drives the browser login flow and then continues using the returned bearer token.

Inspector With Machine-to-Machine (M2M) OAuth

Inspector is useful for Machine-to-Machine (M2M) testing if you already have a bearer token.

Recommended pattern:

  1. Mint a token externally using client_credentials
  2. Add header in Inspector:
Authorization: Bearer YOUR_ACCESS_TOKEN
  1. Run the same MCP flow:
  • initialize
  • tools/list
  • tools/call

Machine-to-Machine (M2M) Token Example

A service can obtain an OAuth token from Cognito using the token endpoint and the client_credentials grant.

Example PowerShell:

$clientId = "YOUR_CLIENT_ID"
$clientSecret = "YOUR_CLIENT_SECRET"
$scope = "visualcrossing-api/mcp.tools.invoke visualcrossing-api/mcp.tools.read"
$tokenUrl = "YOUR_VISUAL_CROSSING_TOKEN_URL"
$basic = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("${clientId}:${clientSecret}"))
$response = Invoke-RestMethod -Method Post -Uri $tokenUrl -Headers @{ Authorization = "Basic $basic" } -ContentType "application/x-www-form-urlencoded" -Body ("grant_type=client_credentials&scope=" + [uri]::EscapeDataString($scope))
$response.access_token

Important:

  • The Cognito app client must be provisioned before use.
  • Visual Crossing provides the token endpoint, client ID, client secret, and required scopes during M2M onboarding.
  • The app client must be mapped by Visual Crossing to the target account before MCP access will succeed.

Security Guidance

  • Do not share API keys, client secrets, or bearer tokens in email or chat.
  • Rotate any test credentials that may have been exposed during troubleshooting.
  • Treat MCP access as account-scoped access to your Visual Crossing data entitlements.

Troubleshooting

API Key Authentication Fails

  • Confirm the key is active.
  • Confirm the key belongs to the intended Visual Crossing account.
  • Confirm the account is enabled for MCP access.

OAuth Browser Flow Fails

  • Confirm the OAuth client callback URL is configured correctly.
  • Confirm the account is enabled for access.
  • Confirm the requested scopes are allowed.

M2M OAuth Fails After Token Issuance

  • Confirm the Cognito app client is mapped by Visual Crossing to the correct account.
  • Confirm the target account is enabled for MCP access.
  • Confirm the token includes the required MCP scopes.

Tool Is Visible But Request Is Rejected

  • Your account or client may be subject to limits on parameters such as date range, include values, or supported elements.
  • Contact support with the request details and the approximate time of the failure.

Frequently Asked Questions

What weather data can I access through MCP?

The current MCP endpoint exposes weather retrieval through the get_weather tool. Available date ranges, include options, and weather elements depend on your Visual Crossing account entitlement and planconfiguration.

Can I use the Visual Crossing MCP server with Claude Desktop?

Yes, approved accounts can use compatible MCP clients such as Claude Desktop when the required authentication flow has been enabled for their account.

Can I use an API key instead of OAuth?

Yes. API key authentication is available for accounts by sending the X-VC-API-Key header with MCP requests.

Does MCP replace the Visual Crossing Weather API?

No. MCP provides a standard AI-client interface to Visual Crossing weather capabilities. Developers can continue using the Visual Crossing Weather API directly for application integrations, dashboards, and backend services.

Support

For access requests, provisioning questions, entitlement issues, or support, contact Visual Crossing support.