Module: Ask::WebSearch::MCP
- Defined in:
- lib/ask/web_search/mcp.rb,
lib/ask/web_search/mcp/version.rb
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
-
.start ⇒ Object
Start the MCP server over stdio, exposing the ask_web_search tool.
Class Method Details
.start ⇒ Object
Start the MCP server over stdio, exposing the ask_web_search tool.
$ ask-web-search-mcp
The server will listen for JSON-RPC messages on stdin and write responses to stdout — the standard MCP stdio transport. Register this executable as an MCP server in your client configuration:
"mcp": {
"servers": {
"ask-web-search-mcp": {
"type": "stdio",
"command": "ask-web-search-mcp",
"args": []
}
}
}
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ask/web_search/mcp.rb', line 27 def self.start tool = Ask::Tools::WebSearch.new tool.define_singleton_method(:name) { "ask_web_search" } Ask::MCP::Server.start_stdio( name: "ask-web-search-mcp", tools: [tool], capabilities: { tools: {} }, debug: ENV["DEBUG"] == "1" ) end |