#109 MCP Logging — Fully operational. PostgreSQL table, Arbiter API, Trinity Console page with filters/stats/expandable details, Trinity Core v2.3.0 POSTs logs after every command. #111 Trinity Core Web MCP — Completed by Chronicler #77. Claude.ai native connector working since Apr 11. #112 Trinity Core Security — spawn() fix done by #77, log rotation via cron, REST+MCP dual endpoints by #78. Chronicler #78 | firefrost-operations-manual
81 lines
2.1 KiB
Markdown
81 lines
2.1 KiB
Markdown
---
|
|
task_number: 111
|
|
title: Trinity Core Native Web MCP Connector
|
|
status: Complete
|
|
priority: P1-High
|
|
is_blocker: false
|
|
owner: Michael
|
|
tags:
|
|
- trinity-core
|
|
- mcp
|
|
- claude-web
|
|
- infrastructure
|
|
estimated_hours: 2
|
|
---
|
|
|
|
# Trinity Core Native Web MCP Connector
|
|
|
|
Upgrade Trinity Core from REST API to native Claude.ai web connector using MCP SDK with SSE transport and OAuth shim.
|
|
|
|
## Why
|
|
|
|
Currently Claude can't call Trinity Core directly. This upgrade enables Claude to execute commands on Firefrost servers **directly from claude.ai web** — no Desktop app, no curl commands, no manual intervention.
|
|
|
|
**This is the RV dream:** Full infrastructure access from any browser, anywhere.
|
|
|
|
## Prerequisites
|
|
|
|
- Trinity Core v1 deployed ✅
|
|
- SSH keys configured ✅
|
|
- Cloudflare Tunnel active ✅
|
|
|
|
## Full Implementation
|
|
|
|
See `docs/consultations/gemini-mcp-web-implementation-2026-04-11.md` for complete code (Blocks A-F) and step-by-step instructions.
|
|
|
|
## Quick Summary
|
|
|
|
1. **Update package.json** — Add `"type": "module"`, install `@modelcontextprotocol/sdk` and `cors`
|
|
2. **Replace index.js** — MCP SDK with SSE transport + OAuth shim
|
|
3. **Register in Claude.ai** — Settings → Connectors → Add custom → `https://mcp.firefrostgaming.com/mcp`
|
|
|
|
## Architecture
|
|
|
|
```
|
|
Claude.ai (browser)
|
|
↓ MCP over SSE
|
|
Trinity Core (mcp.firefrostgaming.com)
|
|
↓ SSH
|
|
Target Server
|
|
```
|
|
|
|
## New Endpoints
|
|
|
|
| Endpoint | Purpose |
|
|
|----------|---------|
|
|
| `GET /.well-known/oauth-protected-resource` | OAuth discovery |
|
|
| `GET /authorize` | Auto-approve redirect |
|
|
| `POST /token` | Return Bearer token |
|
|
| `GET /mcp` | Establish SSE stream |
|
|
| `POST /mcp/messages` | Receive tool calls |
|
|
|
|
## Tools Exposed
|
|
|
|
| Tool | Description |
|
|
|------|-------------|
|
|
| `list_servers` | Get available Firefrost servers |
|
|
| `run_command` | Execute SSH command on specified server |
|
|
|
|
## Testing
|
|
|
|
Before registering with Claude.ai:
|
|
```bash
|
|
npx @modelcontextprotocol/inspector node index.js
|
|
```
|
|
|
|
## Security Notes
|
|
|
|
- CORS configured for `https://claude.ai` only
|
|
- OAuth shim auto-approves (single user)
|
|
- Consider adding `express-rate-limit` for hardening
|