Get the FREE Ultimate OpenClaw Setup Guide →

ai-notebook-lab

Repository containing practical exercises and notebooks focused on AI application development and experimentation.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jmautone-ai-notebook-lab python -m ai_notebook_lab.mcp.server \
  --env MCP_LOG_LEVEL="INFO" \
  --env MCP_SERVER_PORT="5000"

How to use

AI Notebook Lab provides a hands-on environment for exploring modern AI workflows, including LLM prompting, vector databases, RAG pipelines, agents and tools, and MCP-based distributed architectures. The MCP server component in this repository enables communication between the model runtime and external tools or services via a standardized protocol. You can use the local MCP server to run and orchestrate micro-tools defined for the labs, feed them with context from notebooks, and observe the JSON-RPC style exchanges, streaming events, and tool results as part of a larger demonstration of Model Context Protocol in practice. This server is designed to integrate with the lab modules, allowing you to experiment with tool invocation, tool chaining, and state management as you develop complex AI-assisted workflows.

How to install

Prerequisites:

  • Python 3.8 or newer
  • Git
  • Virtual environment support (optional but recommended)
  1. Clone the repository
  1. Create and activate a virtual environment
  • python -m venv venv
  • For Linux/macOS: source venv/bin/activate
  • For Windows: venv\Scripts\activate
  1. Install dependencies
  • pip install -r requirements.txt
  1. Run the MCP server (local MCP server for Lab 6)
  • python -m ai_notebook_lab.mcp.server
  1. Verify the server is listening (default port 5000)
  • You should see output indicating MCP server startup and listening on port 5000.

Additional notes

Tips and considerations:

  • Environment variables:
    • MCP_LOG_LEVEL controls verbosity (DEBUG, INFO, WARN, ERROR).
    • MCP_SERVER_PORT can be changed if you have port conflicts.
  • If you encounter missing dependencies, ensure your virtual environment is activated and that requirements.txt is up to date.
  • The local MCP server integrates with the Lab 6 MCP components and expects the standard MCP tool definitions used across the labs; ensure the lab tools are correctly wired into the MCP configuration.
  • When testing tool invocations, inspect the server logs for JSON-RPC requests, nature of tool calls, and any errors in tool execution.
  • If running behind a firewall or proxy, make sure to expose the port used by the MCP server or configure SSE/JSON-RPC endpoints accordingly.

Related MCP Servers

Sponsor this space

Reach thousands of developers