Planning MCP Server

Planning MCP Server

Provides comprehensive Australian planning property reports, including zoning, overlays, land size, and utility information for AI assistants. This high-performance MCP server is built for Cloudflare Workers and enables real-time property data retrieval through an HTTP-based interface.

Category
访问服务器

README

Planning MCP Server v2.0

Model Context Protocol (MCP) server for Australian Planning Property Reports - Cloudflare Workers Edition.

Features

  • 🌍 Global Edge Deployment - Runs on Cloudflare's 300+ edge locations
  • High Performance - Parallel API requests and intelligent caching
  • 📊 Comprehensive Data - Property details, zones, overlays, electorates, utilities, and land information
  • 🔒 Production Ready - Rate limiting, authentication, structured logging
  • 📈 Real-time Progress - Progress updates during long-running operations
  • 🚀 HTTP-based MCP - Works with Claude, ChatGPT, and other AI assistants

Quick Start

Prerequisites

  • Node.js 18+
  • Cloudflare Workers account
  • Wrangler CLI (npm install -g wrangler)

Installation

# Clone the project
cd planning-mcp

# Install dependencies
npm install

# Login to Cloudflare
wrangler login

# Create KV namespace for caching
wrangler kv:namespace create "CACHE"
# Copy the ID and add to wrangler.toml

# Start development server
npm run dev

Configuration

  1. Update wrangler.toml with your KV namespace ID
  2. (Optional) Set API key for authentication:
    wrangler secret put API_KEY
    

Deployment

# Build the project
npm run build

# Deploy to Cloudflare Workers
npm run deploy

Usage

MCP Tool: vic_planning_property_report

Retrieves comprehensive Victorian planning property reports. (Additional state tools coming soon.)

Input:

{
  "address": "1 Spring Street, Melbourne VIC 3000",
  "includePdfBase64": false,
  "includeZoneHtml": false,
  "includeOverlayHtml": false
}

Output:

{
  "success": true,
  "address": "1 SPRING STREET MELBOURNE VIC 3000",
  "propertyPfi": "12345",
  "propertyDetails": {
    "address": "1 SPRING STREET MELBOURNE VIC 3000",
    "councilName": "Melbourne City Council",
    "landSize": 842,
    "landSizeHectares": 0.0842,
    "standardParcelIdentifier": "1\\PS123456",
    "registeredAboriginalParty": "Bunurong Land Council",
    ...
  },
  "electorates": {
    "federal": "Melbourne",
    "legislativeAssembly": "Melbourne District",
    "legislativeCouncil": "Southern Metropolitan Region"
  },
  "utilities": {
    "powerDistributor": "AusNet Services",
    "gas": "AusNet Services",
    "melbourneWater": "Melbourne Water",
    "melbourneWaterRetailer": "South East Water"
  },
  "zones": [...],
  "overlays": [...]
}

HTTP API

Health Check:

GET /health

MCP Endpoint:

POST /mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "tools/call",
  "params": {
    "name": "vic_planning_property_report",
    "arguments": {
      "address": "1 Spring Street, Melbourne VIC 3000"
    }
  }
}

Architecture

┌─────────────────────────────────────────┐
│     Cloudflare Edge Network             │
│  ┌───────────────────────────────────┐  │
│  │   Worker (HTTP MCP Endpoint)      │  │
│  │   - Hono.js Framework             │  │
│  │   - Rate Limiting                 │  │
│  │   - Authentication                │  │
│  │   - CORS                          │  │
│  └───────────────────────────────────┘  │
│               ↓                          │
│  ┌───────────────────────────────────┐  │
│  │   Services Layer                  │  │
│  │   - Address Resolution            │  │
│  │   - Property Data Fetching        │  │
│  │   - Progress Reporting            │  │
│  └───────────────────────────────────┘  │
│               ↓                          │
│  ┌───────────────────────────────────┐  │
│  │   Workers KV (Caching)            │  │
│  │   - 60%+ Cache Hit Rate           │  │
│  │   - 24hr TTL for addresses        │  │
│  └───────────────────────────────────┘  │
└─────────────────────────────────────────┘

Development

Project Structure

planning-mcp/
├── src/
│   ├── index.ts              # Main entry point
│   ├── types/                # TypeScript types
│   ├── services/             # Business logic
│   ├── middleware/           # HTTP middleware
│   ├── handlers/             # MCP handlers
│   ├── lib/                  # Utilities
│   └── schemas/              # Validation schemas
├── test/                     # Tests
├── wrangler.toml            # Cloudflare config
├── tsconfig.json            # TypeScript config
└── package.json             # Dependencies

Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Type check
npm run type-check

Environment Variables

Configure in wrangler.toml:

Variable Description Default
RATE_LIMIT_PER_MINUTE Rate limit per IP 100
CACHE_TTL_HOURS Cache TTL in hours 24
ENABLE_ANALYTICS Enable analytics true
ALLOWED_ORIGINS CORS origins *

Secrets (use wrangler secret put):

Secret Description Required
API_KEY Bearer token for auth No

Performance

  • Latency: <5s P50, <8s P95
  • Cache Hit Rate: >60% after warmup
  • Throughput: 1000+ req/sec with auto-scaling
  • Cold Start: <100ms
  • Memory: <128MB per request

Security

  • ✅ Input validation with Zod
  • ✅ Rate limiting (100 req/min per IP)
  • ✅ Optional API key authentication
  • ✅ CORS configuration
  • ✅ No secrets in logs

Monitoring

Structured Logging

All requests are logged in JSON format with correlation IDs:

{
  "timestamp": "2024-01-30T10:00:00.000Z",
  "level": "info",
  "message": "Tool call started",
  "requestId": "550e8400-e29b-41d4-a716-446655440000",
  "tool": "vic_planning_property_report",
  "metadata": {
    "address": "1 Spring St"
  }
}

Analytics

Enable Cloudflare Analytics Engine for:

  • Request counts and latency
  • Cache hit/miss rates
  • Error tracking
  • API performance metrics

Deployment Options

Option 1: Cloudflare Workers (Recommended)

  • 300+ edge locations
  • $5/month base + usage
  • Lowest latency globally

Option 2: Vercel Edge Functions

See Vercel deployment guide for migration instructions.

Option 3: Oracle Server

Traditional Node.js deployment - see v1.0 branch.

Troubleshooting

Common Issues

KV Namespace not found:

# Create namespace and update wrangler.toml
wrangler kv:namespace create "CACHE"

Rate limit errors:

# Increase limit in wrangler.toml
RATE_LIMIT_PER_MINUTE = "200"

Authentication failures:

# Check API key is set
wrangler secret list
wrangler secret put API_KEY

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

License

MIT

Support

Changelog

v2.0.0 (2024-01-30)

  • ✨ Rewritten for Cloudflare Workers
  • ✨ HTTP-based MCP protocol
  • ✨ Enhanced property data with land size
  • ✨ Real-time progress updates
  • ✨ Parallel API requests
  • ✨ Intelligent caching with Workers KV
  • ✨ Complete field coverage (15+ fields)
  • 🔒 Production-ready security
  • 📊 Structured logging and metrics

v1.0.0

  • Initial Node.js stdio implementation

Built with ❤️ for Australian planning research

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选