Windsurf

Windsurf

이 가이드는 Windsurf용 mcp-grafana 서버를 설정하는 방법을 안내해요.

출처: 문서

본문

전제 조건

  • Windsurf IDE 설치
  • 서비스 계정 토큰이 있는 Grafana 9.0+
  • PATH에 있는 mcp-grafana 바이너리

구성

구성 파일 위치:

OS 경로
macOS/Linux ~/.codeium/windsurf/mcp_config.json
Windows %USERPROFILE%\.codeium\windsurf\mcp_config.json

UI로 추가

  1. Windsurf 설정을 열어요(Cmd+Shift+P -> Open Windsurf Settings).
  2. Cascade 섹션으로 스크롤해요.
  3. Add Server 또는 View raw config를 클릭해요.

수동 구성

~/.codeium/windsurf/mcp_config.json을 만들거나 편집해요:

{
  "mcpServers": {
    "grafana": {
      "command": "mcp-grafana",
      "args": [],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your-token>"
      }
    }
  }
}

Docker 구성

{
  "mcpServers": {
    "grafana": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "GRAFANA_URL",
        "-e",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN",
        "grafana/mcp-grafana",
        "-t",
        "stdio"
      ],
      "env": {
        "GRAFANA_URL": "http://host.docker.internal:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your-token>"
      }
    }
  }
}

디버그 모드

{
  "mcpServers": {
    "grafana": {
      "command": "mcp-grafana",
      "args": ["-debug"],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your-token>"
      }
    }
  }
}

구성 검증

  1. 서버를 추가한 후 새로고침 버튼을 클릭해요.
  2. Cascade 뷰를 열어요.
  3. 망치 아이콘(MCP 서버)을 클릭해요.
  4. Grafana가 녹색 상태로 표시되어야 해요.
  5. "내 Grafana 대시보드를 나열해 줘"라고 물어봐요.

도구 제한

Windsurf는 총 MCP 도구를 100개로 제한해요. 제한에 도달하면:

  1. Windsurf 설정 -> Manage plugins로 이동해요.
  2. 사용하지 않는 서버를 비활성화해요.
  3. 필요 없는 개별 도구를 꺼요.

문제 해결

서버가 연결되지 않음:

  • Cascade 설정에서 새로고침 버튼을 눌러요.
  • JSON 구문을 확인해요.
  • 바이너리가 존재하는지 확인해요: which mcp-grafana

SSE 전송 (원격 서버): stdio 대신 HTTP 기반 연결이 필요하면:

mcp-grafana --transport streamable-http --address localhost:8000

그런 다음 serverUrl로 구성해요:

{
  "mcpServers": {
    "grafana": {
      "serverUrl": "http://localhost:8000/mcp"
    }
  }
}

읽기 전용 모드

{
  "mcpServers": {
    "grafana": {
      "command": "mcp-grafana",
      "args": ["--disable-write"],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your-token>"
      }
    }
  }
}

다음 단계