furiosa-dashboard-mcp
# furiosa-dashboard-mcp
dashboard.furiosa.dev 를 MCP 도구로 감싼 서버입니다. 데이터 조회는 대시보드 전체가 공유하는 Supabase(PostgREST) 백엔드를 그대로 쓰고, 나머지 도구들은 각 뷰어 페이지로 바로 이동하는 링크만 만들어줍니다.
## 빌드
```bash
npm install
npm run build
```
Supabase URL/anon key는 [`config.defaults.json`](./config.defaults.json)에 고정값으로 넣어뒀습니다. 매번 환경변수로 넘길 필요는 없습니다. 다른 Supabase 프로젝트를 쓰고 싶다면 `FURIOSA_DASHBOARD_SUPABASE_URL` / `FURIOSA_DASHBOARD_ANON_KEY` 환경변수로 덮어쓰면 되고, 이쪽이 우선됩니다.
빌드가 끝나면 아래 로그인 한 번만 해주면 됩니다.
## 로그인
```bash
npm run login
# 또는: node dist/login.js
```
Google OAuth(PKCE) 플로우를 띄우고 로컬 콜백으로 세션을 받아옵니다.
1. `http://127.0.0.1:51820/callback`을 redirect_to로 하는 Supabase OAuth URL을 만들어 출력하고, 가능하면 기본 브라우저로 자동으로 엽니다.
2. furiosa.ai Google 계정으로 로그인/동의.
3. Supabase가 `code`를 붙여서 로컬 콜백으로 리다이렉트하면, 임시로 띄운 로컬 HTTP 서버가 이를 받아 세션으로 교환합니다.
4. 세션을 `~/.config/furiosa-dashboard-mcp/session.json`에 저장하고 종료. 이후 갱신되는 refresh token도 같은 파일에 계속 반영됩니다.
### 수동 방법 (로그인 스크립트가 막힐 때만)
1. 브라우저에서 `https://dashboard.furiosa.dev/performance-tracker`에 로그인합니다.
2. 개발자도구 → Application(또는 Storage) → Local Storage → `https://dashboard.furiosa.dev`로 들어갑니다.
3. `sb-<project-ref>-auth-token` 형태의 키를 찾아서 값(JSON) 안의 `refresh_token`을 복사합니다. Supabase URL/anon key는 이미 `config.defaults.json`에 있으니 따로 찾을 필요 없습니다.
4. 최초 1회만 `FURIOSA_DASHBOARD_REFRESH_TOKEN` 환경변수로 넘겨주면, 그 다음부터는 세션 파일이 알아서 갱신합니다.
## MCP 클라이언트 등록
`npm run login`으로 세션 파일을 한 번 만들어두면 클라이언트 설정에 `env`를 따로 넣을 필요가 없습니다(Supabase URL/anon key는 `config.defaults.json`에서 자동으로 읽힙니다).
```json
{
"mcpServers": {
"furiosa-dashboard": {
"type": "stdio",
"command": "node",
"args": ["furiosa-dashboard-mcp/dist/index.js"]
}
}
}
```
로그인을 아직 안 했거나 다른 머신이라 세션 파일이 없다면, 수동 방법으로 얻은 refresh_token을 `env.FURIOSA_DASHBOARD_REFRESH_TOKEN`으로 한 번만 넣어줘도 됩니다.
## 제공 기능
| 도구 | 설명 |
|---|---|
| `list_recent_commits` | `master_commits`에서 최신 벤치마크 커밋 목록 (full sha, timestamp) |
| `list_summaries` | 커밋의 short-sha(앞 10자) 기준 `summaries` 벤치마크 요약 목록. `summary` 필드에 컴파일 사이클/시간/메모리 등 상세 메트릭 포함 |
| `get_summary` | `summaries` 단일 행 조회 (UUID) |
| `compare_commits` | 두 커밋의 `summaries`를 test+context+cloud로 매칭해 diff. 추가/삭제된 테스트, pass/fail 변화, execution cycle 변화, 컴파일 cycle/시간 회귀·개선 top N, summary JSON 안의 모든 숫자 필드를 훑어 변화량 순으로 랭킹하는 `fieldChanges`(초도 분석용), `commit-diff` 링크까지 반환 |
| `get_ir_viewer_url` | `dashboard.furiosa.dev/ir-text-viewer` 링크 생성 (short-sha → full-sha 자동 변환) |
| `get_ir_viewer_compare_url` | `ir-viewer.furiosa.dev/compare/` 두 커밋 비교 링크 생성 (dashboard의 ir-text-viewer와는 별개 서비스). short-sha 그대로 사용 |
| `get_tactic_debug_url` | `dashboard.furiosa.dev/tactic-debug` 두 커밋 비교 링크 생성. 파라미터 형태는 ir-viewer-compare와 동일 |
| `get_tc_viewer_url` | `dashboard.furiosa.dev/tc-viewer` 두 커밋 비교 링크 생성. `sha`(current)/`baseSha`(base) 분리, context/test는 단일값 |
| `build_ir_view_recipe_url` | "Bridge 하이라이트해줘", "IO는 파란색으로" 같은 자연어 표시 요청을 소수의 view 지시어(recipe)로 변환해 `ir-text-viewer` URL에 인코딩 |
TDQS
Scored across 9 tools
The data-retrieval tools are distinct, but the five URL-builder tools blur together: get_ir_viewer_url vs get_ir_viewer_compare_url and get_tc_viewer_url vs get_tactic_debug_url are easy to confuse. The descriptions help clarify the differences, but an agent could still pick the wrong viewer builder without careful reading.
Tool names are mostly consistent snake_case verb_noun forms (list_*, get_*, compare_*), which is predictable. Minor deviations exist in the URL-builder cluster, especially build_ir_view_recipe_url using 'build' instead of 'get' and the inconsistent 'tc' abbreviation vs full 'tactic'.
Nine tools is a reasonable, well-scoped count for a benchmark dashboard MCP. However, build_ir_view_recipe_url is explicitly a draft/proposed contract with no working renderer, so one tool is currently more speculative than functional.
The core read-only workflow is covered: listing benchmarked commits, querying summaries, fetching full summary details, comparing commits, and generating viewer URLs. Minor gaps include no way to enumerate available contexts/clouds/tests directly and no get-commit-by-sha tool, but agents can work around these from the existing list tools.