> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo Pre requisites

> Guide to setting up a local MCP server environment, installing the Python MCP SDK, creating a virtualenv, and running the Node-based inspector with an mcp.json catalog.

Welcome — in this lesson we'll set up a local MCP server and the basic tooling required to run and inspect it. Follow the steps below to prepare your environment, start an MCP server from a catalog, and run the inspector to explore server behavior.

I keep a project folder named `code` that contains several example MCP servers and supporting files.

![A dark-themed Visual Studio Code window with the Explorer pane open, showing a project folder tree (including a "code" folder and many "stage-\*" directories) on the left. The main editor area is empty with a faint VS Code logo in the center.](https://mintcdn.com/kodekloud-c4ac6d9a/0UyWJzvxepsOrybu/images/Model-Context-Protocol-Associate-MCPA-Certification/Messages-Tools-and-Sessions/Demo-Pre-requisites/vscode-dark-explorer-empty-editor-logo.jpg?fit=max\&auto=format\&n=0UyWJzvxepsOrybu\&q=85\&s=17e3886482742df58bbb87fa2b35356d)

Each server in this repository is registered in an `mcp.json` catalog. A typical entry looks like this:

```json theme={null}
{
  "mcpServers": {
    "shipment-tracker": {
      "type": "stdio",
      "command": "../.venv/bin/python",
      "args": [
        "server.py"
      ],
      "metadata": {
        "progressToken": "demo-1"
      },
      "protocolEra": "modern"
    }
  }
}
```

Key fields and their purpose

| Field | Purpose | Example |
| - | - | - |
| `type` | How the server communicates with tooling (e.g., `stdio`, `tcp`). | `stdio` |
| `command` | Executable used to start the server (often the Python interpreter in a virtual environment). | `../.venv/bin/python` |
| `args` | Arguments passed to the command (typically the server script). | `["server.py"]` |
| `metadata` | Arbitrary metadata for tooling (e.g., progress tokens, labels). | `{"progressToken":"demo-1"}` |
| `protocolEra` | Identifies the protocol era/version — note this is `protocolEra` (not "protocol error"). | `modern` |

The `mcp.json` catalog is how inspector tools discover and launch MCP servers listed in your project.

Prerequisites and environment setup

1. Install a supported Python version (examples here use Python 3.10.19).
2. Create and activate a project virtual environment.
3. If present, install project dependencies from `requirements.txt`.

A concise set of commands to prepare the environment:

```bash theme={null}
# Verify Python
python --version
# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate

# Install project dependencies if present
pip install -r requirements.txt
```

Ensure the Python version you use is compatible with the MCP SDK you plan to install. Different SDK releases may require different Python versions.

Installing the MCP SDK and the inspector
To build and run MCP servers, install the official Model Context Protocol SDK for your language. This guide uses the Python SDK.

Install the Python SDK (including CLI extras):

```bash theme={null}
pip install "mcp[cli]"
```

The inspector used in these examples is the Node-based inspector (published as `@modelcontextprotocol/inspector`) and can be run with `npx`:

```bash theme={null}
npx @modelcontextprotocol/inspector --catalog ./mcp.json
```

This command starts the inspector and points it at your `mcp.json` catalog so it can discover and run servers listed there.

The inspector is Node-based and requires Node.js/npm installed on your system to run `npx`. Make sure Node.js is installed and up-to-date before running the inspector.

What this lesson covers (scope)

* Creating and activating a Python virtual environment for your MCP server project.
* Installing the MCP Python SDK and required dependencies.
* Running the Node-based inspector against an `mcp.json` catalog to discover and start servers.

This lesson does not dig into building server implementations or the inspector internals. For now, confirm you can: create/activate a virtual environment, install dependencies, and run the inspector against your `mcp.json`.

![A screenshot of the Model Context Protocol documentation page showing an "Available SDKs" table with languages (TypeScript, Python, C#, Go, Rust, Ruby, Java, Swift, PHP) and repository links. The page also shows tier badges for each SDK and a left navigation menu.](https://mintcdn.com/kodekloud-c4ac6d9a/0UyWJzvxepsOrybu/images/Model-Context-Protocol-Associate-MCPA-Certification/Messages-Tools-and-Sessions/Demo-Pre-requisites/model-context-protocol-available-sdks.jpg?fit=max\&auto=format\&n=0UyWJzvxepsOrybu\&q=85\&s=087914caf2e14e8e921f131fdae2e12d)

Links and references

* Model Context Protocol SDKs and docs: [https://github.com/modelcontextprotocol](https://github.com/modelcontextprotocol) (search language-specific SDK).
* Inspector package: [https://www.npmjs.com/package/@modelcontextprotocol/inspector](https://www.npmjs.com/package/@modelcontextprotocol/inspector)
* Python virtual environments: [https://docs.python.org/3/library/venv.html](https://docs.python.org/3/library/venv.html)

If you run into issues, verify Python and Node.js are properly installed, the virtual environment is activated, and the `mcp.json` file is in your working directory when running the inspector.

> [card] [Watch Video](https://learn.kodekloud.com/user/courses/model-context-protocol-associate-mcpa-certification/module/282d97e2-04f7-4beb-8301-695ecb3f3f99/lesson/2db433fd-f2de-4204-ab8b-ac5a7a0924cc)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.