# Open Ephemeris MCP Server — Smithery configuration
# Spec: https://smithery.ai/docs/build/publish
#
# Two transports are available:
#   stdio  — local npx invocation (this config, used by Claude Desktop / Cursor)
#   http   — hosted Streamable HTTP at https://mcp.openephemeris.com/mcp

name: Open Ephemeris
description: >
  NASA JPL DE440-backed astronomical computation engine for AI agents. Typed tools spanning
  natal charts, transit forecasting, Human Design charts, eclipses, astrocartography power
  lines, Venus Star Points, electional timing windows, synastry, composite charts, Vedic
  charts, Chinese BaZi, and more — powered by JPL DE440 ephemerides for sub-arcsecond
  zero-hallucination accuracy. Nine of the tools open interactive charts you can click
  inside the conversation: one MCP Apps build renders in both Claude and ChatGPT.
  Includes an LLM-optimized output format
  (format=llm) that compresses chart responses by 50–73%. Free Explorer tier available.
iconUrl: https://mcp.openephemeris.com/icon.png
homepage: https://openephemeris.com

# JSON Schema for the configuration form rendered in Smithery's UI
configSchema:
  type: object
  title: Open Ephemeris Configuration
  required:
    - apiKey
  properties:
    apiKey:
      type: string
      title: API Key
      description: >
        Your Open Ephemeris API key. Get a free Explorer key at
        https://openephemeris.com/dashboard — no credit card required.
      default: ""
    format:
      type: string
      title: Output Format
      enum:
        - json
        - llm
      description: >
        Default output format for all tools. 'llm' returns compact,
        token-optimized output (50–73% smaller). 'json' returns full verbose JSON.
        Individual tool calls can override this setting.
      default: json
    baseUrl:
      type: string
      title: API Base URL
      description: >
        Override the Open Ephemeris API base URL. Leave blank to use the
        default production endpoint (https://api.openephemeris.com). Useful
        for self-hosted or staging deployments.
      default: ""
    toolSurface:
      type: string
      title: Tool Surface
      description: >
        Which tools to advertise. Leave blank for the curated default set,
        'full' for the whole catalog, or a comma list of traditions —
        astrology, moon, hd, bazi, vedic, acg, electional, venus — to pay
        context only for the work you do (e.g. 'hd,bazi'). Every tool stays
        callable by name regardless of surface.
      default: ""

# How to start the server locally (stdio transport for Claude Desktop / Cursor)
startCommand:
  type: stdio
  commandFunction: |-
    (config) => ({
      command: "npx",
      args: ["-y", "@openephemeris/mcp-server@latest"],
      env: {
        OPENEPHEMERIS_API_KEY: config.apiKey,
        ...(config.format && config.format !== "json" ? { OPENEPHEMERIS_FORMAT: config.format } : {}),
        ...(config.baseUrl ? { OPENEPHEMERIS_BACKEND_URL: config.baseUrl } : {}),
        ...(config.toolSurface ? { OPENEPHEMERIS_TOOLS: config.toolSurface } : {}),
      }
    })
