Skip to content

feat(station): add MCP tools with owner consent and automatic HTTPS - #1272

Merged
kirillDevPro merged 5 commits into
mainfrom
codex/station-mcp
Nov 7, 2026
Merged

kirillDevPro merged 5 commits into
mainfrom
codex/station-mcp

Conversation

@Moonbot-Tech

@Moonbot-Tech Moonbot-Tech commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Station can now serve an AI client independently of Telegram: the owner enables HTTPS from Terminal, approves one OAuth connection for selected cores and permissions, and the AI reads live facts or submits explicit, observable operations through ActiveLib.

Behavior

  • Add 17 MCP tools for core state, both hedge positions, strategies and their schema, markets, settings, reports, bounded diagnostic log capture, MoonDoc knowledge, operations and cursor-based events.
  • Mutations use a short-lived preview, revalidation on the connection owner, deduplicated apply and honest operation results. SDK order guards survive the runtime queue; strategy resolution carries immutable desired/actual snapshots. Settings reuse the existing full-settings writer, preserve untouched float bits/opaque fields and retain compact-write/manual-order priority.
  • Add OAuth authorization-code flow with S256 PKCE, resource binding, rotating refresh tokens and persistent revocation. Owner consent is available only over the existing private administrative channel. Public client registration alone grants nothing.
  • Add one-button Caddy setup with automatically renewed trusted certificates for a public IP or existing hostname; no MoonBot DNS service or user-managed certificate is required. Caddy has a separate service identity and no access to Station credentials.
  • Add the AI access page in all seven locales and a revision-pinned, locally searched MoonDoc cache that refreshes every six hours.

Dependencies and boundaries

Validation

  • Windows: 9,286 workspace tests passed, 211 ignored; workspace/all-target Clippy with warnings denied, rustfmt and Tour check passed using public locked dependencies.
  • Linux: Station build, 89 unit tests, 9 integration contracts and Clippy passed using the public SDK pin; SDK suite passed 1,280 tests.
  • Real test VPS: trusted public HTTPS, private owner consent, PKCE, the 17-tool catalog, read tools, scope/core denial, refresh/revocation, timed logs, MoonDoc reads and disabled-strategy create/edit/delete passed. The exact production setup call also recovered a stopped Station service.
  • A real settings patch changed only the sound-alert flag, confirmed it from a fresh full core snapshot, then restored and confirmed the original value. The final HTTPS smoke passed after this fix. No live trading commands were sent; MCP grants and the temporary test administrator were removed after testing.
  • Visual checks covered light/graphite at narrow width and dark/Obsidian at narrow and wide widths, loading/disabled state and real client/grant data. Full keyboard-only consent and onboarding in individual AI provider apps remain unverified.
  • Two independent clean-context reviews covered security and command semantics; their findings were addressed.
  • CI: https://github.com/Moonbot-Tech/MoonTerminal/actions/runs/42317383121. macOS diagnostic: https://github.com/Moonbot-Tech/MoonTerminal/actions/runs/42317383036.

@kirillDevPro
kirillDevPro merged commit 9738427 into main Nov 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants