jupythunder

jupythunder

3.1

If you are the rightful owner of jupythunder and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Jupythunder is a middleware that connects the LLM chat interface (Claude) with Jupyter Notebook, enabling natural language interaction with Jupyter.

ํ•œ๊ตญ์–ด ์„ค๋ช…

Jupythunder

Jupythunder is a middleware that connects the LLM chat interface (Claude) with Jupyter Notebook. This project allows users to interact with Jupyter Notebook in a way that's closer to natural language.

Key Features

  • Natural Language Code Conversion: LLM converts code written by users in a natural language style into correct Python code
  • Jupyter Remote Connection: Supports remote connections via user-provided Jupyter Notebook URL (with token)
  • Code Execution: Executes converted code in Jupyter Notebook and returns results
  • Code Questions: Query information about defined functions, variables, etc. via the /question command
  • State Management: Manages connection state and session information
  • Notebook File Management: Supports creating, opening, cell management and saving .ipynb files
  • Natural Language Data Analysis: Data analysis and visualization workflow through natural language requests
  • Cell Query and Execution: View specific cell contents, execute specific cells, execute all cells sequentially

Installation

Prerequisites

  • Python 3.10 or higher
  • Jupyter Notebook
  • Claude for Desktop (or another MCP client)

Installation Steps

  1. Clone the repository:

    git clone https://github.com/username/jupythunder.git
    cd jupythunder
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Usage

1. Run Jupyter Notebook Server

Run the Jupyter Notebook server in a separate terminal:

jupyter notebook

Check the logs for the URL and token (e.g., http://localhost:8888/?token=abcdef1234567890).

2. Run MCP Server

python jupythunder_server.py

3. Configure Claude for Desktop

Add the MCP server to the claude_desktop_config.json file of Claude for Desktop:

{
  "mcpServers": {
    "jupythunder": {
      "command": "/absolute/path/python",
      "args": ["/absolute/path/jupythunder_server.py"]
    }
  }
}

Important: You must use the absolute path of Python and the script file.

4. Restart Claude for Desktop

Restart Claude for Desktop after changing the configuration.

5. Usage Examples

  1. Connect to Jupyter:

    Connect to Jupyter Notebook. URL is http://localhost:8888/tree?token=abcdef1234567890
    
  2. Create New Notebook:

    /notebook:data_analysis_notebook
    
  3. Open Existing Notebook:

    /open:data_analysis_notebook
    
  4. Natural Language Data Analysis Request:

    Generate random data
    
  5. Data Analysis and Visualization:

    Show statistical analysis results for the generated data
    
    Visualize the correlation between age and income on a graph
    
  6. Writing and Executing Code:

    def calculate_savings(income, expense):
        return income - expense
        
    df['savings'] = calculate_savings(df['income'], df['expenses'])
    df.head()
    
  7. Function Information Lookup:

    /question: What functions are currently defined?
    
  8. Notebook Content Lookup:

    What is the current notebook content?
    
  9. Specific Cell Lookup and Execution:

    Show the content of the first cell
    Execute the second cell
    
  10. Execute All Cells:

    Execute all cells in the notebook sequentially
    

Detailed Feature Description

Notebook Management Features

  • Create New Notebook: Create a new notebook with the /notebook:notebook_name command
  • Open Existing Notebook: Open an existing notebook with the /open:notebook_name command
  • View Notebook Content: Check the cell composition of the current notebook

Cell Management Features

  • View Cell Content: Check the code or markdown content of specific cells
  • Execute Specific Cell: Selectively execute desired cells
  • Execute All Cells: Execute all cells in the notebook sequentially
  • Add Markdown Cell: Natural language explanations are automatically added as markdown cells
  • Add Code Cell: Converted Python code is added as code cells
  • Save Execution Results: Code execution results are automatically saved in the notebook

Natural Language Data Analysis Features

  • Data Generation: Generate test data with natural language requests like "Generate random data"
  • Statistical Analysis: Perform data analysis with requests like "Show summary statistics for the data"
  • Data Visualization: Visualize with natural language requests like "Draw a graph of the age distribution"
  • Correlation Analysis: Analyze relationships with requests like "Analyze the correlation between variables"

Command List

CommandDescriptionExample
/notebook:nameCreate new notebook/notebook:data_analysis
/open:nameOpen existing notebook/open:test
/question:contentCode-related question/question:function list
/helpDisplay help/help

Troubleshooting

could not connect to MCP server jupythunder: spawn pythonENOENT

This error occurs when the Python executable file cannot be found. Resolve it with these methods:

  1. Use Python Absolute Path:

    {
      "mcpServers": {
        "jupythunder": {
          "command": "/absolute/path/python",
          "args": ["/absolute/path/jupythunder_server.py"]
        }
      }
    }
    

    You can find the Python absolute path with these commands:

    which python  # macOS/Linux
    where python  # Windows
    
  2. Use python3 Command:

    {
      "mcpServers": {
        "jupythunder": {
          "command": "python3",
          "args": ["/absolute/path/jupythunder_server.py"]
        }
      }
    }
    

Jupyter Connection Failure

  • Check if the Jupyter server is running
  • Verify that the provided URL and token are correct
  • Check firewall settings

Notebook Creation or Opening Failure

  • Check if you have write permissions to the Jupyter server
  • Make sure the notebook name does not contain special characters
  • Check if a notebook with the same name already exists

Cell Execution Issues

  • Check for syntax errors in the code
  • Verify that necessary variables or functions are defined in previous cells
  • Restart the server if execution results are not displayed in the notebook

Project Structure

jupythunder/
โ”œโ”€โ”€ jupythunder_server.py  # Main server implementation
โ”œโ”€โ”€ jupythunder_client.py  # Jupyter API client
โ”œโ”€โ”€ tools.py               # MCP tool implement
โ”œโ”€โ”€ utils.py               # Utility functions
โ””โ”€โ”€ requirements.txt       # Project dependencies

Key Components

  • FastMCP Server: MCP protocol handling
  • JupyterClient Class: Jupyter API interaction and notebook management
  • Tools: Tools for connection, execution, query, and notebook management
  • Command Handling: Special command parsing
  • State Management: Lifespan context management
  • Natural Language Processing: Converting natural language requests to Python code
  • Cell Management: Functions for viewing cell content, execution, and saving results

Future Improvements

  1. LLM Integration: Enhance natural language conversion capabilities using actual LLMs
  2. Data Visualization Extensions: Support for various visualization types
  3. Notebook Templates: Provide purpose-specific templates for data analysis, machine learning, etc.
  4. File Upload: Support for data file upload and automatic analysis
  5. Collaboration Features: Multi-user support and sharing features
  6. Interactive Widgets: Enhanced support for Jupyter widgets
  7. GPU Acceleration: GPU acceleration support for deep learning tasks

Dependencies

  • mcp[cli] >= 1.5.0: MCP protocol implementation
  • requests >= 2.31.0: HTTP request handling
  • websocket-client >= 1.6.0: WebSocket communication
  • python-dotenv >= 1.0.0: Environment variable management
  • urllib3 >= 2.0.0: HTTP client

License

MIT License


Jupythunder (ํ•œ๊ตญ์–ด)

Jupythunder๋Š” LLM ์ฑ„ํŒ… ์ธํ„ฐํŽ˜์ด์Šค(Claude)์™€ Jupyter Notebook์„ ์—ฐ๊ฒฐํ•ด์ฃผ๋Š” ๋ฏธ๋“ค์›จ์–ด์ž…๋‹ˆ๋‹ค. ์ด ํ”„๋กœ์ ํŠธ๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉ์ž๋Š” ์ž์—ฐ์–ด์— ๊ฐ€๊นŒ์šด ๋ฐฉ์‹์œผ๋กœ Jupyter Notebook๊ณผ ์ƒํ˜ธ์ž‘์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ

  • ์ž์—ฐ์–ด ์ฝ”๋“œ ๋ณ€ํ™˜: ์‚ฌ์šฉ์ž๊ฐ€ ์ž์—ฐ์–ด์— ๊ฐ€๊นŒ์šด ๋ฐฉ์‹์œผ๋กœ ์ž‘์„ฑํ•œ ์ฝ”๋“œ๋ฅผ LLM์ด ์˜ฌ๋ฐ”๋ฅธ Python ์ฝ”๋“œ๋กœ ๋ณ€ํ™˜
  • Jupyter ์›๊ฒฉ ์—ฐ๊ฒฐ: ์‚ฌ์šฉ์ž๊ฐ€ ์ œ๊ณตํ•œ Jupyter Notebook URL(ํ† ํฐ ํฌํ•จ)์„ ํ†ตํ•ด ์›๊ฒฉ ์—ฐ๊ฒฐ ์ง€์›
  • ์ฝ”๋“œ ์‹คํ–‰: ๋ณ€ํ™˜๋œ ์ฝ”๋“œ๋ฅผ Jupyter Notebook์—์„œ ์‹คํ–‰ํ•˜๊ณ  ๊ฒฐ๊ณผ ๋ฐ˜ํ™˜
  • ์ฝ”๋“œ ์งˆ๋ฌธ: /question ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์ •์˜๋œ ํ•จ์ˆ˜, ๋ณ€์ˆ˜ ๋“ฑ์˜ ์ •๋ณด ์กฐํšŒ
  • ์ƒํƒœ ๊ด€๋ฆฌ: ์—ฐ๊ฒฐ ์ƒํƒœ ๋ฐ ์„ธ์…˜ ์ •๋ณด ๊ด€๋ฆฌ
  • ๋…ธํŠธ๋ถ ํŒŒ์ผ ๊ด€๋ฆฌ: .ipynb ํŒŒ์ผ ์ƒ์„ฑ, ์—ด๊ธฐ, ์…€ ๊ด€๋ฆฌ ๋ฐ ์ €์žฅ ๊ธฐ๋Šฅ ์ง€์›
  • ์ž์—ฐ์–ด ๋ฐ์ดํ„ฐ ๋ถ„์„: ์ž์—ฐ์–ด ์š”์ฒญ์„ ํ†ตํ•œ ๋ฐ์ดํ„ฐ ๋ถ„์„ ๋ฐ ์‹œ๊ฐํ™” ์›Œํฌํ”Œ๋กœ์šฐ
  • ์…€ ์กฐํšŒ ๋ฐ ์‹คํ–‰: ํŠน์ • ์…€ ๋‚ด์šฉ ์กฐํšŒ, ํŠน์ • ์…€ ์‹คํ–‰, ๋ชจ๋“  ์…€ ์ˆœ์ฐจ ์‹คํ–‰ ์ง€์›

์„ค์น˜ ๋ฐฉ๋ฒ•

์‚ฌ์ „ ์š”๊ตฌ์‚ฌํ•ญ

  • Python 3.10 ์ด์ƒ
  • Jupyter Notebook
  • Claude for Desktop (๋˜๋Š” ๋‹ค๋ฅธ MCP ํด๋ผ์ด์–ธํŠธ)

์„ค์น˜ ๋‹จ๊ณ„

  1. ์ €์žฅ์†Œ ๋ณต์ œ:

    git clone https://github.com/username/jupythunder.git
    cd jupythunder
    
  2. ์˜์กด์„ฑ ์„ค์น˜:

    pip install -r requirements.txt
    

์‚ฌ์šฉ ๋ฐฉ๋ฒ•

1. Jupyter Notebook ์„œ๋ฒ„ ์‹คํ–‰

๋ณ„๋„์˜ ํ„ฐ๋ฏธ๋„์—์„œ Jupyter Notebook ์„œ๋ฒ„๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค:

jupyter notebook

๋กœ๊ทธ์—์„œ URL๊ณผ ํ† ํฐ์„ ํ™•์ธํ•˜์„ธ์š” (์˜ˆ: http://localhost:8888/?token=abcdef1234567890).

2. MCP ์„œ๋ฒ„ ์‹คํ–‰

python jupythunder_server.py

3. Claude for Desktop ์„ค์ •

Claude for Desktop์˜ claude_desktop_config.json ํŒŒ์ผ์— MCP ์„œ๋ฒ„๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค:

{
  "mcpServers": {
    "jupythunder": {
      "command": "/์ ˆ๋Œ€/๊ฒฝ๋กœ/python",
      "args": ["/์ ˆ๋Œ€/๊ฒฝ๋กœ/jupythunder_server.py"]
    }
  }
}

์ค‘์š”: Python๊ณผ ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์˜ ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

4. Claude for Desktop ์žฌ์‹œ์ž‘

์„ค์ • ๋ณ€๊ฒฝ ํ›„ Claude for Desktop์„ ์žฌ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.

5. ์‚ฌ์šฉ ์˜ˆ์‹œ

  1. Jupyter์— ์—ฐ๊ฒฐ:

    Jupyter Notebook์— ์—ฐ๊ฒฐํ•ด์ค˜. URL์€ http://localhost:8888/tree?token=abcdef1234567890
    
  2. ์ƒˆ ๋…ธํŠธ๋ถ ์ƒ์„ฑ:

    /notebook:๋ฐ์ดํ„ฐ๋ถ„์„_๋…ธํŠธ๋ถ
    
  3. ๊ธฐ์กด ๋…ธํŠธ๋ถ ์—ด๊ธฐ:

    /open:๋ฐ์ดํ„ฐ๋ถ„์„_๋…ธํŠธ๋ถ
    
  4. ์ž์—ฐ์–ด๋กœ ๋ฐ์ดํ„ฐ ๋ถ„์„ ์š”์ฒญ:

    ๋žœ๋ค ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•ด์ค˜
    
  5. ๋ฐ์ดํ„ฐ ๋ถ„์„ ๋ฐ ์‹œ๊ฐํ™”:

    ์ƒ์„ฑ๋œ ๋ฐ์ดํ„ฐ์— ๋Œ€ํ•œ ํ†ต๊ณ„ ๋ถ„์„ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์—ฌ์ค˜
    
    ๋‚˜์ด์™€ ์ˆ˜์ž…์˜ ์ƒ๊ด€๊ด€๊ณ„๋ฅผ ๊ทธ๋ž˜ํ”„๋กœ ์‹œ๊ฐํ™”ํ•ด์ค˜
    
  6. ์ฝ”๋“œ ์ž‘์„ฑ ๋ฐ ์‹คํ–‰:

    def calculate_savings(income, expense):
        return income - expense
        
    df['์ €์ถ•์•ก'] = calculate_savings(df['์ˆ˜์ž…'], df['์ง€์ถœ'])
    df.head()
    
  7. ํ•จ์ˆ˜ ์ •๋ณด ์กฐํšŒ:

    /question: ์ง€๊ธˆ ์ •์˜๋œ ํ•จ์ˆ˜๊ฐ€ ๋ญ๊ฐ€ ์žˆ์ง€?
    
  8. ๋…ธํŠธ๋ถ ๋‚ด์šฉ ์กฐํšŒ:

    ํ˜„์žฌ ๋…ธํŠธ๋ถ์˜ ๋‚ด์šฉ์ด ์–ด๋–ป๊ฒŒ ๋˜์–ด ์žˆ์–ด?
    
  9. ํŠน์ • ์…€ ์กฐํšŒ ๋ฐ ์‹คํ–‰:

    ์ฒซ๋ฒˆ์งธ ์…€์˜ ๋‚ด์šฉ์„ ๋ณด์—ฌ์ค˜
    ๋‘๋ฒˆ์งธ ์…€์„ ์‹คํ–‰ํ•ด์ค˜
    
  10. ๋ชจ๋“  ์…€ ์‹คํ–‰:

    ๋…ธํŠธ๋ถ์˜ ๋ชจ๋“  ์…€์„ ์ˆœ์ฐจ์ ์œผ๋กœ ์‹คํ–‰ํ•ด์ค˜
    

์ฃผ์š” ๊ธฐ๋Šฅ ์ƒ์„ธ ์„ค๋ช…

๋…ธํŠธ๋ถ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ

  • ์ƒˆ ๋…ธํŠธ๋ถ ์ƒ์„ฑ: /notebook:๋…ธํŠธ๋ถ์ด๋ฆ„ ๋ช…๋ น์–ด๋กœ ์ƒˆ ๋…ธํŠธ๋ถ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • ๊ธฐ์กด ๋…ธํŠธ๋ถ ์—ด๊ธฐ: /open:๋…ธํŠธ๋ถ์ด๋ฆ„ ๋ช…๋ น์–ด๋กœ ๊ธฐ์กด ๋…ธํŠธ๋ถ์„ ์—ฝ๋‹ˆ๋‹ค.
  • ๋…ธํŠธ๋ถ ๋‚ด์šฉ ์กฐํšŒ: ํ˜„์žฌ ์ž‘์—… ์ค‘์ธ ๋…ธํŠธ๋ถ์˜ ์…€ ๊ตฌ์„ฑ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์…€ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ

  • ์…€ ๋‚ด์šฉ ์กฐํšŒ: ํŠน์ • ์…€์˜ ์ฝ”๋“œ๋‚˜ ๋งˆํฌ๋‹ค์šด ๋‚ด์šฉ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ํŠน์ • ์…€ ์‹คํ–‰: ์›ํ•˜๋Š” ์…€๋งŒ ์„ ํƒ์ ์œผ๋กœ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ๋ชจ๋“  ์…€ ์‹คํ–‰: ๋…ธํŠธ๋ถ์˜ ๋ชจ๋“  ์…€์„ ์ˆœ์ฐจ์ ์œผ๋กœ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ๋งˆํฌ๋‹ค์šด ์…€ ์ถ”๊ฐ€: ์ž์—ฐ์–ด ์„ค๋ช…์ด ๋งˆํฌ๋‹ค์šด ์…€๋กœ ์ž๋™ ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.
  • ์ฝ”๋“œ ์…€ ์ถ”๊ฐ€: ๋ณ€ํ™˜๋œ Python ์ฝ”๋“œ๊ฐ€ ์ฝ”๋“œ ์…€๋กœ ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.
  • ์‹คํ–‰ ๊ฒฐ๊ณผ ์ €์žฅ: ์ฝ”๋“œ ์‹คํ–‰ ๊ฒฐ๊ณผ๊ฐ€ ๋…ธํŠธ๋ถ์— ์ž๋™์œผ๋กœ ์ €์žฅ๋ฉ๋‹ˆ๋‹ค.

์ž์—ฐ์–ด ๋ฐ์ดํ„ฐ ๋ถ„์„ ๊ธฐ๋Šฅ

  • ๋ฐ์ดํ„ฐ ์ƒ์„ฑ: "๋žœ๋ค ๋ฐ์ดํ„ฐ ์ƒ์„ฑ" ๊ฐ™์€ ์ž์—ฐ์–ด ์š”์ฒญ์œผ๋กœ ํ…Œ์ŠคํŠธ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • ํ†ต๊ณ„ ๋ถ„์„: "๋ฐ์ดํ„ฐ ์š”์•ฝ ํ†ต๊ณ„ ๋ณด์—ฌ์ค˜" ๋“ฑ์˜ ์š”์ฒญ์œผ๋กœ ๋ฐ์ดํ„ฐ ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
  • ๋ฐ์ดํ„ฐ ์‹œ๊ฐํ™”: "๋‚˜์ด ๋ถ„ํฌ๋ฅผ ๊ทธ๋ž˜ํ”„๋กœ ๊ทธ๋ ค์ค˜"์ฒ˜๋Ÿผ ์ž์—ฐ์–ด ์š”์ฒญ์œผ๋กœ ์‹œ๊ฐํ™”ํ•ฉ๋‹ˆ๋‹ค.
  • ์ƒ๊ด€๊ด€๊ณ„ ๋ถ„์„: "๋ณ€์ˆ˜ ๊ฐ„ ์ƒ๊ด€๊ด€๊ณ„ ๋ถ„์„ํ•ด์ค˜"์™€ ๊ฐ™์€ ์š”์ฒญ์œผ๋กœ ๊ด€๊ณ„๋ฅผ ๋ถ„์„ํ•ฉ๋‹ˆ๋‹ค.

๋ช…๋ น์–ด ๋ชฉ๋ก

๋ช…๋ น์–ด์„ค๋ช…์˜ˆ์‹œ
/notebook:์ด๋ฆ„์ƒˆ ๋…ธํŠธ๋ถ ์ƒ์„ฑ/notebook:๋ฐ์ดํ„ฐ๋ถ„์„
/open:์ด๋ฆ„๊ธฐ์กด ๋…ธํŠธ๋ถ ์—ด๊ธฐ/open:test
/question:๋‚ด์šฉ์ฝ”๋“œ ๊ด€๋ จ ์งˆ๋ฌธ/question:ํ•จ์ˆ˜ ๋ชฉ๋ก
/help๋„์›€๋ง ํ‘œ์‹œ/help

๋ฌธ์ œ ํ•ด๊ฒฐ

could not connect to MCP server jupythunder: spawn pythonENOENT

์ด ์˜ค๋ฅ˜๋Š” Python ์‹คํ–‰ ํŒŒ์ผ์„ ์ฐพ์ง€ ๋ชปํ•  ๋•Œ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐํ•˜์„ธ์š”:

  1. Python ์ ˆ๋Œ€ ๊ฒฝ๋กœ ์‚ฌ์šฉ:

    {
      "mcpServers": {
        "jupythunder": {
          "command": "/์ ˆ๋Œ€/๊ฒฝ๋กœ/python",
          "args": ["/์ ˆ๋Œ€/๊ฒฝ๋กœ/jupythunder_server.py"]
        }
      }
    }
    

    Python ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋Š” ๋‹ค์Œ ๋ช…๋ น์–ด๋กœ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

    which python  # macOS/Linux
    where python  # Windows
    
  2. python3 ๋ช…๋ น์–ด ์‚ฌ์šฉ:

    {
      "mcpServers": {
        "jupythunder": {
          "command": "python3",
          "args": ["/์ ˆ๋Œ€/๊ฒฝ๋กœ/jupythunder_server.py"]
        }
      }
    }
    

Jupyter ์—ฐ๊ฒฐ ์‹คํŒจ

  • Jupyter ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰ ์ค‘์ธ์ง€ ํ™•์ธ
  • ์ œ๊ณตํ•œ URL๊ณผ ํ† ํฐ์ด ์˜ฌ๋ฐ”๋ฅธ์ง€ ํ™•์ธ
  • ๋ฐฉํ™”๋ฒฝ ์„ค์ • ํ™•์ธ

๋…ธํŠธ๋ถ ์ƒ์„ฑ ๋˜๋Š” ์—ด๊ธฐ ์‹คํŒจ

  • Jupyter ์„œ๋ฒ„์— ์“ฐ๊ธฐ ๊ถŒํ•œ์ด ์žˆ๋Š”์ง€ ํ™•์ธ
  • ๋…ธํŠธ๋ถ ์ด๋ฆ„์— ํŠน์ˆ˜ ๋ฌธ์ž๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์ง€ ์•Š์€์ง€ ํ™•์ธ
  • ์ด๋ฏธ ๊ฐ™์€ ์ด๋ฆ„์˜ ๋…ธํŠธ๋ถ์ด ์žˆ๋Š”์ง€ ํ™•์ธ

์…€ ์‹คํ–‰ ๊ด€๋ จ ๋ฌธ์ œ

  • ์ฝ”๋“œ์— ๊ตฌ๋ฌธ ์˜ค๋ฅ˜๊ฐ€ ์—†๋Š”์ง€ ํ™•์ธ
  • ์ด์ „ ์…€์—์„œ ํ•„์š”ํ•œ ๋ณ€์ˆ˜๋‚˜ ํ•จ์ˆ˜๊ฐ€ ์ •์˜๋˜์—ˆ๋Š”์ง€ ํ™•์ธ
  • ์‹คํ–‰ ๊ฒฐ๊ณผ๊ฐ€ ๋…ธํŠธ๋ถ์— ํ‘œ์‹œ๋˜์ง€ ์•Š์œผ๋ฉด ์„œ๋ฒ„๋ฅผ ์žฌ์‹œ์ž‘ํ•ด๋ณด์„ธ์š”

ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ

jupythunder/
โ”œโ”€โ”€ jupythunder_server.py  # ๋ฉ”์ธ ์„œ๋ฒ„ ๊ตฌํ˜„
โ”œโ”€โ”€ jupythunder_client.py  # Jupyter API ํด๋ผ์ด์–ธํŠธ 
โ”œโ”€โ”€ tools.py               # MCP ๋„๊ตฌ ๊ตฌํ˜„
โ”œโ”€โ”€ utils.py               # ์œ ํ‹ธ๋ฆฌํ‹ฐ ํ•จ์ˆ˜
โ””โ”€โ”€ requirements.txt       # ํ”„๋กœ์ ํŠธ ์˜์กด์„ฑ

์ฃผ์š” ๊ตฌ์„ฑ ์š”์†Œ

  • FastMCP ์„œ๋ฒ„: MCP ํ”„๋กœํ† ์ฝœ ์ฒ˜๋ฆฌ
  • JupyterClient ํด๋ž˜์Šค: Jupyter API ์ƒํ˜ธ์ž‘์šฉ ๋ฐ ๋…ธํŠธ๋ถ ๊ด€๋ฆฌ
  • ๋„๊ตฌ: ์—ฐ๊ฒฐ, ์‹คํ–‰, ์กฐํšŒ, ๋…ธํŠธ๋ถ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•œ ๋„๊ตฌ
  • ๋ช…๋ น์–ด ์ฒ˜๋ฆฌ: ํŠน๋ณ„ ๋ช…๋ น์–ด ๊ตฌ๋ฌธ ๋ถ„์„
  • ์ƒํƒœ ๊ด€๋ฆฌ: ๋ผ์ดํ”„์ŠคํŒฌ ์ปจํ…์ŠคํŠธ ๊ด€๋ฆฌ
  • ์ž์—ฐ์–ด ์ฒ˜๋ฆฌ: ์ž์—ฐ์–ด ์š”์ฒญ์„ Python ์ฝ”๋“œ๋กœ ๋ณ€ํ™˜
  • ์…€ ๊ด€๋ฆฌ: ์…€ ๋‚ด์šฉ ์กฐํšŒ, ์‹คํ–‰, ๊ฒฐ๊ณผ ์ €์žฅ ๊ธฐ๋Šฅ

ํ–ฅํ›„ ๊ฐœ์„  ์‚ฌํ•ญ

  1. LLM ํ†ตํ•ฉ: ์‹ค์ œ LLM์„ ์ด์šฉํ•œ ์ž์—ฐ์–ด ๋ณ€ํ™˜ ๊ธฐ๋Šฅ ๊ฐ•ํ™”
  2. ๋ฐ์ดํ„ฐ ์‹œ๊ฐํ™” ํ™•์žฅ: ๋‹ค์–‘ํ•œ ์‹œ๊ฐํ™” ์œ ํ˜• ์ง€์›
  3. ๋…ธํŠธ๋ถ ํ…œํ”Œ๋ฆฟ: ๋ฐ์ดํ„ฐ ๋ถ„์„, ๋จธ์‹ ๋Ÿฌ๋‹ ๋“ฑ ๋ชฉ์ ๋ณ„ ํ…œํ”Œ๋ฆฟ ์ œ๊ณต
  4. ํŒŒ์ผ ์—…๋กœ๋“œ: ๋ฐ์ดํ„ฐ ํŒŒ์ผ ์—…๋กœ๋“œ ๋ฐ ์ž๋™ ๋ถ„์„ ๊ธฐ๋Šฅ
  5. ํ˜‘์—… ๊ธฐ๋Šฅ: ๋‹ค์ค‘ ์‚ฌ์šฉ์ž ์ง€์› ๋ฐ ๊ณต์œ  ๊ธฐ๋Šฅ
  6. ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ์œ„์ ฏ: Jupyter ์œ„์ ฏ ์ง€์› ๊ฐ•ํ™”
  7. GPU ๊ฐ€์†: ๋”ฅ๋Ÿฌ๋‹ ์ž‘์—…์„ ์œ„ํ•œ GPU ๊ฐ€์† ์ง€์›

์˜์กด์„ฑ

  • mcp[cli] >= 1.5.0: MCP ํ”„๋กœํ† ์ฝœ ๊ตฌํ˜„
  • requests >= 2.31.0: HTTP ์š”์ฒญ ์ฒ˜๋ฆฌ
  • websocket-client >= 1.6.0: WebSocket ํ†ต์‹ 
  • python-dotenv >= 1.0.0: ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ๊ด€๋ฆฌ
  • urllib3 >= 2.0.0: HTTP ํด๋ผ์ด์–ธํŠธ

๋ผ์ด์„ผ์Šค

MIT ๋ผ์ด์„ผ์Šค