Sponsored by Deepsite.site

MCP Weather & DigitalOcean

Created By
wadewegner9 months ago
Content

MCP Weather & DigitalOcean

A collection of Model Context Protocol (MCP) servers for use with Cursor.

Project Structure

src/
├── index.ts              # Main entry point
├── shared/               # Shared utilities
│   └── api.ts            # Shared API utilities
├── weather/              # Weather MCP server
│   ├── api.ts            # Weather API functions
│   ├── server.ts         # Weather MCP server configuration
│   └── types.ts          # Weather API types
├── digitalocean/         # DigitalOcean MCP server
│   ├── api.ts            # DigitalOcean API functions
│   ├── server.ts         # DigitalOcean MCP server configuration
│   └── types.ts          # DigitalOcean API types
└── template/             # Template for new MCP servers
    ├── api.ts            # Template API functions
    ├── server.ts         # Template MCP server configuration
    └── types.ts          # Template API types
tests/                    # Test scripts and files

Available MCP Servers

Weather Server

The Weather MCP server provides tools for accessing weather information from the National Weather Service API.

Tools:

  • get-alerts: Get weather alerts for a US state

    • Parameters: state (two-letter state code, e.g., CA, NY)
  • get-forecast: Get weather forecast for a location

    • Parameters: latitude and longitude coordinates

DigitalOcean Server

The DigitalOcean MCP server provides tools for deploying and managing static websites on DigitalOcean App Platform using their API.

API Token Handling

The DigitalOcean MCP server will automatically look for your API token in the following locations (in order):

  1. As a parameter in the tool call
  2. Environment variables: DO_API_TOKEN or DIGITALOCEAN_API_TOKEN
  3. A file at ~/.dotoken containing just the token
  4. A .env file in the project root with DO_API_TOKEN=your_token
  5. A file at ~/.config/digitalocean/token containing just the token

This means you can set up your token once and not have to provide it with every command.

Tools:

  • deploy-static-site: Deploy a static website to DigitalOcean App Platform

    • Required Parameters:
      • app_name: Name for your app
      • repo: GitHub repository (username/repo)
    • Optional Parameters:
      • token: DigitalOcean API token (optional if stored in environment or config files)
      • region: Region code (e.g., nyc, sfo) - Default: "nyc"
      • branch: Branch to deploy - Default: "main"
      • source_dir: Directory in repo containing source code - Default: "/"
      • build_command: Build command (if needed)
      • output_dir: Directory where build outputs files
      • deploy_on_push: Auto-deploy on git push - Default: true
      • environment_slug: Runtime environment - Default: "html"
      • custom_domain: Custom domain (optional)
  • get-app-info: Get information about a DigitalOcean App Platform app

    • Required Parameters:
      • app_id: App ID
    • Optional Parameters:
      • token: DigitalOcean API token (optional if stored in environment or config files)
  • get-deployment-status: Get the status of a specific deployment

    • Required Parameters:
      • app_id: App ID
      • deployment_id: Deployment ID
    • Optional Parameters:
      • token: DigitalOcean API token (optional if stored in environment or config files)
  • list-deployments: List all deployments for an app

    • Required Parameters:
      • app_id: App ID
    • Optional Parameters:
      • token: DigitalOcean API token (optional if stored in environment or config files)
  • create-deployment: Create a new deployment (redeploy an app)

    • Required Parameters:
      • app_id: App ID
    • Optional Parameters:
      • token: DigitalOcean API token (optional if stored in environment or config files)
      • force_build: Force a rebuild without cache - Default: false
  • get-deployment-logs: Get logs for a deployment

    • Required Parameters:
      • app_id: App ID
      • deployment_id: Deployment ID
    • Optional Parameters:
      • token: DigitalOcean API token (optional if stored in environment or config files)
  • delete-app: Delete an app from DigitalOcean App Platform

    • Required Parameters:
      • app_id: App ID
    • Optional Parameters:
      • token: DigitalOcean API token (optional if stored in environment or config files)

Adding a New MCP Server

To add a new MCP server:

  1. Copy the template directory and rename it to your server name
  2. Update the types, API functions, and server configuration
  3. Add your server to the main index.ts file

Building and Running

# Install dependencies
npm install

# Build the project
npm run build

# Run the Weather MCP server
node build/index.js

# Run the DigitalOcean MCP server
node build/index.js digitalocean

Testing

The project includes several test scripts in the tests/ directory:

  • test-simple.mjs: A simple test script that sends JSON-RPC requests to the MCP server
  • test-api.mjs: A script that directly tests the DigitalOcean API
  • test-mcp.mjs: A more comprehensive test for the MCP server
  • test-deploy.mjs: A test script specifically for the deploy-static-site tool
  • token-test.mjs: A utility script to verify that the DigitalOcean API token can be read correctly

To run a test:

# Run a test script
node tests/test-simple.mjs

Cursor Integration

To use with Cursor, add the following to your .cursor/mcp.json file:

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": [
        "/path/to/your/project/build/index.js"
      ]
    },
    "digitalocean": {
      "command": "node",
      "args": [
        "/path/to/your/project/build/index.js",
        "digitalocean"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Playwright McpPlaywright MCP server
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.