ask-web-search-mcp 0.2.0 → 0.3.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 +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +38 -14
- data/lib/ask/web_search/mcp/version.rb +1 -1
- data/lib/ask/web_search/mcp.rb +10 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51082bc819e6a1339ee7ff5910271207bfe64d14b04491cf4b3d07e7c51bd1f9
|
|
4
|
+
data.tar.gz: 58506846d0d4699a95bd2e9cb499a4cf2b5a18b662bd1fc16b07eecf71e02d5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7efeb497e046762da0649d6eb498853892054d55a05a1dbf1631ba2e6c4f695d3303dc1afbaac94c0a65c4fdeefbbedb767ee4502984c058f6590ead2ad04a96
|
|
7
|
+
data.tar.gz: 26a47fca4064effd03d08cbacd2e161f64d0ff5d0bc0d82fcc37ce6b95221a1f30ee2f2c1e058d8f1a867c7941a5034450f71967bdc7c428ba5fcdb619d5f284
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.1] - 2026-08-04
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Corrected publish of the 0.3.0 changeset (0.3.0 was yanked — it shipped a
|
|
8
|
+
stale build missing the `tool` extraction and serverInfo version
|
|
9
|
+
passthrough). 0.3.1 is the same changeset built correctly.
|
|
10
|
+
|
|
11
|
+
## [0.3.0] - 2026-08-04
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Stateless protocol support (2026-07-28)** — the server now negotiates the
|
|
16
|
+
stateless MCP revision via `server/discover` (no `initialize` handshake,
|
|
17
|
+
per-request `_meta`, `resultType`) when the client supports it, while
|
|
18
|
+
remaining backward compatible with legacy `initialize`-handshake clients.
|
|
19
|
+
Requires `ask-mcp >= 0.4` — the 0.4 line also brings server-side
|
|
20
|
+
resources/prompts and the Streamable HTTP rework.
|
|
21
|
+
- Development resolves `ask-mcp` from rubygems via the `>= 0.4` floor — no
|
|
22
|
+
local path overrides; the server always exercises the published protocol
|
|
23
|
+
support.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Functional test suite (`test/server_test.rb`) driving the server end-to-end
|
|
28
|
+
with `Ask::MCP::Client` over a real stdio subprocess: stateless
|
|
29
|
+
negotiation, tool listing, tool calls against a stubbed SearXNG (in-process
|
|
30
|
+
`FakeSearxng`), no-results handling, unknown-tool errors, and a
|
|
31
|
+
SearXNG-unreachable error path.
|
|
32
|
+
- `Ask::WebSearch::MCP.tool` — extracted, testable accessor for the
|
|
33
|
+
`ask_web_search` tool instance, with unit tests covering the MCP tool
|
|
34
|
+
contract (name, description, params schema).
|
|
35
|
+
- The server now reports its own gem version in the MCP `serverInfo`
|
|
36
|
+
handshake (via `ask-mcp >= 0.4.3`), instead of ask-mcp's version.
|
|
37
|
+
|
|
3
38
|
## [0.2.0] - 2026-07-18
|
|
4
39
|
|
|
5
40
|
### Changed
|
data/README.md
CHANGED
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/ask-web-search-mcp)
|
|
4
4
|
|
|
5
|
-
A minimal [MCP](https://modelcontextprotocol.io/) (Model Context Protocol)
|
|
6
|
-
that exposes an `ask_web_search` tool backed by SearXNG. Designed for
|
|
7
|
-
MCP-compatible clients like
|
|
5
|
+
A minimal [MCP](https://modelcontextprotocol.io/) (Model Context Protocol)
|
|
6
|
+
server that exposes an `ask_web_search` tool backed by SearXNG. Designed for
|
|
7
|
+
use with MCP-compatible clients like ZCode, Claude Code, Codex, and others.
|
|
8
|
+
|
|
9
|
+
The server speaks MCP **dual-mode** (requires `ask-mcp >= 0.4`): it negotiates
|
|
10
|
+
the stateless `2026-07-28` revision via `server/discover` (no `initialize`
|
|
11
|
+
handshake, per-request `_meta`, `resultType`) when the client supports it, and
|
|
12
|
+
falls back to the legacy `initialize` handshake for older clients.
|
|
13
|
+
|
|
14
|
+
The tool was renamed from `web_search` to `ask_web_search` in version 0.2.0 to
|
|
15
|
+
avoid collisions with client-side tools. Use `ask_web_search` in your
|
|
16
|
+
configuration and prompts.
|
|
8
17
|
|
|
9
18
|
## Prerequisites
|
|
10
19
|
|
|
@@ -15,15 +24,14 @@ is `http://localhost:8888`.
|
|
|
15
24
|
docker run -d --name searxng -p 8888:8080 searxng/searxng
|
|
16
25
|
```
|
|
17
26
|
|
|
18
|
-
Or use the provided `docker-compose.yml` in the
|
|
27
|
+
Or use the provided `docker-compose.yml` in the `searxng` directory of this
|
|
28
|
+
repository:
|
|
19
29
|
|
|
20
30
|
```sh
|
|
21
31
|
cd searxng
|
|
22
32
|
docker compose up -d
|
|
23
33
|
```
|
|
24
34
|
|
|
25
|
-
You can customise the SearXNG URL via the `SEARXNG_URL` environment variable.
|
|
26
|
-
|
|
27
35
|
## Installation
|
|
28
36
|
|
|
29
37
|
```sh
|
|
@@ -49,8 +57,8 @@ The server reads JSON-RPC messages on stdin and writes responses to stdout
|
|
|
49
57
|
|
|
50
58
|
### With ZCode
|
|
51
59
|
|
|
52
|
-
Add
|
|
53
|
-
|
|
60
|
+
Add to your ZCode user configuration (`~/.zcode/v2/config.json` or
|
|
61
|
+
`~/.zcode/cli/config.json`):
|
|
54
62
|
|
|
55
63
|
```json
|
|
56
64
|
{
|
|
@@ -66,7 +74,8 @@ Add the server to your ZCode user configuration
|
|
|
66
74
|
}
|
|
67
75
|
```
|
|
68
76
|
|
|
69
|
-
After restarting ZCode, the `ask_web_search` tool will be available to the
|
|
77
|
+
After restarting ZCode, the `ask_web_search` tool will be available to the
|
|
78
|
+
model automatically.
|
|
70
79
|
|
|
71
80
|
### With Claude Code
|
|
72
81
|
|
|
@@ -74,15 +83,30 @@ After restarting ZCode, the `ask_web_search` tool will be available to the model
|
|
|
74
83
|
claude mcp add ask-web-search-mcp -- npx -y @anthropic-ai/mcp-serve ask-web-search-mcp
|
|
75
84
|
```
|
|
76
85
|
|
|
86
|
+
## Configuration
|
|
87
|
+
|
|
88
|
+
- `SEARXNG_URL` - the SearXNG endpoint (default: `http://localhost:8888`).
|
|
89
|
+
- `DEBUG=1` - enable verbose logs on stderr.
|
|
90
|
+
|
|
91
|
+
## Full documentation
|
|
92
|
+
|
|
93
|
+
The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs.
|
|
94
|
+
[Core: Web Search](https://ask-rb.github.io/ask-docs/core/web-search) covers
|
|
95
|
+
ask-web-search-mcp in depth, including the tool library and troubleshooting.
|
|
96
|
+
API reference: https://ask-rb.github.io/ask-docs/reference/api.
|
|
97
|
+
|
|
77
98
|
## Development
|
|
78
99
|
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
cd ask-web-search-mcp
|
|
82
|
-
bin/setup
|
|
100
|
+
```
|
|
101
|
+
bundle install
|
|
83
102
|
bundle exec rake test
|
|
84
103
|
```
|
|
85
104
|
|
|
105
|
+
`ask-mcp` resolves from rubygems (`>= 0.4` — the 0.4 line carries the
|
|
106
|
+
stateless 2026-07-28 protocol support). The suite drives the server
|
|
107
|
+
end-to-end with `Ask::MCP::Client` over a real stdio subprocess, stubbing
|
|
108
|
+
SearXNG in-process (no network required).
|
|
109
|
+
|
|
86
110
|
## License
|
|
87
111
|
|
|
88
|
-
MIT
|
|
112
|
+
MIT
|
data/lib/ask/web_search/mcp.rb
CHANGED
|
@@ -7,6 +7,15 @@ require_relative "mcp/version"
|
|
|
7
7
|
module Ask
|
|
8
8
|
module WebSearch
|
|
9
9
|
module MCP
|
|
10
|
+
# Builds the tool exposed over MCP: Ask::Tools::WebSearch renamed to
|
|
11
|
+
# "ask_web_search" to avoid collisions with client-side tools of the
|
|
12
|
+
# same name.
|
|
13
|
+
def self.tool
|
|
14
|
+
tool = Ask::Tools::WebSearch.new
|
|
15
|
+
tool.define_singleton_method(:name) { "ask_web_search" }
|
|
16
|
+
tool
|
|
17
|
+
end
|
|
18
|
+
|
|
10
19
|
# Start the MCP server over stdio, exposing the ask_web_search tool.
|
|
11
20
|
#
|
|
12
21
|
# $ ask-web-search-mcp
|
|
@@ -25,11 +34,9 @@ module Ask
|
|
|
25
34
|
# }
|
|
26
35
|
# }
|
|
27
36
|
def self.start
|
|
28
|
-
tool = Ask::Tools::WebSearch.new
|
|
29
|
-
tool.define_singleton_method(:name) { "ask_web_search" }
|
|
30
|
-
|
|
31
37
|
Ask::MCP::Server.start_stdio(
|
|
32
38
|
name: "ask-web-search-mcp",
|
|
39
|
+
version: VERSION,
|
|
33
40
|
tools: [tool],
|
|
34
41
|
capabilities: { tools: {} },
|
|
35
42
|
debug: ENV["DEBUG"] == "1"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ask-web-search-mcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kaka Ruto
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 0.4.3
|
|
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:
|
|
25
|
+
version: 0.4.3
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: ask-web-search
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|