Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteeb0cf7

Browse files
committed
Merge branch 'feat/pyright' into main - Release v0.8.0
2 parents3adb6d8 +08be3be commiteeb0cf7

File tree

9 files changed

+299
-172
lines changed

9 files changed

+299
-172
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,4 @@ tests/adapters/fixtures/rust/Cargo.lock
161161
tests/adapters/fixtures/moonbit/target/
162162
tests/adapters/fixtures/fsharp/obj/
163163
tests/adapters/fixtures/fsharp/bin/
164+
tests/adapters/fixtures/python/.venv

‎CHANGELOG.md‎

Lines changed: 74 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,56 @@
1-
#[0.7.0](https://github.com/mizchi/lsmcp/compare/v0.6.0...v0.7.0) (2025-07-02)
1+
#Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on[Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
##[0.8.0](https://github.com/mizchi/lsmcp/compare/v0.7.0...v0.8.0) (2025-07-03)
9+
10+
###🚀 Features
11+
12+
***Python Support**: Add Pyright and Ruff adapters for comprehensive Python language support
13+
- Pyright adapter for type checking and language features
14+
- Ruff adapter for fast Python linting
15+
- Full LSP tool support for Python development
16+
17+
###📚 Documentation
18+
19+
***Preset Usage**: Update all documentation to use`-p`/`--preset` pattern instead of deprecated`--language`
20+
***Manual Setup**: Add comprehensive manual setup documentation
21+
- Minimal rust-analyzer configuration example
22+
- Configuration file usage with`--config` option
23+
- Custom LSP server setup instructions
24+
***Available Presets**: Document all 8 built-in language presets
25+
- TypeScript (typescript, tsgo)
26+
- Python (pyright, ruff)
27+
- Rust (rust-analyzer)
28+
- F# (fsharp)
29+
- Deno
30+
- MoonBit
31+
32+
###🐛 Bug Fixes
33+
34+
***Type Errors**: Fix MCP SDK type mismatches using type casting approach
35+
- Resolve TypeScript compilation errors in mcpHelpers.ts
36+
- Ensure compatibility with both typescript-language-server and tsgo
37+
38+
###♻️ Code Refactoring
39+
40+
***Build Configuration**: Exclude Python virtual environments (.venv) from formatting
41+
42+
###🔧 Chores
43+
44+
* Switch code formatter from Deno to Biome
45+
* Drop MoonBit target support
46+
47+
##[0.7.0](https://github.com/mizchi/lsmcp/compare/v0.6.0...v0.7.0) (2025-07-02)
48+
49+
###🎉 Highlights
50+
51+
-**LocationLink Support for Modern LSP Servers**: Fixes "Go to Definition" for typescript-language-server and rust-analyzer
52+
-**Simplified Tool Names**: Removed`lsmcp_` prefix for better developer experience
53+
-**Enhanced Documentation**: Language-specific installation guides for TypeScript, Rust, F#, and Python
254

355
###🚀 Features
456

@@ -36,16 +88,27 @@
3688
-`lsmcp_get_hover``get_hover`
3789
-`lsmcp_find_references``find_references`
3890
-`lsmcp_get_definitions``get_definitions`
39-
- And all other tools follow the same pattern
40-
41-
42-
43-
#Changelog
44-
45-
All notable changes to this project will be documented in this file.
46-
47-
The format is based on[Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
48-
and this project adheres to[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
91+
-`lsmcp_rename_symbol``rename_symbol`
92+
-`lsmcp_delete_symbol``delete_symbol`
93+
-`lsmcp_get_diagnostics``get_diagnostics`
94+
-`lsmcp_get_all_diagnostics``get_all_diagnostics`
95+
-`lsmcp_get_document_symbols``get_document_symbols`
96+
-`lsmcp_get_workspace_symbols``get_workspace_symbols`
97+
-`lsmcp_get_completion``get_completion`
98+
-`lsmcp_get_signature_help``get_signature_help`
99+
-`lsmcp_get_code_actions``get_code_actions`
100+
-`lsmcp_format_document``format_document`
101+
102+
###🔄 Upgrading from v0.6.x
103+
104+
1. Update to v0.7.0:
105+
```bash
106+
npm update @mizchi/lsmcp
107+
```
108+
109+
2. Update your tool references to use the new names (remove`lsmcp_` prefix)
110+
111+
3. If you're using typescript-language-server, "Go to Definition" should now work correctly without any additional configuration
49112

50113
##[0.6.0](https://github.com/mizchi/typescript-mcp/compare/v0.5.0...v0.6.0) (2025-01-30)
51114

‎LSP_SUPPORTED_TABLE.md‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@
55
This table shows which LSP features are supported by each adapter.
66
Generated automatically by`scripts/build-supported-table.ts` - do not edit manually.
77

8-
| Adapter| Language| get_hover| find_references| get_definitions| get_diagnostics| get_all_diagnostics| rename_symbol| delete_symbol| get_document_symbols| get_completion| get_signature_help| format_document| get_code_actions|
9-
| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---|
10-
|**F# Autocomplete**<br/><small>F# language server (fsautocomplete)</small>| fsharp|||||||||||||
11-
|**MoonBit Language Server**<br/><small>moonbit lsp</small>| moonbit|||||||||||||
12-
|**Ruff**<br/><small>Python linter</small>| python|||||||||||||
13-
|**Pyright**<br/><small>Microsoft</small>| python|||||||||||||
14-
|**rust-analyzer**<br/><small>Official Rust language server</small>| rust|||||||||||||
15-
|**TypeScript Language Server**<br/><small>Community TypeScript Language Server</small>| typescript|||||||||||||
16-
|**tsgo**<br/><small>Fast TypeScript language server by tsgo</small>| typescript|||||||||||||
17-
|**Deno**<br/><small>Deno language server</small>| typescript|||||||||||||
8+
| Adapter| Language| get_hover| find_references| get_definitions| get_diagnostics| get_all_diagnostics| rename_symbol| delete_symbol| get_document_symbols| get_completion| get_signature_help| format_document| get_code_actions|
9+
| --------------------------------------------------------------------------------------| ----------| ---------| ---------------| ---------------| ---------------| -------------------| -------------| -------------| --------------------| --------------| ------------------| ---------------|----------------|
10+
|**F# Autocomplete**<br/><small>F# language server (fsautocomplete)</small>| fsharp|||||||||||||
11+
|**MoonBit Language Server**<br/><small>moonbit lsp</small>| moonbit|||||||||||||
12+
|**Ruff**<br/><small>Python linter</small>| python|||||||||||||
13+
|**Pyright**<br/><small>Microsoft</small>| python|||||||||||||
14+
|**rust-analyzer**<br/><small>Official Rust language server</small>| rust|||||||||||||
15+
|**TypeScript Language Server**<br/><small>Community TypeScript Language Server</small>| typescript|||||||||||||
16+
|**tsgo**<br/><small>Fast TypeScript language server by tsgo</small>| typescript|||||||||||||
17+
|**Deno**<br/><small>Deno language server</small>| typescript|||||||||||||
1818

1919
##Legend
20+
2021
- ✅ Supported
2122
- ❌ Not supported or not implemented
2223

2324
##Notes
25+
2426
- Features marked as ❌ will return appropriate error messages when called
2527
- Some adapters may have partial support for certain features
26-
- This table reflects the current implementation and may change as adapters are updated
28+
- This table reflects the current implementation and may change as adapters are updated

‎README.md‎

Lines changed: 158 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,28 @@ lsmcp provides multi-language support through Language Server Protocol (LSP) int
4646
###Basic Usage
4747

4848
```bash
49-
# Basic pattern: Specify LSP server with --bin
49+
# Using presets for common languages
50+
claude mcp add typescript npx -- -y @mizchi/lsmcp -p typescript
51+
52+
# Custom LSP server with --bin
5053
claude mcp add<server-name> npx -- -y @mizchi/lsmcp --bin="<lsp-command>"
51-
claude mcp add typescript npx -- -y @mizchi/lsmcp --language=typescript
5254
```
5355

56+
###Available Presets
57+
58+
lsmcp includes built-in presets for popular language servers:
59+
60+
-**`typescript`** - TypeScript/JavaScript (typescript-language-server)
61+
-**`tsgo`** - TypeScript/JavaScript (tsgo - faster alternative)
62+
-**`deno`** - Deno TypeScript/JavaScript
63+
-**`pyright`** - Python (Microsoft Pyright)
64+
-**`ruff`** - Python (Ruff linter as LSP)
65+
-**`rust-analyzer`** - Rust
66+
-**`fsharp`** - F# (fsautocomplete)
67+
-**`moonbit-language-server`** - MoonBit
68+
69+
For languages not in this list, or to customize LSP server settings, see[Manual Setup](#manual-setup).
70+
5471
###Language-Specific Setup
5572

5673
####TypeScript
@@ -62,11 +79,11 @@ claude mcp add typescript npx -- -y @mizchi/lsmcp --language=typescript
6279
# with typeScript-language-server (stable)
6380
npm add -D typescript typescript-language-server
6481
# Recommended: use tsgo for full functionality
65-
claude mcp add typescript npx -- -y @mizchi/lsmcp --language=typescript --bin="npx tsgo --lsp --stdio"
82+
claude mcp add typescript npx -- -y @mizchi/lsmcp -ptypescript --bin="npx tsgo --lsp --stdio"
6683

6784
# with @typescript/native-preview (experimental, fast)
6885
npm add -D @typescript/native-preview
69-
claude mcp add typescript npx -- -y @mizchi/lsmcp --language=typescirpt --bin="npx tsgo"
86+
claude mcp add typescript npx -- -y @mizchi/lsmcp -p typescript --bin="npx tsgo"
7087
```
7188

7289
Manual Configuration (.mcp.json)
@@ -79,7 +96,7 @@ Manual Configuration (.mcp.json)
7996
"args": [
8097
"-y",
8198
"@mizchi/lsmcp",
82-
"--language",
99+
"-p",
83100
"typescript",
84101
"--bin",
85102
"npx tsgo --lsp --stdio"
@@ -98,7 +115,7 @@ Manual Configuration (.mcp.json)
98115

99116
```bash
100117
rustup component add rust-analyzer
101-
claude mcp add rust npx -- -y @mizchi/lsmcp --bin="rust-analyzer"
118+
claude mcp add rust npx -- -y @mizchi/lsmcp -prust-analyzer
102119
```
103120

104121
Manual Configuration (.mcp.json)
@@ -108,7 +125,7 @@ Manual Configuration (.mcp.json)
108125
"mcpServers": {
109126
"rust": {
110127
"command":"npx",
111-
"args": ["-y","@mizchi/lsmcp","--bin","rust-analyzer"]
128+
"args": ["-y","@mizchi/lsmcp","-p","rust-analyzer"]
112129
}
113130
}
114131
}
@@ -125,7 +142,7 @@ See [examples/rust-project/](examples/rust-project/) for a complete example.
125142

126143
```bash
127144
dotnet tool install -g fsautocomplete
128-
claude mcp add fsharp npx -- -y @mizchi/lsmcp --language=fsharp --bin="fsautocomplete --adaptive-lsp-server-enabled"
145+
claude mcp add fsharp npx -- -y @mizchi/lsmcp -pfsharp --bin="fsautocomplete --adaptive-lsp-server-enabled"
129146
```
130147

131148
Manual Configuration (.mcp.json)
@@ -138,7 +155,7 @@ Manual Configuration (.mcp.json)
138155
"args": [
139156
"-y",
140157
"@mizchi/lsmcp",
141-
"--language",
158+
"-p",
142159
"fsharp",
143160
"--bin",
144161
"fsautocomplete"
@@ -158,6 +175,11 @@ See [examples/fsharp-project/](examples/fsharp-project/) for a complete example.
158175
<summary>Python Setup</summary>
159176

160177
```bash
178+
# Option 1: Using Pyright (recommended)
179+
npm install -g pyright
180+
claude mcp add python npx -- -y @mizchi/lsmcp -p pyright
181+
182+
# Option 2: Using python-lsp-server
161183
pip install python-lsp-server
162184
claude mcp add python npx -- -y @mizchi/lsmcp --bin="pylsp"
163185
```
@@ -169,7 +191,7 @@ Manual Configuration (.mcp.json)
169191
"mcpServers": {
170192
"python": {
171193
"command":"npx",
172-
"args": ["-y","@mizchi/lsmcp","--bin","pylsp"]
194+
"args": ["-y","@mizchi/lsmcp","-p","pyright"]
173195
}
174196
}
175197
}
@@ -190,17 +212,141 @@ lsmcp supports any language with an LSP server. Here are some common configurati
190212
# Go
191213
go install golang.org/x/tools/gopls@latest
192214
claude mcp add go npx -- -y @mizchi/lsmcp --bin="gopls"
215+
216+
# C/C++
217+
# Install clangd from your package manager or LLVM releases
218+
claude mcp add cpp npx -- -y @mizchi/lsmcp --bin="clangd"
219+
220+
# Java
221+
# Install jdtls (Eclipse JDT Language Server)
222+
claude mcp add java npx -- -y @mizchi/lsmcp --bin="jdtls"
193223
```
194224

225+
For more customization options, see[Manual Setup](#manual-setup).
226+
195227
</details>
196228

229+
##Manual Setup
230+
231+
For advanced users who want more control over LSP server configuration, you can set up lsmcp manually with custom settings.
232+
233+
###Minimal rust-analyzer Example
234+
235+
```json
236+
{
237+
"mcpServers": {
238+
"rust-minimal": {
239+
"command":"npx",
240+
"args": [
241+
"-y",
242+
"@mizchi/lsmcp",
243+
"--bin",
244+
"rust-analyzer"
245+
],
246+
"env": {
247+
"RUST_ANALYZER_CONFIG":"{\"assist\":{\"importGranularity\":\"module\"},\"cargo\":{\"allFeatures\":true}}"
248+
}
249+
}
250+
}
251+
}
252+
```
253+
254+
###Custom Language Server Setup
255+
256+
You can configure any LSP server by providing the binary path and optional initialization options:
257+
258+
```json
259+
{
260+
"mcpServers": {
261+
"custom-lsp": {
262+
"command":"npx",
263+
"args": [
264+
"-y",
265+
"@mizchi/lsmcp",
266+
"--bin",
267+
"/path/to/your/lsp-server",
268+
"--initializationOptions",
269+
"{\"customOption\":\"value\"}"
270+
]
271+
}
272+
}
273+
}
274+
```
275+
276+
###Using Configuration Files
277+
278+
For complex LSP server configurations, you can use the`--config` option to load settings from a JSON file:
279+
280+
1. Create a configuration file (e.g.,`my-language.json`):
281+
282+
```json
283+
{
284+
"id":"my-language",
285+
"name":"My Custom Language",
286+
"bin":"my-language-server",
287+
"args": ["--stdio"],
288+
"initializationOptions": {
289+
"formatOnSave":true,
290+
"lintingEnabled":true,
291+
"customFeatures": {
292+
"autoImport":true
293+
}
294+
}
295+
}
296+
```
297+
298+
2. Use it with lsmcp:
299+
300+
```bash
301+
# Using Claude CLI
302+
claude mcp add my-language npx -- -y @mizchi/lsmcp --config ./my-language.json
303+
304+
# Or in .mcp.json
305+
{
306+
"mcpServers": {
307+
"my-language": {
308+
"command":"npx",
309+
"args": ["-y","@mizchi/lsmcp","--config","./my-language.json"]
310+
}
311+
}
312+
}
313+
```
314+
315+
This approach is useful when:
316+
- You have complex initialization options
317+
- You want to share configurations across projects
318+
- You need to version control your LSP settings
319+
320+
###Environment Variables
321+
322+
Some LSP servers can be configured via environment variables:
323+
324+
```json
325+
{
326+
"mcpServers": {
327+
"configured-lsp": {
328+
"command":"npx",
329+
"args": ["-y","@mizchi/lsmcp","--bin","lsp-server"],
330+
"env": {
331+
"LSP_LOG_LEVEL":"debug",
332+
"LSP_WORKSPACE":"/path/to/workspace"
333+
}
334+
}
335+
}
336+
}
337+
```
338+
197339
##MCP Usage
198340

199341
###Command Line Options
200342

201343
```bash
202-
# TypeScript/JavaScript (built-in support)
203-
npx @mizchi/lsmcp --language<language> --bin'...'
344+
# Using language presets
345+
npx @mizchi/lsmcp -p<preset> --bin'...'
346+
npx @mizchi/lsmcp --preset<preset> --bin'...'
347+
348+
# Custom LSP server
349+
npx @mizchi/lsmcp --bin'<lsp-command>'
204350
```
205351

206352
##Development

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp