{"id":27993,"library":"nteract","title":"nteract","description":"nteract provides an MCP (Model Context Protocol) server that brings AI agents into Jupyter notebooks. It allows LLMs like Claude, ChatGPT, Gemini, and OpenCode to execute code, read outputs, and interact with notebook environments. Version 2.3.1 requires Python >=3.10. Release cadence is irregular, with recent updates focused on MCP protocol support.","status":"active","version":"2.3.1","language":"python","source_language":"en","source_url":"https://github.com/nteract/nteract","tags":["jupyter","mcp","ai","notebook","server"],"install":[{"cmd":"pip install nteract","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The correct module is nteract.mcp_server, not a top-level server.","wrong":"from nteract import server","symbol":"mcp_server","correct":"import nteract.mcp_server"}],"quickstart":{"code":"import os\nfrom nteract.mcp_server import run_server\n\n# Ensure API key is set in environment\napi_key = os.environ.get('ANTHROPIC_API_KEY', '')\nif not api_key:\n    print(\"Please set ANTHROPIC_API_KEY environment variable\")\nelse:\n    run_server()","lang":"python","description":"Start the nteract MCP server for AI agent integration. Requires an API key (e.g., Anthropic) set in environment."},"warnings":[{"fix":"Ensure Python >=3.10 is installed before upgrading.","message":"nteract v2.x drops support for Python <3.10. Upgrade your Python environment.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace imports like 'from nteract.kernel import ...' with 'from nteract.mcp_server import ...'.","message":"The old nteract 'kernel' and 'comm' modules (from v1.x) are removed. Use nteract.mcp_server for AI integration.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Set the required API key before calling run_server().","message":"The MCP server requires environment variables for API keys (e.g., ANTHROPIC_API_KEY, OPENAI_API_KEY). Failing to set them causes silent hangs.","severity":"gotcha","affected_versions":"all"},{"fix":"Pass a custom port via the MCP_PORT environment variable or modify the server configuration.","message":"By default, the server binds to localhost:8000. If that port is in use, the startup will fail with an address-in-use error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Upgrade nteract: pip install --upgrade nteract (requires Python >=3.10).","cause":"An older version of nteract (<2.0.0) is installed, or the package is not installed.","error":"ModuleNotFoundError: No module named 'nteract.mcp_server'"},{"fix":"Kill the process using port 8000, or set environment variable MCP_PORT to a different port.","cause":"The default port 8000 is occupied by another process.","error":"OSError: [Errno 98] Address already in use"},{"fix":"Export the appropriate API key before running the server: export ANTHROPIC_API_KEY='your-key'","cause":"The required environment variable (e.g., ANTHROPIC_API_KEY, OPENAI_API_KEY) is not set.","error":"RuntimeError: API key not configured"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}