Skip to content

MCP 서버

AI 도구 안에서 잔고·모델·단가·사용량 바로 조회

PleumRouter 공식 MCP 서버를 MCP(Model Context Protocol)를 지원하는 AI 도구(Claude Code, Codex 등)에 연결하면, 코딩 중에 웹 대시보드로 이동하지 않고도 "남은 크레딧 얼마야?", "이 모델 단가는?", "이번 주 사용량은?" 을 바로 물을 수 있습니다.

MCP 서버란#

MCP는 AI 도구가 외부 서비스에 연결되는 표준 방식입니다. 이 서버는 상태를 저장하지 않는 읽기 전용 조회 서버이며, 사용자의 API 키는 요청 시에만 사용되고 서버에 저장되지 않습니다.

연결 방법#

https://pleum-router-mcp.wylee0806-repo.workers.dev/mcp

json
{
  "mcpServers": {
    "pleum": {
      "url": "https://pleum-router-mcp.wylee0806-repo.workers.dev/mcp",
      "headers": { "Authorization": "Bearer plm_xxxxxxxxxxxxxxxx" }
    }
  }
}
인증이 필요한 도구는 대시보드에서 발급한 API 키(plm_...)를 Authorization: Bearer 헤더로 전달합니다. 키는 이 서버를 경유해 저장 없이 상류 API로 전달됩니다.

제공 도구#

다섯 개 도구를 제공합니다:

  • list_models모델 카탈로그 검색(공개, 인증 불필요)
  • get_model모델 단가 상세 — provider별 오퍼링·양자화 포함(공개)
  • estimate_cost토큰 수 기준 비용 추정(공개)
  • get_credits크레딧 잔액 조회 (🔑 필요)
  • get_usage기간별 사용 리포트 (🔑 usage:read)

직접 호출#

MCP 클라이언트 없이 JSON-RPC로 직접 호출할 수도 있습니다 — 배치 스크립트·모니터링에 유용합니다.

bash
curl -X POST https://pleum-router-mcp.wylee0806-repo.workers.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
        "protocolVersion":"2025-03-26","capabilities":{},
        "clientInfo":{"name":"curl","version":"0"}}}'}
bash
curl -X POST https://pleum-router-mcp.wylee0806-repo.workers.dev/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer plm_xxxxxxxxxxxxxxxx" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{
        "name":"get_credits","arguments":{}}}'