🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

mcp-pyright

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcp-pyright

MCP server that exposes Pyright language server functionality

pipPyPI
Version
0.1.0
Weekly downloads
55
Maintainers
1

mcp-pyright

MCP server that exposes Pyright language server functionality

PyPI Python Ruff

mcp-name: io.github.daedalus/mcp-pyright

Install

pip install mcp-pyright

Usage

The MCP server can be used with any MCP-compatible client. It exposes the following tools:

Type Checking

from mcp_pyright import mcp

# Run type checking
result = check_types(code="x: int = 'hello'")

Get Hover Information

# Get type information at position
result = get_hover(code="x: int = 1", position=0)

Get Completions

# Get code completions
result = get_completions(code="prin", position=4)

Get Definition

# Find definition location
result = get_definition(code="def foo(): pass\nfoo()", position=15)

Find References

# Find all references
result = find_references(code="x = 1\nx", position=5)

Get Document Symbols

# Get all symbols in document
result = get_document_symbols(code="class Foo: pass\ndef bar(): pass")

Format Code

# Format Python code
result = format_code(code="x=1\ny=2")

Development

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/

License

MIT

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts