imdb WebMCP
Browser tool configuration for imdb
Tools (1)
imdb_search()
IMDb 电影搜索
Parameters
JavaScript Handler
(params) => {
const run = async function(args) {
const query = (args.query || '').trim().toLowerCase();
if (!query) return {error: 'query is required'};
const firstChar = query[0];
const url = `https://v3.sg.media-imdb.com/suggestion/${firstChar}/${encodeURIComponent(query)}.json`;
const resp = await fetch(url);
if (!resp.ok) return {error: 'HTTP ' + resp.status};
const data = await resp.json();
const items = (data.d || []).map(item => ({
title: item.l,
year: item.y,
type: item.q,
stars: item.s,
imdbId: item.id,
imageUrl: item.i?.imageUrl,
url: item.id ? `https://www.imdb.com/title/${item.id}/` : undefined
}));
return {count: items.length, results: items};
};
return run(params || {});
}
WebMCP clients
Use mcp-chrome, or fetch the same tools from the public API in your own browser automation runtime.
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.imdb.com/...
Third-party clients can use the same endpoint as mcp-chrome. Execute the returned JavaScript handler in your own browser page context.