Skip to main content

Prerequisites

Python 3.11+

Check version: python --version

Node.js 18+

Check version: node --version

Installation

1

Clone the Repository

git clone https://github.com/JarrodAI/pylance-mcp.git
cd pylance-mcp
2

Install Dependencies

# Python dependencies
pip install -r requirements.txt

# Node.js dependencies (Pyright)
npm install
3

Test the Installation

# Run all tests
pytest tests/ -v

# Run the demo
python demo.py
You should see output showing successful Pylance integration.

Configure Your AI Client

Add to .cursor/config.json:
{
  "mcpServers": {
    "pylance-mcp-pro": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"],
      "env": {
        "WORKSPACE_ROOT": "/path/to/your/python/project"
      }
    }
  }
}

Verify Connection

1

Restart Your AI Client

Close and reopen your AI assistant to load the new MCP configuration.
2

Test a Simple Prompt

Try asking your AI:
“Use Pylance MCP to show me type information for the main function in src/app.py”
Your AI should use the get_hover tool to retrieve type signatures.
3

Verify Health Check

Ask your AI:
“Run a health check on the Pylance MCP server”
You should see server status, version, and workspace information.

Example Prompts to Try

Get Completions

“Show me code completions available at line 42 in models.py”

Refactor Code

“Rename the User class to UserAccount across the entire workspace”

Find References

“Find all references to the calculate_total function”

Type Checking

“Show me all type errors in the src/ directory”

Next Steps

Pro Tip: Start with the free plan to explore features. Upgrade to Professional when you need higher request limits and priority support.