nvim-mcp-server 0.2.0 → 0.2.1

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: 6fb63496112d2e52b2107995965bc2af9f5b335c0119e64c9a08c2a8725904ed
4
+ data.tar.gz: 3653a0dd083d33c1f876d5ad8b990031e6a1a32f5e02ce68cb4c8d4139ce7bc0
5
5
  SHA512:
6
- metadata.gz: 4d0533967f34381dab20aa02fc59eacae836cb3480ee99ac0ac88801ab720eb5b7d43f7d19ef472599abe9882e876730b796783e7c3a04577c487a0ada38b3a3
7
- data.tar.gz: 89fa8935a7965fed00f27b308603b947f4e47ee74844a31d2ed96a4d96b64f3f08c8204c9d39e0f6eebb3fb2b6f692512a5db8afa5c94e0c661c38c782484ef1
6
+ metadata.gz: 2f2b647116afb3904e3d29f95eecc70d642d02c997046030b6556621ddc595f8e787ad2d7e8655d04ac0f56b94326144ef7f84c02ff1d5157ee0dce6afba43e6
7
+ data.tar.gz: 1b9a694bf4a198e342814eb066ae4e0382bca37073ec6ea93aa771c05287b0d536772982d75ceb0faf9b765a24b832e04fac271d10689622430ebe73f3135fdf
data/CHANGELOG.md CHANGED
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2025-07-21
11
+
12
+ ### Added
13
+
14
+ - **Network Access Support**: New `--bind-all` flag for HTTP mode to allow access from local network
15
+ - Binds to `0.0.0.0` instead of `localhost` when enabled
16
+ - Allows connections from local network IP ranges (192.168.x.x, 10.x.x.x, 172.16.x.x)
17
+ - Accepts connections from `.local` domain names (e.g., `my-computer.local`)
18
+ - Maintains security features with origin validation and IP filtering
19
+
20
+ ### Improved
21
+
22
+ - **Security Configuration**: Enhanced allowed origins and IP configuration when using `--bind-all`
23
+ - Automatically configures appropriate security settings for local network access
24
+ - Preserves localhost-only mode by default for security
25
+ - Clear documentation of security implications
26
+
27
+ ### Changed
28
+
29
+ - HTTP server binding address is now configurable via `--bind-all` flag
30
+ - Updated help text to include new network access option
31
+ - Fixed typo in default response text (was showing "Rails MCP Server" instead of "Neovim MCP Server")
32
+
10
33
  ## [0.2.0] - 2025-07-08
11
34
 
12
35
  ### 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.2.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
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.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Alberto Chávez
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
10
+ date: 2025-07-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: fast-mcp
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.6.9
141
+ rubygems_version: 3.6.2
142
142
  specification_version: 4
143
143
  summary: MCP server for Neovim
144
144
  test_files: []