uv init mcp-server-demo
cd mcp-server-demo
uv add "mcp[cli]" uv pip install mcp-python pandas matplotlib openpyxl fastapi uvicorn pillow uv run mcp dev server.py
uv run mcp install server.py
Excel MCP 서버
이 프로젝트는 Excel 데이터 작업을 위한 도구와 리소스를 제공하는 모델 컨텍스트 프로토콜(MCP) 서버를 구현합니다. 이 서버는 간단한 API를 통해 Excel 데이터를 읽고, 업데이트하고, 필터링하고, 시각화하는 기능을 제공합니다.
특징
- Excel 작업 : Excel 파일 읽기 및 쓰기
- 데이터 필터링 : 다양한 기준에 따라 데이터를 필터링하고 검색합니다.
- 데이터 분석 : 통계 요약 및 피벗 테이블 생성
- 데이터 시각화 : 다양한 차트와 시각화를 만들어 보세요
- 업데이트 작업 : 셀 업데이트, 행 추가, 행 삭제
- 이상 탐지 : 수치형 데이터에서 이상치 찾기
- 차트 추천 : 적절한 시각화를 자동으로 제안합니다.
설치
- 필요한 종속성을 설치하세요:
지엑스피1
- 이 저장소를 복제하거나 파일을 다운로드하세요.
server.py
- MCP 서버 구현client.py
- 기능을 보여주는 데모 클라이언트
용법
서버 시작
서버를 실행합니다:
서버는 기본적으로 http://localhost:8000
에서 시작됩니다.
클라이언트 데모 사용
클라이언트 데모 스크립트는 MCP 서버로 수행할 수 있는 다양한 작업을 보여줍니다.
이렇게 하면:
- 샘플 Excel 파일을 만듭니다(존재하지 않는 경우)
- 기본 Excel 작업을 시연합니다
- 데이터 필터링 기능 표시
- 시각화 생성
- 데이터 업데이트 수행
- 데이터의 이상 감지
API 직접 사용
MCP 서버의 API를 직접 사용할 수 있습니다.
도구 API
/tools/{tool_name}
에 대한 POST 요청을 사용하여 도구를 호출합니다.
리소스 API
/resources/{resource_path}
에 대한 GET 또는 POST 요청을 사용하여 리소스에 액세스합니다.
사용 가능한 도구
엑셀 작업
read_excel
- Excel 파일에서 데이터 읽기write_excel
- Excel 파일에 데이터 쓰기get_excel_sheets
- Excel 파일의 시트 목록을 가져옵니다.
데이터 필터링
filter_data
- 조건에 따라 Excel 데이터 필터링search_data
- Excel 데이터에서 용어 검색
데이터 분석
summarize_data
- Excel 데이터의 통계 요약을 가져옵니다.create_pivot_table
- Excel 데이터에서 피벗 테이블 만들기
데이터 시각화
visualize_chart
- 다양한 차트 유형(막대형, 선형, 분산형, 원형, 히스토그램)을 생성합니다.recommend_charts
- 데이터 구조에 따른 차트 추천 받기
업데이트 작업
update_cell
- Excel 파일의 특정 셀을 업데이트합니다.add_row
- Excel 파일에 새 행 추가delete_rows
- 필터를 기반으로 Excel 파일에서 행 삭제
추가 기능
detect_anomalies
- Z-점수를 사용하여 숫자형 데이터에서 이상치 찾기export_to_csv
- Excel 데이터를 CSV 형식으로 내보내기
사용 가능한 리소스
excel://{filename}/sheets
- Excel 파일의 시트 목록 가져오기excel://{filename}/sheet/{sheet_name}
- 특정 시트에서 데이터 가져오기excel://{filename}/sheet/{sheet_name}/summary
- 시트 데이터 요약 가져오기excel://{filename}/sheet/{sheet_name}/filter
- 시트의 데이터 필터링
예: 사용자 정의 클라이언트 만들기
MCP 서버와 상호 작용하기 위해 고유한 클라이언트를 만들 수 있습니다.
AI 모델과의 통합
이 MCP 서버는 Claude와 같은 AI 모델과 쉽게 통합되어 Excel 데이터에 자연어 인터페이스를 제공할 수 있습니다.
- AI는 사용자의 요청에 따라 적절한 MCP 도구를 호출할 수 있습니다.
- 도구에서 반환된 데이터를 처리합니다.
- 사용자에게 통찰력과 시각화를 제공합니다.
이를 통해 자연어 요청을 이해하고 Excel 데이터를 분석하고 조작할 수 있는 대화형 "Excel 도우미"가 생성됩니다.
This server cannot be installed
간단한 API를 통해 Excel 데이터를 읽고, 업데이트하고, 필터링하고, 시각화하기 위한 도구를 제공하는 모델 컨텍스트 프로토콜 서버입니다.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides tools for reading Excel (xlsx) files, enabling extraction of data from entire workbooks or specific sheets with results returned in structured JSON format.Last updated -35Apache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.Last updated -61,629510MIT License
- AsecurityAlicenseAqualityEnables seamless reading, writing, and analyzing of Excel files through Model Context Protocol, with features for worksheet management, structure analysis, and automated caching.Last updated -810241MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with Microsoft 365 services (Excel, Calendar, Mail, OneDrive, Teams, etc.) through the Graph API, allowing AI assistants to manage Microsoft 365 resources via natural language.Last updated -2,971258MIT License