@treedy/pyright-mcp 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/dist/index.js +1611 -43
- package/dist/index.js.map +26 -0
- package/dist/lsp/connection.d.ts +71 -0
- package/dist/lsp/document-manager.d.ts +67 -0
- package/dist/lsp/index.d.ts +3 -0
- package/dist/lsp/types.d.ts +55 -0
- package/dist/lsp-client.d.ts +42 -2
- package/dist/tools/references.d.ts +0 -2
- package/dist/tools/symbols.d.ts +17 -0
- package/dist/tools/update-document.d.ts +14 -0
- package/package.json +9 -8
- package/dist/lsp-client.js +0 -80
- package/dist/pyright-worker.mjs +0 -148
- package/dist/tools/completions.js +0 -71
- package/dist/tools/definition.js +0 -65
- package/dist/tools/diagnostics.js +0 -93
- package/dist/tools/hover.js +0 -44
- package/dist/tools/references.js +0 -28
- package/dist/tools/rename.js +0 -44
- package/dist/tools/search.js +0 -91
- package/dist/tools/signature-help.js +0 -54
- package/dist/tools/status.js +0 -147
- package/dist/utils/position.js +0 -74
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @treedy/pyright-mcp
|
|
1
|
+
# @treedy/pyright-mcp (TypeScript)
|
|
2
2
|
|
|
3
3
|
MCP (Model Context Protocol) server that exposes [Pyright](https://github.com/microsoft/pyright) LSP features for Python code intelligence. Works with Claude Code, Codex, and other MCP-compatible AI tools.
|
|
4
4
|
|
|
@@ -13,6 +13,8 @@ MCP (Model Context Protocol) server that exposes [Pyright](https://github.com/mi
|
|
|
13
13
|
- **rename** - Preview symbol renaming
|
|
14
14
|
- **search** - Search for patterns in files (ripgrep-style)
|
|
15
15
|
- **status** - Check Python/Pyright environment status
|
|
16
|
+
- **symbols** - Extract symbols (classes, functions, methods, variables)
|
|
17
|
+
- **update_document** - Update file content for incremental analysis
|
|
16
18
|
|
|
17
19
|
## Prerequisites
|
|
18
20
|
|
|
@@ -161,6 +163,15 @@ Tool: diagnostics
|
|
|
161
163
|
Arguments: { "file": "/path/to/file.py" }
|
|
162
164
|
```
|
|
163
165
|
|
|
166
|
+
### Get Symbols
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
Tool: symbols
|
|
170
|
+
Arguments: { "file": "/path/to/file.py", "filter": "classes" }
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Filter options: `all`, `classes`, `functions`, `methods`, `variables`
|
|
174
|
+
|
|
164
175
|
### Search in Files
|
|
165
176
|
|
|
166
177
|
```
|
|
@@ -171,10 +182,6 @@ Arguments: { "pattern": "def main", "path": "/path/to/project", "glob": "*.py" }
|
|
|
171
182
|
## Development
|
|
172
183
|
|
|
173
184
|
```bash
|
|
174
|
-
# Clone the repository
|
|
175
|
-
git clone <repo-url>
|
|
176
|
-
cd pyright-mcp
|
|
177
|
-
|
|
178
185
|
# Install dependencies
|
|
179
186
|
npm install
|
|
180
187
|
|
|
@@ -204,7 +211,7 @@ After publishing, users can run directly with:
|
|
|
204
211
|
npx @treedy/pyright-mcp
|
|
205
212
|
```
|
|
206
213
|
|
|
207
|
-
##
|
|
214
|
+
## Architecture
|
|
208
215
|
|
|
209
216
|
```
|
|
210
217
|
┌─────────────────┐ stdio ┌─────────────────────┐ stdio ┌──────────────────┐
|