From c5de8bdf3f33090471199764370da9b0046ab59b Mon Sep 17 00:00:00 2001 From: Jun Date: Tue, 1 Apr 2025 22:28:22 -0500 Subject: [PATCH 1/9] Add a Puppeteer tool to capture screenshot as raw base64 text --- src/puppeteer/README.md | 8 ++++++ src/puppeteer/index.ts | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/src/puppeteer/README.md b/src/puppeteer/README.md index 4eab314c..50f8b82e 100644 --- a/src/puppeteer/README.md +++ b/src/puppeteer/README.md @@ -21,6 +21,14 @@ A Model Context Protocol server that provides browser automation capabilities us - `width` (number, optional, default: 800): Screenshot width - `height` (number, optional, default: 600): Screenshot height +- **puppeteer_screenshot_encoded** + - Captures a screenshot of the entire page or a specific element and return it as a base64-encoded data URI. + - Inputs: + - `name` (string, required): Name for the screenshot + - `selector` (string, optional): CSS selector for element to screenshot + - `width` (number, optional, default: 800): Screenshot width + - `height` (number, optional, default: 600): Screenshot height + - **puppeteer_click** - Click elements on the page - Input: `selector` (string): CSS selector for element to click diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index 1849c783..feabec70 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -43,6 +43,20 @@ const TOOLS: Tool[] = [ required: ["name"], }, }, + { + name: "puppeteer_screenshot_encoded", + description: "Take a screenshot of the current page or a specific element and return it as a base64-encoded data URI", + inputSchema: { + type: "object", + properties: { + name: { type: "string", description: "Name for the screenshot" }, + selector: { type: "string", description: "CSS selector for element to screenshot" }, + width: { type: "number", description: "Width in pixels (default: 800)" }, + height: { type: "number", description: "Height in pixels (default: 600)" }, + }, + required: ["name"], + }, + }, { name: "puppeteer_click", description: "Click an element on the page", @@ -265,6 +279,47 @@ async function handleToolCall(name: string, args: any): Promise }; } + case "puppeteer_screenshot_encoded": { + const width = args.width ?? 800; + const height = args.height ?? 600; + await page.setViewport({ width, height }); + + const screenshot = await (args.selector + ? (await page.$(args.selector))?.screenshot({ encoding: "base64" }) + : page.screenshot({ encoding: "base64", fullPage: false })); + + if (!screenshot) { + return { + content: [ + { + type: "text", + text: args.selector ? `Element not found: ${args.selector}` : "Screenshot failed", + }, + ], + isError: true, + }; + } + + screenshots.set(args.name, screenshot as string); + server.notification({ + method: "notifications/resources/list_changed", + }); + + return { + content: [ + { + type: "text", + text: `Screenshot '${args.name}' taken at ${width}x${height}`, + } as TextContent, + { + type: "text", + text: `data:image/png;base64,${screenshot}`, + } as TextContent, + ], + isError: false, + }; + } + case "puppeteer_click": try { await page.click(args.selector); From c5dedbb343121e0e54708d8f24eade038a971cdc Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Sat, 19 Apr 2025 10:57:44 -0300 Subject: [PATCH 2/9] chore: add rust mcp filesystem to community servers --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 38f1dada..bf92ac2c 100644 --- a/README.md +++ b/README.md @@ -348,6 +348,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[Rquest](https://github.com/xxxbrian/mcp-rquest)** - An MCP server providing realistic browser-like HTTP request capabilities with accurate TLS/JA3/JA4 fingerprints for bypassing anti-bot measures. - **[Rijksmuseum](https://github.com/r-huijts/rijksmuseum-mcp)** - Interface with the Rijksmuseum API to search artworks, retrieve artwork details, access image tiles, and explore user collections. - **[Riot Games](https://github.com/jifrozen0110/mcp-riot)** - MCP server for League of Legends – fetch player info, ranks, champion stats, and match history via Riot API. +- **[Rust MCP Filesystem](https://github.com/rust-mcp-stack/rust-mcp-filesystem)** - Fast, asynchronous MCP server for efficient handling of various filesystem operations built with the power of Rust. - **[Salesforce MCP](https://github.com/smn2gnt/MCP-Salesforce)** - Interact with Salesforce Data and Metadata - **[Scholarly](https://github.com/adityak74/mcp-scholarly)** - A MCP server to search for scholarly and academic articles. - **[scrapling-fetch](https://github.com/cyberchitta/scrapling-fetch-mcp)** - Access text content from bot-protected websites. Fetches HTML/markdown from sites with anti-automation measures using Scrapling. From 2e25c60bfbaec752fe2c1739b05126d769d11ea8 Mon Sep 17 00:00:00 2001 From: VivekKumarNeu Date: Sat, 19 Apr 2025 18:32:45 -0700 Subject: [PATCH 3/9] add lucene mcp server --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a7eaf946..831b83e1 100644 --- a/README.md +++ b/README.md @@ -406,6 +406,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[YouTube](https://github.com/Klavis-AI/klavis/tree/main/mcp_servers/youtube)** - Extract Youtube video information (with proxies support). - **[YouTube](https://github.com/ZubeidHendricks/youtube-mcp-server)** - Comprehensive YouTube API integration for video management, Shorts creation, and analytics. - **[mcp_weather](https://github.com/isdaniel/mcp_weather_server)** - Get weather information from https://api.open-meteo.com API. +- **[mcp-lucene-server](https://github.com/VivekKumarNeu/MCP-Lucene-Server)** - spring boot server using Lucene for fast document search and management. ## 📚 Frameworks From 943252994b7a07cfee459d41bc9da74cf5f4bd24 Mon Sep 17 00:00:00 2001 From: VivekKumarNeu Date: Sat, 19 Apr 2025 22:51:33 -0700 Subject: [PATCH 4/9] add lucene mcp server --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 831b83e1..7629a2c2 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[LINE](https://github.com/amornpan/py-mcp-line)** (by amornpan) - Implementation for LINE Bot integration that enables Language Models to read and analyze LINE conversations through a standardized interface. Features asynchronous operation, comprehensive logging, webhook event handling, and support for various message types. - **[LlamaCloud](https://github.com/run-llama/mcp-server-llamacloud)** (by marcusschiesser) - Integrate the data stored in a managed index on [LlamaCloud](https://cloud.llamaindex.ai/) - **[llm-context](https://github.com/cyberchitta/llm-context.py)** - Provides a repo-packing MCP tool with configurable profiles that specify file inclusion/exclusion patterns and optional prompts. +- **[lucene-mcp-server](https://github.com/VivekKumarNeu/MCP-Lucene-Server)** - spring boot server using Lucene for fast document search and management. - **[mac-messages-mcp](https://github.com/carterlasalle/mac_messages_mcp)** - An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages. - **[MariaDB](https://github.com/abel9851/mcp-server-mariadb)** - MariaDB database integration with configurable access controls in Python. - **[Markdown2doc](https://github.com/Klavis-AI/klavis/tree/main/mcp_servers/pandoc)** - Convert between various file formats using Pandoc @@ -406,7 +407,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[YouTube](https://github.com/Klavis-AI/klavis/tree/main/mcp_servers/youtube)** - Extract Youtube video information (with proxies support). - **[YouTube](https://github.com/ZubeidHendricks/youtube-mcp-server)** - Comprehensive YouTube API integration for video management, Shorts creation, and analytics. - **[mcp_weather](https://github.com/isdaniel/mcp_weather_server)** - Get weather information from https://api.open-meteo.com API. -- **[mcp-lucene-server](https://github.com/VivekKumarNeu/MCP-Lucene-Server)** - spring boot server using Lucene for fast document search and management. + ## 📚 Frameworks From 22df04f0007f51bc512f7660c9f53dafafc35fb6 Mon Sep 17 00:00:00 2001 From: VivekKumarNeu Date: Sat, 19 Apr 2025 22:57:32 -0700 Subject: [PATCH 5/9] add lucene mcp server --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7629a2c2..0b01d771 100644 --- a/README.md +++ b/README.md @@ -408,7 +408,6 @@ A growing set of community-developed and maintained servers demonstrates various - **[YouTube](https://github.com/ZubeidHendricks/youtube-mcp-server)** - Comprehensive YouTube API integration for video management, Shorts creation, and analytics. - **[mcp_weather](https://github.com/isdaniel/mcp_weather_server)** - Get weather information from https://api.open-meteo.com API. - ## 📚 Frameworks These are high-level frameworks that make it easier to build MCP servers or clients. From 15e1b79b0d12fa095c56c9993b4d1193891f1c8c Mon Sep 17 00:00:00 2001 From: Shaofeng Shi Date: Fri, 18 Apr 2025 18:56:15 +0800 Subject: [PATCH 6/9] Add Apache Gravitino --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 275f0667..90c572b2 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[Amadeus](https://github.com/donghyun-chae/mcp-amadeus)** (by donghyun-chae) - An MCP server to access, explore, and interact with Amadeus Flight Offers Search API for retrieving detailed flight options, including airline, times, duration, and pricing data. - **[Anki](https://github.com/scorzeth/anki-mcp-server)** - An MCP server for interacting with your [Anki](https://apps.ankiweb.net) decks and cards. - **[Any Chat Completions](https://github.com/pyroprompts/any-chat-completions-mcp)** - Interact with any OpenAI SDK Compatible Chat Completions API like OpenAI, Perplexity, Groq, xAI and many more. +- **[Apache Gravitino(incubating)](https://github.com/datastrato/mcp-gravitino)** - Allow LLMs to explore metadata of structured data and unstructured data with Gravitino, and perform data governance tasks including tagging/classification. - **[Apple Calendar](https://github.com/Omar-v2/mcp-ical)** - An MCP server that allows you to interact with your MacOS Calendar through natural language, including features such as event creation, modification, schedule listing, finding free time slots etc. - **[Apple Script](https://github.com/peakmojo/applescript-mcp)** - MCP server that lets LLM run AppleScript code to to fully control anything on Mac, no setup needed. - **[Aranet4](https://github.com/diegobit/aranet4-mcp-server)** - MCP Server to manage your Aranet4 CO2 sensor. Fetch data and store in a local SQLite. Ask questions about historical data. From f5f0c65677eb47fca25804be1b0d8998e51ea24e Mon Sep 17 00:00:00 2001 From: Shaofeng Shi Date: Mon, 21 Apr 2025 10:54:17 +0800 Subject: [PATCH 7/9] minor, update the code repo name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90c572b2..2fba06c8 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[Amadeus](https://github.com/donghyun-chae/mcp-amadeus)** (by donghyun-chae) - An MCP server to access, explore, and interact with Amadeus Flight Offers Search API for retrieving detailed flight options, including airline, times, duration, and pricing data. - **[Anki](https://github.com/scorzeth/anki-mcp-server)** - An MCP server for interacting with your [Anki](https://apps.ankiweb.net) decks and cards. - **[Any Chat Completions](https://github.com/pyroprompts/any-chat-completions-mcp)** - Interact with any OpenAI SDK Compatible Chat Completions API like OpenAI, Perplexity, Groq, xAI and many more. -- **[Apache Gravitino(incubating)](https://github.com/datastrato/mcp-gravitino)** - Allow LLMs to explore metadata of structured data and unstructured data with Gravitino, and perform data governance tasks including tagging/classification. +- **[Apache Gravitino(incubating)](https://github.com/datastrato/mcp-server-gravitino)** - Allow LLMs to explore metadata of structured data and unstructured data with Gravitino, and perform data governance tasks including tagging/classification. - **[Apple Calendar](https://github.com/Omar-v2/mcp-ical)** - An MCP server that allows you to interact with your MacOS Calendar through natural language, including features such as event creation, modification, schedule listing, finding free time slots etc. - **[Apple Script](https://github.com/peakmojo/applescript-mcp)** - MCP server that lets LLM run AppleScript code to to fully control anything on Mac, no setup needed. - **[Aranet4](https://github.com/diegobit/aranet4-mcp-server)** - MCP Server to manage your Aranet4 CO2 sensor. Fetch data and store in a local SQLite. Ask questions about historical data. From 51593d9a9a8c5bd5b4c1915d889f3eda961a4c77 Mon Sep 17 00:00:00 2001 From: Jun Date: Tue, 6 May 2025 02:46:41 -0500 Subject: [PATCH 8/9] add optional encoded param to puppeteer_screenshot for base64 output --- src/puppeteer/README.md | 9 +------- src/puppeteer/index.ts | 49 +++++------------------------------------ 2 files changed, 7 insertions(+), 51 deletions(-) diff --git a/src/puppeteer/README.md b/src/puppeteer/README.md index 5b31f4af..03646437 100644 --- a/src/puppeteer/README.md +++ b/src/puppeteer/README.md @@ -22,14 +22,7 @@ A Model Context Protocol server that provides browser automation capabilities us - `selector` (string, optional): CSS selector for element to screenshot - `width` (number, optional, default: 800): Screenshot width - `height` (number, optional, default: 600): Screenshot height - -- **puppeteer_screenshot_encoded** - - Captures a screenshot of the entire page or a specific element and return it as a base64-encoded data URI. - - Inputs: - - `name` (string, required): Name for the screenshot - - `selector` (string, optional): CSS selector for element to screenshot - - `width` (number, optional, default: 800): Screenshot width - - `height` (number, optional, default: 600): Screenshot height + - `encoded` (boolean, optional): If true, capture the screenshot as a base64-encoded data URI (as text) instead of binary image content. Default false. - **puppeteer_click** diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index feabec70..592e0cdc 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -242,6 +242,7 @@ async function handleToolCall(name: string, args: any): Promise case "puppeteer_screenshot": { const width = args.width ?? 800; const height = args.height ?? 600; + const encoded = args.encoded ?? false; await page.setViewport({ width, height }); const screenshot = await (args.selector ? @@ -269,52 +270,14 @@ async function handleToolCall(name: string, args: any): Promise type: "text", text: `Screenshot '${args.name}' taken at ${width}x${height}`, } as TextContent, - { + encoded ? ({ + type: "text", + text: `data:image/png;base64,${screenshot}`, + } as TextContent) : ({ type: "image", data: screenshot, mimeType: "image/png", - } as ImageContent, - ], - isError: false, - }; - } - - case "puppeteer_screenshot_encoded": { - const width = args.width ?? 800; - const height = args.height ?? 600; - await page.setViewport({ width, height }); - - const screenshot = await (args.selector - ? (await page.$(args.selector))?.screenshot({ encoding: "base64" }) - : page.screenshot({ encoding: "base64", fullPage: false })); - - if (!screenshot) { - return { - content: [ - { - type: "text", - text: args.selector ? `Element not found: ${args.selector}` : "Screenshot failed", - }, - ], - isError: true, - }; - } - - screenshots.set(args.name, screenshot as string); - server.notification({ - method: "notifications/resources/list_changed", - }); - - return { - content: [ - { - type: "text", - text: `Screenshot '${args.name}' taken at ${width}x${height}`, - } as TextContent, - { - type: "text", - text: `data:image/png;base64,${screenshot}`, - } as TextContent, + } as ImageContent), ], isError: false, }; From 4bb9ec779e4218250fe2c2b9ef6087abc9ce1750 Mon Sep 17 00:00:00 2001 From: Jun Date: Tue, 6 May 2025 16:18:57 -0500 Subject: [PATCH 9/9] remove redundancy and update puppeteer_screenshot tool description --- src/puppeteer/index.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index 592e0cdc..63007799 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -39,20 +39,7 @@ const TOOLS: Tool[] = [ selector: { type: "string", description: "CSS selector for element to screenshot" }, width: { type: "number", description: "Width in pixels (default: 800)" }, height: { type: "number", description: "Height in pixels (default: 600)" }, - }, - required: ["name"], - }, - }, - { - name: "puppeteer_screenshot_encoded", - description: "Take a screenshot of the current page or a specific element and return it as a base64-encoded data URI", - inputSchema: { - type: "object", - properties: { - name: { type: "string", description: "Name for the screenshot" }, - selector: { type: "string", description: "CSS selector for element to screenshot" }, - width: { type: "number", description: "Width in pixels (default: 800)" }, - height: { type: "number", description: "Height in pixels (default: 600)" }, + encoded: { type: "boolean", description: "If true, capture the screenshot as a base64-encoded data URI (as text) instead of binary image content. Default false." }, }, required: ["name"], },