Wraps the Pyright language server to give Claude type checking and code intelligence for Python. You get seven tools: check_types for catching type errors, get_hover for inspecting types at a cursor position, get_completions for autocomplete suggestions, get_definition to jump to where something is defined, find_references to see all uses of a variable or function, get_document_symbols to extract classes and functions from a file, and format_code for cleaning up formatting. Useful when you need Claude to reason about Python code structure, verify type correctness, or provide intelligent suggestions without running the code itself.
MCP server that exposes Pyright language server functionality
mcp-name: io.github.daedalus/mcp-pyright
pip install mcp-pyright
The MCP server can be used with any MCP-compatible client. It exposes the following tools:
from mcp_pyright import mcp
# Run type checking
result = check_types(code="x: int = 'hello'")
# Get type information at position
result = get_hover(code="x: int = 1", position=0)
# Get code completions
result = get_completions(code="prin", position=4)
# Find definition location
result = get_definition(code="def foo(): pass\nfoo()", position=15)
# Find all references
result = find_references(code="x = 1\nx", position=5)
# Get all symbols in document
result = get_document_symbols(code="class Foo: pass\ndef bar(): pass")
# Format Python code
result = format_code(code="x=1\ny=2")
git clone https://github.com/daedalus/mcp-pyright.git
cd mcp-pyright
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
MIT