nvim-mcp-server 0.2.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acdfba1e3fa12dbc46655893c542c90e616e5524ba340dd45dea65d16eda2ede
4
- data.tar.gz: ebf73d6c98f0fd5c755020607b3015492a17b4551de04268b91ff7ca5e28859b
3
+ metadata.gz: f9c8dd77ce55251fd20fbb54323c4cdedafb03444c767142a1cb52f97fa8036e
4
+ data.tar.gz: df34f2fad04103930f2688b9fd354fdf1cd59b47367a2c22eeb36d6eb33ab1cb
5
5
  SHA512:
6
- metadata.gz: 4d0533967f34381dab20aa02fc59eacae836cb3480ee99ac0ac88801ab720eb5b7d43f7d19ef472599abe9882e876730b796783e7c3a04577c487a0ada38b3a3
7
- data.tar.gz: 89fa8935a7965fed00f27b308603b947f4e47ee74844a31d2ed96a4d96b64f3f08c8204c9d39e0f6eebb3fb2b6f692512a5db8afa5c94e0c661c38c782484ef1
6
+ metadata.gz: 7b5765cb074fa96a786bc1420222eefeef820c437b1a4269f03d1669084fe81c58bca8a20811f230411bed5f0ce4df61508759ff6ebf98df762972e21be85fb9
7
+ data.tar.gz: ebce3dee078c53b875321e8ae912f03afd6c053443da69866117f634da0bed26803aa4a6168241ebea52fc5ea0b216d6605364e13a9658a05fcfcf097dd2a087
data/CHANGELOG.md CHANGED
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0] - 2025-12-01
11
+
12
+ ### Changed
13
+
14
+ - **Dependency Updates**: Updated core dependencies to latest versions
15
+ - fast-mcp: 1.1.0 → 1.6.0
16
+ - rack: 3.1.12 → 3.2.0
17
+ - puma: 6.6.0 → 7.1.0
18
+ - logger: 1.6.6 → 1.7.0
19
+
20
+ ## [0.2.1] - 2025-07-21
21
+
22
+ ### Added
23
+
24
+ - **Network Access Support**: New `--bind-all` flag for HTTP mode to allow access from local network
25
+ - Binds to `0.0.0.0` instead of `localhost` when enabled
26
+ - Allows connections from local network IP ranges (192.168.x.x, 10.x.x.x, 172.16.x.x)
27
+ - Accepts connections from `.local` domain names (e.g., `my-computer.local`)
28
+ - Maintains security features with origin validation and IP filtering
29
+
30
+ ### Improved
31
+
32
+ - **Security Configuration**: Enhanced allowed origins and IP configuration when using `--bind-all`
33
+ - Automatically configures appropriate security settings for local network access
34
+ - Preserves localhost-only mode by default for security
35
+ - Clear documentation of security implications
36
+
37
+ ### Changed
38
+
39
+ - HTTP server binding address is now configurable via `--bind-all` flag
40
+ - Updated help text to include new network access option
41
+ - Fixed typo in default response text (was showing "Rails MCP Server" instead of "Neovim MCP Server")
42
+
10
43
  ## [0.2.0] - 2025-07-08
11
44
 
12
45
  ### Added
data/README.md CHANGED
@@ -53,6 +53,9 @@ nvim-mcp-server --mode http
53
53
 
54
54
  # Start in HTTP mode on a custom port
55
55
  nvim-mcp-server --mode http -p 8080
56
+
57
+ # Start in HTTP mode binding to all interfaces (for local network access)
58
+ nvim-mcp-server --mode http --bind-all
56
59
  ```
57
60
 
58
61
  When running in HTTP mode, the server provides two endpoints:
@@ -60,6 +63,27 @@ When running in HTTP mode, the server provides two endpoints:
60
63
  - JSON-RPC endpoint: `http://localhost:<port>/mcp/messages`
61
64
  - SSE endpoint: `http://localhost:<port>/mcp/sse`
62
65
 
66
+ ### Network Access (HTTP Mode)
67
+
68
+ By default, the HTTP server only binds to localhost for security. If you need to access the server from other machines on your local network (e.g., for testing with multiple devices), you can use the `--bind-all` flag:
69
+
70
+ ```bash
71
+ # Allow access from any machine on your local network
72
+ nvim-mcp-server --mode http --bind-all
73
+
74
+ # With a custom port
75
+ nvim-mcp-server --mode http --bind-all -p 8080
76
+ ```
77
+
78
+ When using `--bind-all`:
79
+
80
+ - The server binds to `0.0.0.0` instead of `localhost`
81
+ - Access is allowed from local network IP ranges (192.168.x.x, 10.x.x.x, 172.16.x.x)
82
+ - The server accepts connections from `.local` domain names (e.g., `my-computer.local`)
83
+ - Security features remain active to prevent unauthorized access
84
+
85
+ **Security Note**: Only use `--bind-all` on trusted networks. The server includes built-in security features to validate origins and IP addresses, but exposing any service to your network increases the attack surface.
86
+
63
87
  ### Logging Options
64
88
 
65
89
  The server logs to a file in your config directory by default. You can customize logging with these options:
data/exe/nvim-mcp-server CHANGED
@@ -32,11 +32,13 @@ if ARGV[0] == "--help" || ARGV[0] == "-h"
32
32
  puts " --log-level LEVEL Log level: debug, info, warn, error (default: info)"
33
33
  puts " --mode MODE Server mode: http or stdio (default: stdio)"
34
34
  puts " -p, --port PORT Port to listen on (default: 6030)"
35
+ puts " --bind-all Bind to 0.0.0.0 instead of localhost (HTTP mode only)"
35
36
  puts " version Display version information"
36
37
  puts " --help, -h Display this help message"
37
38
  puts ""
38
39
  puts "Example:"
39
40
  puts " #{File.basename($0)} --log-level debug -p 6060"
41
+ puts " #{File.basename($0)} --mode http --bind-all"
40
42
  puts " #{File.basename($0)} --mode stdio"
41
43
  exit 0
42
44
  end
@@ -44,6 +46,7 @@ end
44
46
  # Default values
45
47
  port = 6030
46
48
  mode = "stdio"
49
+ bind_all = false
47
50
 
48
51
  # Parse command-line arguments
49
52
  i = 0
@@ -62,6 +65,9 @@ while i < ARGV.length
62
65
  exit 1
63
66
  end
64
67
  i += 2
68
+ when "--bind-all"
69
+ bind_all = true
70
+ i += 1
65
71
  else
66
72
  i += 1
67
73
  end
@@ -80,10 +86,12 @@ end
80
86
 
81
87
  case mode
82
88
  when "http"
89
+ bind_address = bind_all ? "0.0.0.0" : "localhost"
90
+
83
91
  puts "Starting Rack application with MCP middleware on http://localhost:#{port}"
84
92
  puts "MCP endpoints:"
85
- puts " - http://localhost:#{port}/mcp/sse (SSE endpoint)"
86
- puts " - http://localhost:#{port}/mcp/messages (JSON-RPC endpoint)"
93
+ puts " - http://#{bind_address}:#{port}/mcp/sse (SSE endpoint)"
94
+ puts " - http://#{bind_address}:#{port}/mcp/messages (JSON-RPC endpoint)"
87
95
  puts ""
88
96
  puts "Version #{NvimMcpServer::VERSION}"
89
97
  puts ""
@@ -95,12 +103,15 @@ when "http"
95
103
  mcp_app = FastMcp.rack_middleware(
96
104
  rack_app,
97
105
  name: "nvim-mcp-server", version: NvimMcpServer::VERSION,
106
+ allowed_origins: bind_all ? ["127.0.0.1", "localhost", /.*\.local$/] : ["127.0.0.1", "localhost"],
107
+ localhost_only: !bind_all,
108
+ allowed_ips: bind_all ? ["192.168.0.0/16", "10.0.0.0/8", "172.16.0.0/12"] : ["127.0.0.1", "::1"],
98
109
  logger: NvimMcpServer.logger
99
110
  ) { |server| setup_mcp_tools(server) }
100
111
 
101
112
  app = Rack::Builder.new { run mcp_app }
102
113
  config = Puma::Configuration.new do |user_config|
103
- user_config.bind "tcp://localhost:#{port}"
114
+ user_config.bind "tcp://#{bind_address}:#{port}"
104
115
  user_config.app app
105
116
  end
106
117
 
@@ -1,3 +1,3 @@
1
1
  module NvimMcpServer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nvim-mcp-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Alberto Chávez
@@ -15,56 +15,56 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 1.1.0
18
+ version: 1.6.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 1.1.0
25
+ version: 1.6.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rack
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 3.1.12
32
+ version: 3.2.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 3.1.12
39
+ version: 3.2.0
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: puma
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 6.6.0
46
+ version: 7.1.0
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 6.6.0
53
+ version: 7.1.0
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: logger
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.6.6
60
+ version: 1.7.0
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 1.6.6
67
+ version: 1.7.0
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: neovim
70
70
  requirement: !ruby/object:Gem::Requirement