MCP server that exposes Pyright language server functionality
Project description
mcp-pyright
MCP server that exposes Pyright language server functionality
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71773785e6e77218e39c97a944165671826fffc027e045a7ca86475c9fe40b76
|
|
| MD5 |
01468dfac27aa3194307cea3cb7d88a3
|
|
| BLAKE2b-256 |
cce99c3125c8247157ab4cc65317fe24da335c19647eba5fc79a0024142b61c4
|
Provenance
The following attestation bundles were made for mcp_pyright-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on daedalus/mcp-pyright
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_pyright-0.1.0.tar.gz -
Subject digest:
71773785e6e77218e39c97a944165671826fffc027e045a7ca86475c9fe40b76 - Sigstore transparency entry: 1204811369
- Sigstore integration time:
-
Permalink:
daedalus/mcp-pyright@7b9863f46ff007e27dfc99d18028e9a1e35ae237 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7b9863f46ff007e27dfc99d18028e9a1e35ae237 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d25b0e4b6827db24812e24a43ed8fa6e1a007138d6f897b5245161416ab417c
|
|
| MD5 |
e18b8095cb081729d71dfe9a3f1e70dc
|
|
| BLAKE2b-256 |
107e0b0107ecec589da8d406a1a9b0243c1dbcd18c818e6f77eae3d9dfe14dbd
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_pyright-0.1.0-py3-none-any.whl -
Subject digest:
0d25b0e4b6827db24812e24a43ed8fa6e1a007138d6f897b5245161416ab417c - Sigstore transparency entry: 1204811376
- Sigstore integration time:
-
Permalink:
daedalus/mcp-pyright@7b9863f46ff007e27dfc99d18028e9a1e35ae237 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7b9863f46ff007e27dfc99d18028e9a1e35ae237 -
Trigger Event:
release
-
Statement type: