@virga-mcp/server
v0.1.2
Published
MCP server for the Virga Weather API — exposes weather data as native tools for LLM clients
Downloads
333
Maintainers
Readme
@virga-mcp/server
MCP (Model Context Protocol) server for the Virga Weather API. Exposes weather data as native tools for LLM clients.
Quick Start
Claude Code
claude mcp add --transport stdio --env VIRGA_API_KEY=sk_virga_prod_xxx virga-weather -- npx -y @virga-mcp/serverCodex CLI
codex mcp add virga-weather --env VIRGA_API_KEY=sk_virga_prod_xxx -- npx -y @virga-mcp/serverGemini CLI
gemini mcp add virga-weather -- npx -y @virga-mcp/server --api-key sk_virga_prod_xxxOr add to ~/.gemini/settings.json:
{
"mcpServers": {
"virga-weather": {
"command": "npx",
"args": ["-y", "@virga-mcp/server", "--api-key", "sk_virga_prod_xxx"]
}
}
}Claude Desktop
Add to your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"virga-weather": {
"command": "npx",
"args": ["-y", "@virga-mcp/server"],
"env": {
"VIRGA_API_KEY": "sk_virga_prod_xxx"
}
}
}
}Cursor
Add as an MCP server in Cursor settings (Settings > MCP Servers), or add to .cursor/mcp.json:
{
"mcpServers": {
"virga-weather": {
"command": "npx",
"args": ["-y", "@virga-mcp/server", "--api-key", "sk_virga_prod_xxx"]
}
}
}Windsurf
Add to your MCP configuration:
{
"virga-weather": {
"command": "npx",
"args": ["-y", "@virga-mcp/server", "--api-key", "sk_virga_prod_xxx"]
}
}OpenCode
Add to opencode.json:
{
"mcp": {
"virga-weather": {
"type": "local",
"command": ["npx", "-y", "@virga-mcp/server"],
"environment": {
"VIRGA_API_KEY": "sk_virga_prod_xxx"
}
}
}
}Xcode (26.3+)
Xcode 26.3 has native MCP support. Add to your Xcode MCP configuration:
{
"servers": {
"virga-weather": {
"command": "npx",
"arguments": ["-y", "@virga-mcp/server"],
"environment": {
"VIRGA_API_KEY": "sk_virga_prod_xxx"
}
}
}
}Environment Variable
You can also set the API key as an environment variable instead of passing it as a flag:
VIRGA_API_KEY=sk_virga_prod_xxx npx @virga-mcp/serverWeather Tools
| Tool | Description | Credits |
|------|-------------|---------|
| get_current_weather | Current weather conditions for a lat/lon | 1 |
| get_hourly_forecast | Hourly forecast (1-120 hours) | 2 |
| get_daily_forecast | Daily forecast (1-16 days) | 2 |
| get_historical_weather | Historical weather for a specific date | 3 |
| search_location | Geocode a place name to lat/lon | 0 (free) |
Account & Billing Tools
| Tool | Description |
|------|-------------|
| create_account | Create a new account, get a stage API key |
| accept_terms | Accept the current terms of service |
| activate_billing | Set up payment method (returns Stripe checkout URL) |
| purchase_credits | Buy a credit bundle (returns Stripe checkout URL) |
| get_billing_status | Credit balance, spend caps, auto-topup config |
| list_api_keys | List all API keys for the account |
| create_api_key | Create a new API key (stage or production) |
| revoke_api_key | Permanently revoke an API key |
| get_usage | API usage history with credit costs |
Resources
| Resource | URI | Description |
|----------|-----|-------------|
| Account Status | weather://account/status | Credit balance, rate limits, usage |
| Terms | weather://terms | Current terms of service |
| Pricing | weather://pricing | Credit costs per tool and bundles |
| OpenAPI Spec | weather://openapi | Full OpenAPI 3.1 specification |
| Onboarding | weather://onboarding | Step-by-step autonomous setup guide |
| Docs | weather://docs | Condensed LLM-friendly documentation |
Prompt Templates
| Prompt | Description |
|--------|-------------|
| setup_weather_account | Guided walkthrough for account creation and billing setup |
| check_weather | Check current weather at a location by name |
| weather_forecast | Get a daily or hourly forecast for a location |
CLI Options
| Flag | Description | Default |
|------|-------------|---------|
| --api-key <key> | Virga API key | VIRGA_API_KEY env var |
| --base-url <url> | API base URL | https://api.virga.dev |
| --help | Show help | |
| --version | Show version | |
Getting an API Key
Use the setup_weather_account prompt template, or follow these steps:
- Create an account:
POST https://api.virga.dev/api/v1/accounts - Accept terms:
POST https://api.virga.dev/api/v1/terms/accept - Set up billing:
POST https://api.virga.dev/api/v1/billing/activate - Purchase credits:
POST https://api.virga.dev/api/v1/billing/credits - Create a production key:
POST https://api.virga.dev/api/v1/keys
Or use a stage key (free, no credits required) for testing.
