Skip to main content

MCP server that exposes Pyright language server functionality

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_pyright-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_pyright-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_pyright-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_pyright-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_pyright-0.1.0.tar.gz
Algorithm Hash digest
SHA256 71773785e6e77218e39c97a944165671826fffc027e045a7ca86475c9fe40b76
MD5 01468dfac27aa3194307cea3cb7d88a3
BLAKE2b-256 cce99c3125c8247157ab4cc65317fe24da335c19647eba5fc79a0024142b61c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_pyright-0.1.0.tar.gz:

Publisher: pypi-publish.yml on daedalus/mcp-pyright

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_pyright-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_pyright-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_pyright-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d25b0e4b6827db24812e24a43ed8fa6e1a007138d6f897b5245161416ab417c
MD5 e18b8095cb081729d71dfe9a3f1e70dc
BLAKE2b-256 107e0b0107ecec589da8d406a1a9b0243c1dbcd18c818e6f77eae3d9dfe14dbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_pyright-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/mcp-pyright

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page