Add full MCP 2025-11-25 protocol coverage to v2_ux.md

- Add server.json import support (Issue #922) for MCP Registry format
- Add History Screen with automatic capture and replay functionality
- Add Pino logging rationale with log-as-history architecture
- Remove emojis from markdown files, use text alternatives

New UX sections added:
- Logging Screen (notifications/message, logging/setLevel)
- Tasks Screen (tasks/*, notifications/task/statusChanged)
- Sampling Panel (sampling/createMessage)
- Elicitation Handler (form + URL modes)
- Roots Configuration (roots/list)
- Experimental Features Panel (raw JSON-RPC tester)

Enhanced existing screens:
- Tools: annotations, autocomplete, progress indicators, image/audio
- Resources: annotations, subscriptions
- Prompts: autocomplete
- Navigation: ping latency, listChanged indicators

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
olaservo 2025-11-30 06:39:24 -07:00
commit 79b5e9fdd3
2 changed files with 898 additions and 89 deletions

View file

@ -39,3 +39,66 @@ Let's step up our logging capability with an advanced logger:
* -[ ] [Morgan](https://github.com/expressjs/morgan?tab=readme-ov-file#morgan)
* -[ ] [Log4js](https://github.com/stritti/log4js?tab=readme-ov-file#log4js)
* -[ ] [Bunyan](https://github.com/trentm/node-bunyan)
#### Pino Rationale
Pino is selected for synergy with the **History Screen** feature. The log file serves dual purposes:
1. **Server diagnostics** - Standard application logging
2. **History persistence** - Request/response replay source
**Why Pino over Winston:**
| Requirement | Pino | Winston |
|-------------|------|---------|
| Default JSON format | Yes - NDJSON | No - Text (needs config) |
| Line-by-line parsing | Yes - Native | No - Extra work |
| High-throughput logging | Yes - Very fast | Partial - Slower |
| Log rotation | Yes - pino-roll | Yes - winston-daily-rotate |
| Dev-friendly output | Yes - pino-pretty | Yes - Built-in |
**Architecture:**
```
┌─────────────────────────────────────────────────────────────────┐
│ Proxy Server │
│ │
│ MCP Request ──▶ Pino Logger ──┬──▶ history.ndjson (file) │
│ │ │
│ └──▶ Console (pino-pretty) │
│ │
│ History API: GET /api/history?method=tools/call&limit=50 │
│ (parses history.ndjson, returns filtered JSON) │
└─────────────────────────────────────────────────────────────────┘
```
**Log Entry Schema:**
Each MCP operation logs a request/response pair:
```json
{"ts":1732987200000,"level":"info","type":"mcp_request","method":"tools/call","target":"echo","params":{"message":"hello"},"requestId":"abc123","serverId":"my-server"}
{"ts":1732987200045,"level":"info","type":"mcp_response","requestId":"abc123","result":{"content":[{"type":"text","text":"hello"}]},"duration":45,"success":true}
```
**Schema fields:**
| Field | Description |
|-------|-------------|
| `ts` | Unix timestamp (ms) |
| `level` | Log level (info, error) |
| `type` | `mcp_request` or `mcp_response` |
| `method` | MCP method (tools/call, resources/read, prompts/get, etc.) |
| `target` | Tool name, resource URI, or prompt name |
| `params` | Request parameters |
| `requestId` | Correlation ID linking request to response |
| `serverId` | Server identifier |
| `result` | Response data (for mcp_response) |
| `error` | Error message (for failed requests) |
| `duration` | Response time in ms |
| `success` | Boolean success indicator |
**Dependencies:**
- `pino` - Core logger
- `pino-pretty` - Dev console formatting
- `pino-roll` - Log rotation (optional)
- `pino-http` - Express integration

File diff suppressed because it is too large Load diff