SimBrief Flight Planning MCP Server

SimBrief Flight Planning MCP Server

Enables access to SimBrief flight planning data through Claude Desktop with secure Google OAuth authentication. Provides tools to retrieve flight plans, dispatch briefings, NOTAMs, weather data, and other aviation planning information.

Category
访问服务器

README

SimBrief Flight Planning MCP Server

A Model Context Protocol (MCP) server that provides access to SimBrief flight planning data for Claude Desktop and other MCP clients. Built with TypeScript, deployed on Cloudflare Workers with Google OAuth authentication.

Features

  • Google OAuth Authentication: Secure access control with email-based permissions
  • Cloudflare Workers: Edge deployment with Durable Objects for stateful sessions
  • SSE/HTTP Transports: Dual protocol support for MCP clients
  • SimBrief API Integration: Complete access to flight planning data
  • TypeScript: Full type safety and modern async/await patterns
  • Sentry Integration: Optional error tracking and performance monitoring
  • Rate Limit Optimization: Optional API key support for improved SimBrief rate limits

Available MCP Tools

Flight Plan Tools

  1. getLatestFlightPlan (Preferred/Default)

    • Get complete JSON data for your latest flight plan
    • Includes all details: NOTAMs, weather, crew alerts, MEL/CDL, etc.
    • Use by default unless user specifically asks for a summary
  2. getFlightPlanById

    • Get complete JSON data for a specific flight plan by ID
    • Requires 21-character SimBrief plan ID
  3. getDispatchBriefing

    • Get formatted dispatch briefing with operational information
    • Includes: flight info, route, fuel planning, weights, weather
  4. getLatestFlightPlanSummary

    • Get summary of latest flight plan
    • Use only if user specifically requests a summary
  5. getFlightPlanByIdSummary

    • Get summary of specific flight plan by ID

Installation

Prerequisites

  • Node.js 18 or higher
  • npm or yarn
  • Cloudflare account
  • SimBrief account and User ID
  • Google OAuth credentials

Setup

  1. Clone the repository:
cd simbrief-mcp
  1. Install dependencies:
npm install
  1. Configure Wrangler:

Edit wrangler.toml to set your KV namespace ID:

[[kv_namespaces]]
binding = "OAUTH_KV"
id = "your-kv-namespace-id"  # Replace with your actual KV namespace ID
  1. Set up secrets:
# Required secrets
wrangler secret put GOOGLE_CLIENT_ID
wrangler secret put GOOGLE_CLIENT_SECRET
wrangler secret put COOKIE_ENCRYPTION_KEY

# Optional secrets
wrangler secret put SIMBRIEF_API_KEY  # Improves rate limits
wrangler secret put SENTRY_DSN        # Error tracking

To generate a COOKIE_ENCRYPTION_KEY:

openssl rand -base64 32
  1. Configure allowed users:

Edit src/config/allowed-users.ts and add your email username (part before @):

const ALLOWED_USERNAMES = new Set<string>([
  'your-username',  // For your-username@gmail.com
]);
  1. Get your SimBrief User ID:
    • Log in to SimBrief (https://www.simbrief.com)
    • Go to Account Settings
    • Find your Pilot ID (this is your User ID)

Development

Local Development

# Start local development server (port 8794)
npm run dev

# Type checking
npm run type-check

# Generate Cloudflare types
npm run cf-typegen

Building

npm run build

Deployment

npm run deploy

Claude Desktop Integration

Local Development Configuration

Add to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "simbrief": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:8794/mcp"],
      "env": {}
    }
  }
}

Production Configuration

{
  "mcpServers": {
    "simbrief": {
      "command": "npx",
      "args": ["mcp-remote", "https://your-worker.workers.dev/mcp"],
      "env": {}
    }
  }
}

Replace your-worker.workers.dev with your actual Cloudflare Workers domain.

Usage Examples

Get Latest Flight Plan

Ask Claude:

"Get my latest SimBrief flight plan for user ID 123456"

Get Dispatch Briefing

Ask Claude:

"Get dispatch briefing for my latest flight plan (user ID 123456)"

Get Specific Flight Plan

Ask Claude:

"Get flight plan ABCDEF123456789012345 for user 123456"

Project Structure

simbrief-mcp/
├── src/
│   ├── auth/
│   │   ├── google-handler.ts       # Google OAuth flow
│   │   └── oauth-utils.ts          # OAuth utilities
│   ├── config/
│   │   └── allowed-users.ts        # User access control
│   ├── tools/
│   │   ├── simbrief-api.ts         # SimBrief API client
│   │   └── register-simbrief-tools.ts  # MCP tools registration
│   ├── types/
│   │   └── index.ts                # TypeScript types
│   └── index.ts                    # Main entry point
├── wrangler.toml                   # Cloudflare Workers config
├── tsconfig.json                   # TypeScript config
├── package.json                    # Dependencies
└── README.md                       # This file

Environment Variables

Required Secrets

  • GOOGLE_CLIENT_ID: Google OAuth client ID
  • GOOGLE_CLIENT_SECRET: Google OAuth client secret
  • COOKIE_ENCRYPTION_KEY: 32-character random string for cookie signing

Optional Secrets

  • SIMBRIEF_API_KEY: SimBrief API key for improved rate limits
  • SENTRY_DSN: Sentry DSN for error tracking
  • ENVIRONMENT: Environment name (defaults to "production")

Security Features

  • OAuth 2.0: Google authentication with email verification
  • HMAC Cookies: Signed cookies for client approval persistence
  • Access Control: Email-based user allowlist
  • Error Sanitization: Sensitive information removed from errors
  • Edge Security: Cloudflare Workers security features

Monitoring

  • Console Logs: Available in Cloudflare dashboard
  • Sentry Integration: Optional error tracking and performance monitoring
  • Cloudflare Analytics: Built-in request metrics

Troubleshooting

Configuration Issues

Problem: Cannot find SimBrief User ID

Solution:

  1. Log in to SimBrief
  2. Go to Account Settings
  3. Your Pilot ID is your User ID

Authentication Issues

Problem: "Access Denied" error

Solution:

  • Check that your email username is in src/config/allowed-users.ts
  • Verify Google OAuth credentials are set correctly

API Errors

Problem: "SimBrief API error" messages

Solution:

  1. Verify User ID is correct
  2. Check if you have recent flight plans on SimBrief
  3. If using API key, ensure it's valid

Differences from Original Python Version

Improvements

  1. TypeScript: Full type safety and better IDE support
  2. Cloudflare Workers: Edge deployment for global low latency
  3. Google OAuth: Secure authentication instead of public access
  4. Better Error Handling: Comprehensive error messages with Sentry integration
  5. Code Organization: Modular structure with clear separation of concerns
  6. Production Ready: Built-in monitoring, logging, and security features

Migration Notes

If you're migrating from the Python version:

  1. User ID is still passed as a parameter (not environment variable)
  2. All tool names follow camelCase convention (getLatestFlightPlan vs get_latest_flight_plan)
  3. Requires Google authentication - set up allowed users
  4. Deployed on Cloudflare Workers instead of running locally

Contributing

Contributions are welcome! Please ensure:

  1. Code follows TypeScript and Prettier formatting
  2. All tools include proper error handling
  3. Documentation is updated for new features
  4. Tests pass (if applicable)

License

MIT

Support

For issues or questions:

  • Check the troubleshooting section above
  • Review Cloudflare Workers logs
  • Check Sentry for error details (if configured)

Credits

Built with:

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选