@treedy/lsp-mcp 0.1.2 → 0.1.4
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 +49 -22
- package/dist/index.js +360 -252
- package/dist/index.js.map +7 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@ Unified MCP server aggregating multi-language LSP backends for code intelligence
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Unified Entry Point**: Single MCP server for multiple languages
|
|
8
|
-
- **Namespaced Tools**: `
|
|
9
|
-
- **
|
|
8
|
+
- **Namespaced Tools**: `python_hover`, `typescript_definition`, etc.
|
|
9
|
+
- **On-Demand Loading**: Backends are installed and started only when needed
|
|
10
|
+
- **Dynamic Tool Registration**: Backend tools are discovered automatically
|
|
10
11
|
- **Skill Prompts**: Best practices exposed as MCP prompts for agents
|
|
11
|
-
- **Lazy Loading**: Backends start on first use
|
|
12
12
|
- **Graceful Degradation**: Clear error messages when backends unavailable
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
@@ -67,17 +67,17 @@ This ensures backends are always up-to-date when the server starts. To disable a
|
|
|
67
67
|
|
|
68
68
|
| Tool | Description |
|
|
69
69
|
|------|-------------|
|
|
70
|
-
| `{lang}
|
|
71
|
-
| `{lang}
|
|
72
|
-
| `{lang}
|
|
73
|
-
| `{lang}
|
|
74
|
-
| `{lang}
|
|
75
|
-
| `{lang}
|
|
76
|
-
| `{lang}
|
|
77
|
-
| `{lang}
|
|
78
|
-
| `{lang}
|
|
79
|
-
| `{lang}
|
|
80
|
-
| `{lang}
|
|
70
|
+
| `{lang}_hover` | Get type information and documentation |
|
|
71
|
+
| `{lang}_definition` | Go to definition |
|
|
72
|
+
| `{lang}_references` | Find all references |
|
|
73
|
+
| `{lang}_completions` | Code completion suggestions |
|
|
74
|
+
| `{lang}_diagnostics` | Type errors and warnings |
|
|
75
|
+
| `{lang}_symbols` | Extract symbols from file |
|
|
76
|
+
| `{lang}_rename` | Rename symbol |
|
|
77
|
+
| `{lang}_search` | Regex pattern search |
|
|
78
|
+
| `{lang}_signature_help` | Function signature help |
|
|
79
|
+
| `{lang}_update_document` | Update file for incremental analysis |
|
|
80
|
+
| `{lang}_status` | Backend status |
|
|
81
81
|
|
|
82
82
|
Replace `{lang}` with `python` or `typescript`.
|
|
83
83
|
|
|
@@ -85,20 +85,47 @@ Replace `{lang}` with `python` or `typescript`.
|
|
|
85
85
|
|
|
86
86
|
| Tool | Description |
|
|
87
87
|
|------|-------------|
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
88
|
+
| `python_move` | Move function/class to another module |
|
|
89
|
+
| `python_change_signature` | Modify function signature |
|
|
90
|
+
| `python_function_signature` | Get current function signature |
|
|
91
|
+
| `python_set_backend` | Switch between rope/pyright |
|
|
92
|
+
| `python_set_python_path` | Set Python interpreter |
|
|
93
93
|
|
|
94
94
|
### Meta Tools
|
|
95
95
|
|
|
96
96
|
| Tool | Description |
|
|
97
97
|
|------|-------------|
|
|
98
|
+
| `list_backends` | List available backends and their status |
|
|
99
|
+
| `start_backend` | Install and start a backend (downloads if needed) |
|
|
100
|
+
| `update_backend` | Update a backend to the latest version |
|
|
98
101
|
| `status` | Overall server and backend status with versions |
|
|
99
102
|
| `check_versions` | Detailed version info for server and all backends |
|
|
100
103
|
| `switch_python_backend` | Switch Python provider |
|
|
101
104
|
|
|
105
|
+
## Quick Start
|
|
106
|
+
|
|
107
|
+
1. **List available backends**:
|
|
108
|
+
```
|
|
109
|
+
list_backends
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
2. **Start a backend** (this will download and install if needed):
|
|
113
|
+
```
|
|
114
|
+
start_backend language=python
|
|
115
|
+
start_backend language=typescript
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
3. **Use backend tools** (available after starting):
|
|
119
|
+
```
|
|
120
|
+
python_hover file=/path/to/file.py line=10 column=5
|
|
121
|
+
typescript_definition file=/path/to/file.ts line=15 column=10
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
4. **Update a backend** (when new version is available):
|
|
125
|
+
```
|
|
126
|
+
update_backend language=python
|
|
127
|
+
```
|
|
128
|
+
|
|
102
129
|
## Available Prompts (Skills)
|
|
103
130
|
|
|
104
131
|
The server exposes skill documentation as MCP prompts that agents can request:
|
|
@@ -142,7 +169,7 @@ Repeat until clean
|
|
|
142
169
|
|
|
143
170
|
```json
|
|
144
171
|
{
|
|
145
|
-
"name": "
|
|
172
|
+
"name": "python_hover",
|
|
146
173
|
"arguments": {
|
|
147
174
|
"file": "/path/to/file.py",
|
|
148
175
|
"line": 10,
|
|
@@ -155,7 +182,7 @@ Repeat until clean
|
|
|
155
182
|
|
|
156
183
|
```json
|
|
157
184
|
{
|
|
158
|
-
"name": "
|
|
185
|
+
"name": "typescript_definition",
|
|
159
186
|
"arguments": {
|
|
160
187
|
"file": "/path/to/file.ts",
|
|
161
188
|
"line": 15,
|
|
@@ -193,7 +220,7 @@ This will automatically route to the Python backend.
|
|
|
193
220
|
│ │
|
|
194
221
|
│ ┌────────────────────────────────────────────────────────────┐ │
|
|
195
222
|
│ │ Tool Router │ │
|
|
196
|
-
│ │ - Parse tool name (
|
|
223
|
+
│ │ - Parse tool name (python_hover → {lang, tool}) │ │
|
|
197
224
|
│ │ - Infer language from file extension │ │
|
|
198
225
|
│ │ - Route to appropriate backend │ │
|
|
199
226
|
│ └────────────────────────────────────────────────────────────┘ │
|