本项目主要实现了Jupyter与MCP服务器的连接,处理Jupyter内核与MCP客户端之间的通信,同时提供API接口用于交互式计算和数据可视化,帮助用户更便捷地进行相关操作。
conda activate jupythunder
cd jupythunder
python jupythunder_server.py --port 8000
conda activate jupythunder
cd jupythunder
python jupythunder_client.py --connect http://localhost:8000
conda create -n jupythunder python>=3.7
conda activate jupythunder
pip install mcp[cli] requests websocket-client python-dotenv urllib3
git clone https://github.com/yourusername/jupythunder.git
cd jupythunder
python jupythunder_server.py --port 8000
conda create -n jupythunder python>=3.7
conda activate jupythunder
pip install requests websocket-client python-dotenv urllib3
git clone https://github.com/yourusername/jupythunder.git
cd jupythunder
python jupythunder_client.py --connect http://localhost:8000
jupythunder/
├── jupythunder_server.py # MCP服务器实现
├── jupythunder_client.py # Jupyter API客户端
├── tools.py # MCP工具实现
├── utils.py # 工具函数
└── requirements.txt # 项目依赖
export JUPYTHUNDER_PORT=8000
export JUPYTHUNDER_LOG_LEVEL=DEBUG
# jupythunder_config.py
JUPYTHUNDER_HOST = "localhost"
JUPYTHUNDER_PORT = 8000
LOG_LEVEL = "INFO"
此错误表示找不到Python可执行文件。请检查以下配置:
使用绝对路径指定Python:
{
"mcpServers": {
"jupythunder": {
"command": "/absolute/path/python",
"args": ["/absolute/path/jupythunder_server.py"]
}
}
}
确认Python安装位置:
which python # macOS/Linux
where python # Windows
使用python3命令:
{
"mcpServers": {
"jupythunder": {
"command": "python3",
"args": ["/absolute/path/jupythunder_server.py"]
}
}
}
conda activate jupythunder
cd jupythunder
python logging_server.py --port 8001
conda install -n jupythunder custom-kernel
pip install extra_features
--port:指定服务器端口,默认8000。--log-level:设置日志级别,可选DEBUG/INFO/ERROR。| 错误代码 | 描述 |
|---|---|
| 101 | 连接超时 |
| 102 | 认证失败 |
| 103 | 服务内部错误 |
以上内容涵盖了项目的安装、配置、使用及维护等各个方面,确保用户能够顺利完成环境搭建和问题解决。