Prerequisites
- Claude Desktop app installed
- Pylance MCP Server running
- Anthropic account with API access
Quick Start
Configure Claude
Edit Claude Desktop configuration:macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: %APPDATA%\Claude\claude_desktop_config.jsonLinux: ~/.config/Claude/claude_desktop_config.jsonConfiguration Examples
Single Workspace
claude_desktop_config.json
Multiple Workspaces
claude_desktop_config.json
Cloud-Hosted
claude_desktop_config.json
Get your API key from pylancemcp.dev/dashboard
Usage Examples
Code Review
Ask Claude to review your code:- Type safety issues
- Potential bugs
- Security vulnerabilities
- Code style consistency
- Best practice violations
Refactoring Assistance
Request refactoring help:- Analyze current implementation
- Suggest refactoring approach
- Generate refactored code
- Explain changes made
Documentation Generation
Generate docstrings:Test Generation
Generate unit tests:- Happy path scenarios
- Edge cases
- Error handling
- Fixtures and mocks
Advanced Features
Context-Aware Conversations
Claude maintains context across messages:Multi-File Analysis
Analyze dependencies across files:Intelligent Code Search
Search using natural language:Conversation Templates
Bug Investigation
Feature Implementation
Performance Optimization
Troubleshooting
MCP Server Not Found
MCP Server Not Found
Error:
Command 'python' not foundFix: Use absolute path to Python:Workspace Not Loading
Workspace Not Loading
Error:
Failed to initialize workspaceChecklist:- ✅ Workspace path exists
- ✅ Path has no trailing slash
- ✅ User has read permissions
- ✅ Contains Python files (.py)
Authentication Failed
Authentication Failed
Error:
401 UnauthorizedSolutions:- Check API key is valid
- Verify subscription is active
- Ensure API key has correct permissions
Claude Not Responding
Claude Not Responding
Symptoms: No response to
@pylance commandsDebug:- Check Claude Desktop logs:
- macOS:
~/Library/Logs/Claude/ - Windows:
%APPDATA%\Claude\logs\
- macOS:
- Verify MCP server is running:
- Test server manually:
Performance Optimization
Large Workspaces
For projects with >5,000 files:claude_desktop_config.json
Memory Limits
Constrain memory usage:Security Best Practices
Use environment variables:claude_desktop_config.json
~/.zshrc