Graphistry MCP
OfficialGraphistry MCP 통합
Graphistry와 MCP를 사용하여 대규모 언어 모델을 위한 GPU 가속 그래프 시각화 및 분석.
개요
이 프로젝트는 Graphistry의 강력한 GPU 가속 그래프 시각화 플랫폼과 모델 제어 프로토콜(MCP)을 통합하여 AI 어시스턴트와 LLM(모델 관리)을 위한 고급 그래프 분석 기능을 제공합니다. LLM은 표준화되고 LLM 친화적인 인터페이스를 통해 복잡한 네트워크 데이터를 시각화하고 분석할 수 있습니다.
주요 특징:
Graphistry를 통한 GPU 가속 그래프 시각화
고급 패턴 발견 및 관계 분석
네트워크 분석(커뮤니티 감지, 중심성, 경로 찾기, 이상 감지)
다양한 데이터 형식 지원(Pandas, NetworkX, edge 리스트)
LLM 친화적 API: 그래프 도구를 위한 단일
graph_data사전
Related MCP server: Neo4j GraphRAG MCP Server
🚨 중요: 그래픽 디자인 등록이 필요합니다
이 MCP 서버에서 시각화 기능을 사용하려면 무료 Graphistry 계정이 필요합니다.
hub.graphistry.com 에서 무료 계정에 가입하세요
서버를 시작하기 전에 자격 증명을 환경 변수나
.env파일로 설정하세요.지엑스피1
템플릿은
.env.example참조하세요.
MCP 구성(.mcp.json)
이 프로젝트를 Cursor 또는 다른 MCP 호환 도구와 함께 사용하려면 프로젝트 루트에 .mcp.json 파일이 필요합니다. 템플릿은 .mcp.json.example 형식으로 제공됩니다.
설정:
cp .mcp.json.example .mcp.json.mcp.json 다음과 같이 편집합니다.
환경에 맞는 올바른 경로를 설정하세요(예: 프로젝트 루트, Python 실행 파일, 서버 스크립트)
Graphistry 자격 증명을 설정하세요(또는 환경 변수/.env를 사용하세요)
HTTP와 stdio 모드 중에서 선택하세요:
graphistry-http: HTTP를 통해 연결합니다(url을 서버 포트와 일치하도록 설정하세요)graphistry: stdio를 통해 연결합니다(필요에 따라command,args및env설정합니다)
메모:
.mcp.json.example에는 HTTP 및 stdio 구성이 모두 포함되어 있습니다. 필요에 따라disabled필드를 설정하여 활성화/비활성화할 수 있습니다.환경 변수 설정에 대한 내용은
.env.example참조하세요.
설치
권장 설치(Python venv + pip)
# Clone the repository
git clone https://github.com/graphistry/graphistry-mcp.git
cd graphistry-mcp
# Set up virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Set up your Graphistry credentials (see above)또는 다음 설정 스크립트를 사용하세요.
./setup-graphistry-mcp.sh용법
서버 시작
# Activate your virtual environment if not already active
source .venv/bin/activate
# Start the server (stdio mode)
python run_graphistry_mcp.py
# Or use the start script for HTTP or stdio mode (recommended, sources .env securely)
./start-graphistry-mcp.sh --http 8080보안 및 자격 증명 처리
서버는 python-dotenv를 사용하여 환경 변수 또는
.env에서 자격 증명을 로드하므로 로컬 개발에.env파일을 안전하게 사용할 수 있습니다.start-graphistry-mcp.sh스크립트는.env소스로 사용하며 서버를 시작하는 가장 강력하고 안전한 방법입니다.
커서(또는 다른 LLM 도구)에 추가
.cursor/mcp.json또는 이와 동등한 구성에 MCP 서버를 추가합니다.{ "graphistry": { "command": "/path/to/your/.venv/bin/python", "args": ["/path/to/your/run_graphistry_mcp.py"], "env": { "GRAPHISTRY_USERNAME": "your_username", "GRAPHISTRY_PASSWORD": "your_password" }, "type": "stdio" } }가상 환경이 사용되었는지 확인하세요(venv의 Python에 대한 전체 경로를 사용하거나 실행하기 전에 활성화).
API 버전이나 자격 증명 누락에 대한 오류가 표시되면 환경 변수와 등록을 다시 한번 확인하세요.
예: 그래프 시각화(LLM 친화적 API)
기본 도구인 visualize_graph 는 이제 단일 graph_data 사전을 허용합니다. 예:
{
"graph_data": {
"graph_type": "graph",
"edges": [
{"source": "A", "target": "B"},
{"source": "A", "target": "C"},
{"source": "A", "target": "D"},
{"source": "A", "target": "E"},
{"source": "B", "target": "C"},
{"source": "B", "target": "D"},
{"source": "B", "target": "E"},
{"source": "C", "target": "D"},
{"source": "C", "target": "E"},
{"source": "D", "target": "E"}
],
"nodes": [
{"id": "A"}, {"id": "B"}, {"id": "C"}, {"id": "D"}, {"id": "E"}
],
"title": "5-node, 10-edge Complete Graph",
"description": "A complete graph of 5 nodes (K5) where every node is connected to every other node."
}
}예시(하이퍼그래프):
{
"graph_data": {
"graph_type": "hypergraph",
"edges": [
{"source": "A", "target": "B", "group": "G1", "weight": 0.7},
{"source": "A", "target": "C", "group": "G1", "weight": 0.6},
{"source": "B", "target": "C", "group": "G2", "weight": 0.8},
{"source": "A", "target": "D", "group": "G2", "weight": 0.5}
],
"columns": ["source", "target", "group"],
"title": "Test Hypergraph",
"description": "A simple test hypergraph."
}
}사용 가능한 MCP 도구
그래프 시각화, 분석 및 조작에 사용할 수 있는 MCP 도구는 다음과 같습니다.
visualize_graph : Graphistry의 GPU 가속 렌더러를 사용하여 그래프나 하이퍼그래프를 시각화합니다.
get_graph_ids : 현재 세션에 저장된 모든 그래프 ID를 나열합니다.
get_graph_info : 저장된 그래프의 메타데이터(노드/에지 수, 제목, 설명)를 가져옵니다.
apply_layout : 그래프에 표준 레이아웃(force_directed, radial, circle, grid)을 적용합니다.
detect_patterns : 네트워크 분석(중심성, 커뮤니티 감지, 경로 찾기, 이상 감지)을 실행합니다.
encode_point_color : 열(범주형 또는 연속형)별로 노드 색상 인코딩을 설정합니다.
encode_point_size : 열(범주형 또는 연속형)별로 노드 크기 인코딩을 설정합니다.
encode_point_icon : 열별로 노드 아이콘 인코딩을 설정합니다(범주형, 아이콘 매핑 또는 비닝 포함).
encode_point_badge : 열(범주형, 아이콘 매핑 또는 비닝)별로 노드 배지 인코딩을 설정합니다.
apply_ring_categorical_layout : 범주형 열(예: 그룹/유형)을 기준으로 노드를 링 형태로 배열합니다.
apply_group_in_a_box_layout : 노드를 그룹형 상자 레이아웃으로 배열합니다(igraph 필요).
apply_modularity_weighted_layout : 모듈성 가중치 레이아웃에 따라 노드를 정렬합니다(igraph 필요).
apply_ring_continuous_layout : 노드를 연속된 열(예: 점수)을 기준으로 링 형태로 배열합니다.
apply_time_ring_layout : datetime 열(예: created_at)을 기준으로 노드를 링 형태로 배열합니다.
apply_tree_layout : 노드를 트리(계층적) 레이아웃으로 배열합니다.
set_graph_settings : 고급 시각화 설정(포인트 크기, 모서리 영향 등)을 설정합니다.
기여하다
PR 및 이슈 공유를 환영합니다! LLM 기반 그래프 분석 및 도구 통합에 대한 지식이 더 많아짐에 따라 이 프로젝트는 빠르게 발전하고 있습니다.
특허
MIT
Available Tools
17 toolsapply_group_in_a_box_layoutB
Apply group-in-a-box layout to the graph using Graphistry's group_in_a_box_layout API.
Args:
graph_id (str): The ID of the graph to modify.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_group_in_a_box_layout(graph_id)
Inputs: graph_id (required).
apply_layoutB
Apply a layout algorithm to a graph.
Args:
graph_id: ID of the graph to apply layout to
layout: Layout algorithm to apply (force_directed, radial, circle, grid)
Inputs: graph_id (required), layout (required).
apply_modularity_weighted_layoutB
Apply modularity weighted layout to the graph using Graphistry's modularity_weighted_layout API.
Args:
graph_id (str): The ID of the graph to modify.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_modularity_weighted_layout(graph_id)
Inputs: graph_id (required).
apply_ring_categorical_layoutA
Apply a categorical ring layout to the graph using Graphistry's ring_categorical_layout API.
Args:
graph_id (str): The ID of the graph to modify.
ring_col (str): The node column to use for determining ring membership (e.g., a categorical attribute like 'type' or 'group').
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_ring_categorical_layout(graph_id, ring_col='type')
Inputs: graph_id (required), ring_col (required).
apply_ring_continuous_layoutA
Apply a continuous ring layout to the graph using Graphistry's ring_continuous_layout API.
Args:
graph_id (str): The ID of the graph to modify.
ring_col (str): The node column to use for determining ring position (should be a continuous/numeric attribute, e.g., 'score').
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_ring_continuous_layout(graph_id, ring_col='score')
Inputs: graph_id (required), ring_col (required).
apply_time_ring_layoutB
Apply a time ring layout to the graph using Graphistry's time_ring_layout API.
Args:
graph_id (str): The ID of the graph to modify.
time_col (str): The node column to use for determining ring position (should be a datetime or timestamp attribute, e.g., 'created_at').
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_time_ring_layout(graph_id, time_col='created_at')
Inputs: graph_id (required), time_col (required).
apply_tree_layoutC
Apply a tree (layered hierarchical) layout to the graph using Graphistry's tree_layout API.
Args:
graph_id (str): The ID of the graph to modify.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_tree_layout(graph_id)
Inputs: graph_id (required).
detect_patternsB
Identify patterns, communities, and anomalies within graphs. Runs all supported analyses and returns a combined report.
Args:
graph_id: ID of the graph to analyze
ctx: MCP context for progress reporting
Returns:
Dictionary with results from all analyses that succeeded. Keys may include:
- degree_centrality
- betweenness_centrality
- closeness_centrality
- communities (if community detection is available)
- shortest_path (if path finding is possible)
- path_length
- anomalies (if anomaly detection is available)
- errors (dict of analysis_type -> error message)Inputs: graph_id (required), ctx.
encode_point_badgeA
Set node badge encoding for a graph using Graphistry's encode_point_badge API.
Args:
graph_id (str): The ID of the graph to modify.
column (str): The node column to use for badge encoding (e.g., 'type', 'origin').
position (str, optional): Badge position on the node. Example: 'TopRight', 'BottomLeft', etc.
categorical_mapping (dict, optional): Map of category values to badge icons or images. Example: {'macbook': 'laptop', 'Canada': 'flag-icon-ca'}.
default_mapping (str, optional): Badge to use for values not in categorical_mapping. Example: 'question'.
as_text (bool, optional): If True, use text as the badge (for continuous binning or direct text display).
continuous_binning (list, optional): List of [threshold, badge] pairs for binning continuous values. Example: [[33, None], [66, 'info-circle'], [None, 'exclamation-triangle']].
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_badge(graph_id, column='type', position='TopRight', categorical_mapping={'macbook': 'laptop'}, default_mapping='question')
Inputs: graph_id (required), column (required), position, categorical_mapping, +3 more.
encode_point_colorA
Set node color encoding for a graph using Graphistry's encode_point_color API.
Args:
graph_id (str): The ID of the graph to modify (from visualize_graph).
column (str): The node column to use for color encoding (e.g., 'type', 'score').
categorical_mapping (dict, optional): Map of category values to color codes. Example: {'mac': '#F99', 'macbook': '#99F'}. If not provided, Graphistry will auto-assign colors.
default_mapping (str, optional): Color code to use for values not in categorical_mapping. Example: 'silver'.
as_continuous (bool, optional): If True, treat the column as continuous and use a gradient palette. Example: True for numeric columns like 'score'.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_color(graph_id, column='type', categorical_mapping={'mac': '#F99', 'macbook': '#99F'}, default_mapping='silver')
Inputs: graph_id (required), column (required), categorical_mapping, default_mapping, +1 more.
encode_point_iconA
Set node icon encoding for a graph using Graphistry's encode_point_icon API.
Args:
graph_id (str): The ID of the graph to modify.
column (str): The node column to use for icon encoding (e.g., 'type', 'origin').
categorical_mapping (dict, optional): Map of category values to icon names or URLs. Example: {'macbook': 'laptop', 'Canada': 'flag-icon-ca'}. See FontAwesome 4 or ISO country codes for built-ins.
default_mapping (str, optional): Icon to use for values not in categorical_mapping. Example: 'question'.
as_text (bool, optional): If True, use text as the icon (for continuous binning or direct text display).
continuous_binning (list, optional): List of [threshold, icon] pairs for binning continuous values. Example: [[33, 'low'], [66, 'mid'], [None, 'high']].
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_icon(graph_id, column='type', categorical_mapping={'macbook': 'laptop', 'Canada': 'flag-icon-ca'}, default_mapping='question')
Inputs: graph_id (required), column (required), categorical_mapping, default_mapping, +2 more.
encode_point_sizeB
Set node size encoding for a graph using Graphistry's encode_point_size API.
Args:
graph_id (str): The ID of the graph to modify.
column (str): The node column to use for size encoding (e.g., 'score', 'type').
categorical_mapping (dict, optional): Map of category values to sizes. Example: {'mac': 50, 'macbook': 100}. If not provided, Graphistry will auto-assign sizes.
default_mapping (float, optional): Size to use for values not in categorical_mapping. Example: 20.
as_continuous (bool, optional): If True, treat the column as continuous and use a size gradient. Example: True for numeric columns like 'score'.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_size(graph_id, column='score', as_continuous=True)
Inputs: graph_id (required), column (required), categorical_mapping, default_mapping.
get_graph_idsB
Get a list of all stored graph IDs.
Inputs: no named parameters.
get_graph_infoC
Get information about a stored graph visualization.
Inputs: graph_id (required).
pingB
Health check for Graphistry MCP server.
Inputs: ctx.
set_graph_settingsB
Set visualization settings for a graph using Graphistry's settings API.
Args:
graph_id (str): The ID of the graph to modify.
url_params (dict): Dictionary of Graphistry URL parameters to control visualization. Example: {'pointSize': 0.5, 'edgeInfluence': 2, 'play': 0}.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
set_graph_settings(graph_id, url_params={'pointSize': 0.5, 'play': 0})
Inputs: graph_id (required), url_params (required).
visualize_graphA
Visualize a graph using Graphistry's GPU-accelerated renderer.
Args:
graph_type (str, optional): Type of graph to visualize. Must be one of "graph" (two-way edges, default), "hypergraph" (many-to-many edges).
graph_data (dict): Dictionary describing the graph to visualize. Fields:
- edges (list, required): List of edges, each as a dict with at least 'source' and 'target' keys (e.g., [{"source": "A", "target": "B"}, ...]) and any other columns you want to include in the edge table
- nodes (list, optional): List of nodes, each as a dict with at least 'id' key (e.g., [{"id": "A"}, ...]) and any other columns you want to include in the node table
- node_id (str, optional): Column name for node IDs, if nodes are provided, must be provided.
- source (str, optional): Column name for edge source (default: "source")
- destination (str, optional): Column name for edge destination (default: "target")
- columns (list, optional): List of column names for hypergraph edge table, use if graph_type is hypergraph.
- title (str, optional): Title for the visualization
- description (str, optional): Description for the visualization
ctx: MCP context for progress reporting
Example (graph):
graph_data = {
"graph_type": "graph",
"edges": [
{"source": "A", "target": "B", "weight": 1},
{"source": "A", "target": "C", "weight": 2},
...
],
"nodes": [
{"id": "A", "label": "Node A"},
{"id": "B", "label": "Node B"},
...
],
"node_id": "id",
"source": "source",
"destination": "target",
"title": "My Graph",
"description": "A simple example graph."
}
Example (hypergraph):
graph_data = {
"graph_type": "hypergraph",
"edges": [
{"source": "A", "target": "B", "group": "G1", "weight": 1},
{"source": "A", "target": "C", "group": "G1", "weight": 1},
...
],
"columns": ["source", "target", "group"],
"title": "My Hypergraph",
"description": "A simple example hypergraph."
}
Inputs: graph_data (required), ctx.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools have distinct purposes, with clear separation between layout, encoding, and management functions. However, some layout tools like 'apply_layout' (general) and specific ones like 'apply_group_in_a_box_layout' could cause confusion due to overlapping functionality, though descriptions help clarify their differences.
Tool names follow a highly consistent verb_noun pattern throughout, such as 'apply_group_in_a_box_layout', 'encode_point_color', and 'get_graph_ids'. All tools use snake_case and start with a verb, making the naming predictable and easy to understand.
With 17 tools, the count is slightly high but reasonable for a graph visualization server covering layout, encoding, analysis, and management. It's well-scoped for the domain, though some tools could potentially be consolidated to reduce complexity.
The toolset provides comprehensive coverage for graph visualization workflows, including creation (visualize_graph), layout (multiple apply_* tools), encoding (encode_point_*), analysis (detect_patterns), settings (set_graph_settings), and management (get_graph_ids, get_graph_info). No obvious gaps are present for the server's purpose.
Maintenance
Related MCP Connectors
Persistent, portable memory for AI assistants — your private memory graph, from any MCP client.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Repository knowledge graph MCP server for codebase understanding and debugging.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA graph-based MCP server that provides AI coding agents with persistent memory to store patterns, track complex relationships, and retrieve knowledge across sessions. It leverages graph structures to handle temporal queries and relational paths that traditional vector stores often miss.258MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables LLMs to perform semantic and fulltext searches within Neo4j while executing complex, search-augmented Cypher queries for GraphRAG applications. It provides tools for database schema discovery and supports multi-provider embeddings to facilitate advanced graph traversals.53MIT
- AlicenseNot gradedqualityDmaintenanceA graph database MCP server that lets AI assistants build, analyze, and visualize relationship graphs with algorithms like PageRank and cycle detection.6MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that connects AI assistants to the Data Graphs knowledge graph platform, enabling natural language search, exploration, and querying of graph data.-