Skip to main content

Prerequisites

Before installing Pylance MCP Pro, ensure you have:
  • Python 3.11+ installed
  • Node.js 18+ (for MCP client setup)
  • A supported MCP client (Claude Desktop, Cursor, Continue.dev, Windsurf)

Installation Methods

Install in an isolated environment:
pipx install pylance-mcp-pro
Recommended for avoiding dependency conflicts.
Clone and install from GitHub:
git clone https://github.com/JarrodAI/pylance-mcp.git
cd pylance-mcp
pip install -e .
Useful for development or customization.

Verify Installation

Check that the server is installed correctly:
pylance-mcp-pro --version
You should see the version number printed.

Configuration

1. Set Workspace Root

Set the WORKSPACE_ROOT environment variable to your Python project:
export WORKSPACE_ROOT=/path/to/your/project
Or configure it in your MCP client settings (see client-specific guides).

2. API Key (Optional)

If you purchased a subscription, set your API key:
export PYLANCE_MCP_API_KEY=plmc_your_api_key_here
Free tier is available without an API key with rate limits.

3. Configure MCP Client

Add the server to your MCP client configuration:
{
  "mcpServers": {
    "pylance-mcp-pro": {
      "command": "python",
      "args": ["server.py"],
      "env": {
        "WORKSPACE_ROOT": "${workspaceFolder}",
        "PYLANCE_MCP_API_KEY": "plmc_your_api_key_here"
      }
    }
  }
}
The ${workspaceFolder} variable will be automatically replaced with your current workspace path in most MCP clients.

Client-Specific Setup

Claude Desktop

Setup instructions for Claude Desktop

Cursor

Setup instructions for Cursor

Continue.dev

Setup instructions for Continue.dev

Windsurf

Setup instructions for Windsurf

Testing the Installation

Once configured, test the server with a simple command in your MCP client:
Can you analyze the Python files in my workspace and show me any type errors?
The AI should use the get_diagnostics tool and return type checking results.

Troubleshooting

Issue: MCP client can’t find the pylance-mcp commandSolution:
  • Ensure Python is in your PATH
  • Try using the full path: /path/to/python -m pylance_mcp
  • Verify installation: pip show pylance-mcp
Issue: Server reports empty workspaceSolution:
  • Verify WORKSPACE_ROOT points to a valid directory
  • Ensure directory contains .py files
  • Check file permissions
Issue: Diagnostics return empty resultsSolution:
  • Ensure Python environment is activated
  • Check for pyrightconfig.json or pyproject.toml
  • Verify Python interpreter path with get_python_environment tool
Issue: Receiving rate limit errorsSolution:
  • Sign up for a paid plan at pylancemcp.com
  • Add your API key to the environment configuration
  • Check usage limits in your dashboard

Next Steps

Quick Start

Try common tasks and examples

API Reference

Explore all available tools