WORLDBOOK

Worldbooks | WebMCP | Search | Submit WebMCP

wikipedia WebMCP

Browser tool configuration for wikipedia

URL Pattern: ^https?://en\.wikipedia\.org(/.*)?$
Allowed Extra Domains: en.wikipedia.org

Tools (2)

wikipedia_search()

搜索维基百科

Parameters

query string - 搜索关键词
count string - 返回结果数量 (默认 10)

JavaScript Handler

wikipedia_summary()

获取维基百科页面摘要

Parameters

title string - 页面标题 (用下划线替换空格)

JavaScript Handler

(params) => {
  const run = async function(args) {

      const title = args.title || args._input;
      if (!title) return {error: 'Missing title parameter'};
      const url = `https://en.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(title)}`;
      const resp = await fetch(url);
      if (!resp.ok) return {error: 'HTTP ' + resp.status};
      const data = await resp.json();
      return {
        title: data.title,
        description: data.description,
        extract: data.extract,
        thumbnail: data.thumbnail?.source,
        url: data.content_urls?.desktop?.page,
        timestamp: data.timestamp
      };
  };
  return run(params || {});
}

🔌 Chrome MCP Server Extension

Use these tools with Claude, ChatGPT, and other AI assistants.

Get Extension →

How to Use WebMCP

WebMCP tools are designed for browser extensions or automation frameworks. The browser extension matches the current URL against the pattern and executes the JavaScript handler when the tool is invoked.

API Endpoint:

GET /api/webmcp/match?url=https://www.wikipedia.com/...