ask-web-search-mcp 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 74101b65000d8653c19c54ef6c086c7e8cff70e0d9d6d97b8326b9ea7c549b38
4
+ data.tar.gz: a635049085f7a01311ea6398a888af0e71770a7b78c7801cd52e6aedc3a03698
5
+ SHA512:
6
+ metadata.gz: ec94b39fc0d04e542b1687a3ba765615a955c9913fcad3730c564d4c08622b9c9662b646bb0b674d8d163aaddf419ee60127fced6729917a2cd1123f0003ef72
7
+ data.tar.gz: 52d3567b53606f19617a12c75adf91641101eef917bf2ec01bee0a5cc74be429732785386a29d78343a2c0a6a699d5be5744f66bcb141d816d5c557e82d10982
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0] - 2026-07-18
4
+
5
+ ### Added
6
+
7
+ - Initial release — minimal MCP server exposing the `web_search` tool backed by
8
+ SearXNG via `ask-web-search`.
9
+ - Stdio transport via `Ask::MCP::Server.start_stdio`.
10
+ - Configurable SearXNG URL via `SEARXNG_URL` environment variable (inherited
11
+ from `ask-web-search`).
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kaka Ruto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # ask-web-search-mcp
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/ask-web-search-mcp.svg)](https://rubygems.org/gems/ask-web-search-mcp)
4
+
5
+ A minimal [MCP](https://modelcontextprotocol.io/) (Model Context Protocol) server
6
+ that exposes a `web_search` tool backed by SearXNG. Designed for use with
7
+ MCP-compatible clients like **ZCode**, **Claude Code**, **Codex**, and others.
8
+
9
+ ## Prerequisites
10
+
11
+ A running [SearXNG](https://docs.searxng.org/) instance. The default endpoint
12
+ is `http://localhost:8888`.
13
+
14
+ ```sh
15
+ docker run -d --name searxng -p 8888:8080 searxng/searxng
16
+ ```
17
+
18
+ Or use the provided `docker-compose.yml` in the [`searxng`](../searxng) directory:
19
+
20
+ ```sh
21
+ cd searxng
22
+ docker compose up -d
23
+ ```
24
+
25
+ You can customise the SearXNG URL via the `SEARXNG_URL` environment variable.
26
+
27
+ ## Installation
28
+
29
+ ```sh
30
+ gem install ask-web-search-mcp
31
+ ```
32
+
33
+ Or in your Gemfile:
34
+
35
+ ```ruby
36
+ gem "ask-web-search-mcp"
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ ### Standalone
42
+
43
+ ```sh
44
+ ask-web-search-mcp
45
+ ```
46
+
47
+ The server reads JSON-RPC messages on stdin and writes responses to stdout
48
+ (the standard MCP stdio transport).
49
+
50
+ ### With ZCode
51
+
52
+ Add the server to your ZCode user configuration
53
+ (`~/.zcode/v2/config.json`):
54
+
55
+ ```json
56
+ {
57
+ "mcp": {
58
+ "servers": {
59
+ "ask-web-search-mcp": {
60
+ "command": "ask-web-search-mcp"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ After restarting ZCode, the `web_search` tool will be available to the model.
68
+
69
+ ### With Claude Code
70
+
71
+ ```sh
72
+ claude mcp add ask-web-search-mcp -- npx -y @anthropic-ai/mcp-serve ask-web-search-mcp
73
+ ```
74
+
75
+ ## Development
76
+
77
+ ```sh
78
+ git clone https://github.com/ask-rb/ask-web-search-mcp
79
+ cd ask-web-search-mcp
80
+ bin/setup
81
+ bundle exec rake test
82
+ ```
83
+
84
+ ## License
85
+
86
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "ask/web_search/mcp"
5
+
6
+ Ask::WebSearch::MCP.start
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ask
4
+ module WebSearch
5
+ module MCP
6
+ VERSION = "0.1.0"
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ask/mcp"
4
+ require "ask/web_search"
5
+ require_relative "mcp/version"
6
+
7
+ module Ask
8
+ module WebSearch
9
+ module MCP
10
+ # Start the MCP server over stdio, exposing the WebSearch tool.
11
+ #
12
+ # $ ask-web-search-mcp
13
+ #
14
+ # The server will listen for JSON-RPC messages on stdin and write
15
+ # responses to stdout — the standard MCP stdio transport. Register
16
+ # this executable as an MCP server in your client configuration:
17
+ #
18
+ # "mcp": {
19
+ # "servers": {
20
+ # "ask-web-search-mcp": {
21
+ # "command": "ask-web-search-mcp",
22
+ # "type": "stdio"
23
+ # }
24
+ # }
25
+ # }
26
+ def self.start
27
+ Ask::MCP::Server.start_stdio(
28
+ name: "ask-web-search-mcp",
29
+ tools: [Ask::Tools::WebSearch.new],
30
+ capabilities: { tools: {} },
31
+ debug: ENV["DEBUG"] == "1"
32
+ )
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ask/web_search/mcp"
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ask-web-search-mcp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kaka Ruto
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: ask-mcp
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0.1'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0.1'
26
+ - !ruby/object:Gem::Dependency
27
+ name: ask-web-search
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0.2'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0.2'
40
+ - !ruby/object:Gem::Dependency
41
+ name: minitest
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.25'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '5.25'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rake
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '13.0'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '13.0'
68
+ description: |
69
+ A minimal MCP (Model Context Protocol) server that exposes Ask::Tools::WebSearch
70
+ as a callable tool over stdio. Designed for use with clients that support MCP
71
+ (ZCode, Claude Code, etc.), it queries a local SearXNG instance and returns
72
+ formatted search results suitable for LLM consumption.
73
+ email:
74
+ - kaka@myrrlabs.com
75
+ executables:
76
+ - ask-web-search-mcp
77
+ extensions: []
78
+ extra_rdoc_files: []
79
+ files:
80
+ - CHANGELOG.md
81
+ - LICENSE
82
+ - README.md
83
+ - bin/ask-web-search-mcp
84
+ - lib/ask-web-search-mcp.rb
85
+ - lib/ask/web_search/mcp.rb
86
+ - lib/ask/web_search/mcp/version.rb
87
+ homepage: https://github.com/ask-rb/ask-web-search-mcp
88
+ licenses:
89
+ - MIT
90
+ metadata:
91
+ homepage_uri: https://github.com/ask-rb/ask-web-search-mcp
92
+ source_code_uri: https://github.com/ask-rb/ask-web-search-mcp
93
+ changelog_uri: https://github.com/ask-rb/ask-web-search-mcp/blob/master/CHANGELOG.md
94
+ rdoc_options: []
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '3.2'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubygems_version: 4.0.3
109
+ specification_version: 4
110
+ summary: MCP server for web search via SearXNG
111
+ test_files: []