pbixray-mcp-server

Integrations

  • Used as a dependency for data processing operations in the PBIXRay server, supporting statistical analysis and data manipulation of Power BI models.

PBIXRay MCP 서버

PBIXRay용 MCP( Model Context Protocol ) 서버.

이 MCP 서버는 LLM 클라이언트가 Power BI(.pbix) 파일과 상호 작용할 수 있는 도구 및 리소스로서 PBIXRay 의 기능을 제공합니다.

특징

  • [x] PBIX 파일 로딩 및 분석
  • [x] 데이터 모델 탐색
    • [x] 모델에 테이블 나열
    • [x] 모델 메타데이터 검색
    • [x] 모델 크기 확인
    • [x] 모델 통계 가져오기
    • [x] 포괄적인 모델 요약 얻기
  • [x] 쿼리 언어 접근
    • [x] Power Query(M) 코드 보기
    • [x] M 매개변수 액세스
    • [x] DAX 계산 테이블 탐색
    • [x] DAX 측정값 보기
    • [x] DAX 계산 열 검사
  • [x] 데이터 구조 분석
    • [x] 스키마 정보 검색
    • [x] 테이블 관계 분석
    • [x] 페이지 매김을 통한 테이블 내용 접근

도구 목록은 구성 가능하므로 MCP 클라이언트에서 사용할 도구를 선택할 수 있습니다. 특정 기능을 사용하지 않거나 민감한 정보를 노출하고 싶지 않을 때 유용합니다.

도구

도구범주설명
load_pbix_file핵심분석을 위해 Power BI(.pbix) 파일을 로드합니다.
get_tables모델모델의 모든 테이블 나열
get_metadata모델Power BI 구성에 대한 메타데이터 가져오기
get_power_query질문데이터 변환에 사용된 모든 M/Power Query 코드 표시
get_m_parameters질문모든 M 매개변수 값 표시
get_model_size모델모델 크기를 바이트 단위로 가져옵니다.
get_dax_tables질문DAX 계산된 테이블 보기
get_dax_measures질문테이블 또는 측정값 이름으로 필터링하여 DAX 측정값에 액세스
get_dax_columns질문필터링 옵션을 사용하여 계산된 열 DAX 표현식에 액세스
get_schema구조데이터 모델 스키마 및 열 유형에 대한 세부 정보를 얻으세요
get_relationships구조데이터 모델 관계에 대한 세부 정보를 얻으세요
get_table_contents데이터페이지 매김을 사용하여 지정된 테이블의 내용을 검색합니다.
get_statistics모델선택적 필터링을 사용하여 모델에 대한 통계를 얻으세요
get_model_summary모델현재 Power BI 모델에 대한 포괄적인 요약을 얻으세요

용법

WSL(권장)

클라이언트 설정 파일에 서버 설정을 추가하세요. 예를 들어, Claude Desktop의 경우:

지엑스피1

WSL 경로 변환(예: Claude Project 지침)

Windows에서 Claude Desktop과 함께 WSL에서 PBIXRay MCP 서버를 사용할 때 PBIX 파일을 로드할 때 경로 차이를 인지해야 합니다. Windows 경로(예 C:\Users\name\file.pbix )는 WSL에서 직접 액세스할 수 없습니다. AI 비서에게 패턴 간 변환 방법을 알려주려면 "mcp 서버가 wsl에서 실행 중입니다. Windows 경로(예: C:\Users\name\file.pbix)는 WSL에서 직접 액세스할 수 없습니다. 대신 파일을 참조할 때 WSL 경로를 사용하세요. Windows: C:\Users\name\Downloads\file.pbix" WSL: /mnt/c/Users/name/Downloads/file.pbix"를 프로젝트 명령어 등에 추가하세요.

명령줄 옵션

서버는 여러 가지 명령줄 옵션을 지원합니다.

  • --disallow [tool_names] : 보안상의 이유로 특정 도구를 비활성화합니다.
  • --max-rows N : 반환되는 최대 행 수를 설정합니다(기본값: 100)
  • --page-size N : 페이지 분할 결과에 대한 기본 페이지 크기를 설정합니다(기본값: 20)

필요에 따라 config json에 명령줄 옵션을 추가할 수 있습니다.

{ "mcpServers": { "pbixray": { "command": "wsl.exe", "args": [ "bash", "-c", "source ~/dev/pbixray-mcp/venv/bin/activate && python ~/dev/pbixray-mcp/src/pbixray_server.py --max-rows 100 --page-size 50 --disallow get_power_query" ], "env": {} } } }

쿼리 옵션

도구는 필터링 및 페이지 매김을 위한 추가 매개변수를 지원합니다.

이름으로 필터링

get_dax_measures , get_dax_columns , get_schema 등과 같은 도구는 특정 이름으로 필터링하는 기능을 지원합니다.

# Get measures from a specific table get_dax_measures(table_name="Sales") # Get a specific measure get_dax_measures(table_name="Sales", measure_name="Total Sales")
대형 테이블에 대한 페이지 매김

get_table_contents 도구는 대용량 테이블을 효율적으로 처리하기 위한 페이지 분할을 지원합니다.

# Get first page of Customer table (default 20 rows per page) get_table_contents(table_name="Customer") # Get second page with 50 rows per page get_table_contents(table_name="Customer", page=2, page_size=50)

개발 및 테스트

PBIXRay MCP 서버를 설치할 수 있습니다.

pip install pbixray-mcp-server

개발 설치

이 프로젝트에 참여하는 개발자를 위해:

  1. 저장소를 복제합니다.
    git clone https://github.com/username/pbixray-mcp.git cd pbixray-mcp
  2. 개발 모드로 설치:
    pip install -e .
  3. 소스에서 설치하는 경우 가상 환경을 만들고 종속성을 설치합니다.
    python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install mcp pbixray numpy

샘플 파일로 테스트하기

저장소에는 시작하는 데 도움이 되는 샘플 파일과 테스트 스크립트가 포함되어 있습니다.

# Test with sample AdventureWorks Sales.pbix file in demo/ folder python tests/test_with_sample.py # Try the interactive demo python examples/demo.py # For isolated tests of specific features python test_pagination.py python test_metadata_fix.py

테스트 스크립트는 demo/ 디렉토리에 제공된 샘플 PBIX 파일을 사용하여 서버와 상호 작용하는 방법을 이해하는 데 도움이 됩니다.

개발 모드

개발 중에 서버를 테스트하려면 MCP Inspector를 사용하세요.

# Activate your environment first source venv/bin/activate # Run the MCP Inspector mcp dev src/pbixray_server.py

도구를 호출하고 응답을 테스트할 수 있는 대화형 세션이 시작됩니다.

프로젝트 구조

pbixray-mcp/ ├── README.md - This file ├── INSTALLATION.md - Detailed installation instructions ├── src/ - Source code │ ├── __init__.py │ └── pbixray_server.py ├── tests/ - Test scripts │ ├── __init__.py │ ├── conftest.py │ ├── test_server.py │ └── test_with_sample.py ├── examples/ - Example scripts and configs │ ├── demo.py │ └── config/ ├── demo/ - Sample PBIX files │ ├── README.md │ └── AdventureWorks Sales.pbix └── docs/ - Additional documentation └── ROADMAP.md

기여

여러분의 기여를 환영합니다!

크레딧

  • Hugoberry - 원본 PBIXRay 라이브러리
  • rusiaaman - WCGW(이 MCP는 Claude가 wcgw를 사용하여 완전히 작성했습니다)

라이센스(클로드는 이것을 추가해야 한다고 주장함)

MIT 라이센스

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

PBIXRay Python 패키지를 통해 메타데이터를 쿼리하여 AI 클라이언트가 PowerBI 모델과 상호 작용할 수 있도록 하는 모델 컨텍스트 프로토콜입니다.

  1. 특징
    1. 도구
      1. 용법
        1. WSL(권장)
          1. WSL 경로 변환(예: Claude Project 지침)
          2. 명령줄 옵션
          3. 쿼리 옵션
        2. 개발 및 테스트
          1. 개발 설치
          2. 샘플 파일로 테스트하기
          3. 개발 모드
          4. 프로젝트 구조
        3. 기여
          1. 크레딧
            1. 라이센스(클로드는 이것을 추가해야 한다고 주장함)

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that provides seamless interaction with Workato's API through custom AI tools, enabling management of recipes, connections, connectors, folders, and activity logs.
                Last updated -
                TypeScript
                MIT License
                • Apple
                • Linux
              • A
                security
                F
                license
                A
                quality
                Implements the Model Context Protocol to allow AI models to access and interact with blockchain data, including reading contract states, retrieving events, and accessing transaction information across various networks.
                Last updated -
                10
                45
                30
                TypeScript
              • -
                security
                A
                license
                -
                quality
                A streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.
                Last updated -
                12
                Python
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables AI models to create and manipulate PowerPoint presentations with advanced features like financial charts, formatting, and template management.
                Last updated -
                1
                Python

              View all related MCP servers

              ID: vibjpsvwgs