@@ -31,28 +31,30 @@ await page.waitForSelector('.dynamic-content');
31
31
const content = await page .textContent (' .dynamic-content' );
32
32
```
33
33
34
- ### 🔍 ** Fetch MCP** - For Lightweight Data Retrieval
34
+ ### 🔍 ** Fetch MCP** - For Enhanced Data Retrieval & Content Processing
35
35
36
36
** Use Fetch when you need:**
37
- - ** API Calls** : REST API consumption, data retrieval
38
- - ** Simple Web Scraping** : Static HTML content extraction
39
- - ** Information Gathering** : Research tasks, data collection
37
+ - ** Multi-format Content** : HTML, JSON, plain text, or Markdown output
38
+ - ** API Calls** : REST API consumption with custom headers
39
+ - ** Web Scraping** : Clean text extraction from websites
40
+ - ** Content Transformation** : HTML to Markdown conversion
41
+ - ** Research Tasks** : Information gathering with formatted output
40
42
- ** Fast Requests** : Lightweight operations without browser overhead
41
- - ** Bulk Data Processing** : Multiple rapid requests
42
- - ** RSS/XML Parsing** : Feed processing, data syndication
43
- - ** Health Checks** : Server monitoring, uptime checks
43
+ - ** Bulk Data Processing** : Multiple rapid requests with different formats
44
+ - ** Documentation Parsing** : Extract clean content from docs sites
44
45
45
- ** Example Use Cases :**
46
+ ** Enhanced Capabilities (zcaceres/fetch-mcp) :**
46
47
``` bash
47
- # Research tasks
48
- " Fetch the latest Laravel documentation for validation rules"
49
- " Get the current weather data from OpenWeatherMap API"
50
- " Retrieve the latest GitHub releases for Laravel framework"
51
-
52
- # API integration
53
- " Fetch user data from the CRM API"
54
- " Get product information from the inventory system"
55
- " Retrieve exchange rates from the financial API"
48
+ # Multiple output formats available
49
+ " Fetch Laravel docs as Markdown for easier reading"
50
+ " Get API response as clean JSON structure"
51
+ " Extract plain text from news article (no HTML)"
52
+ " Fetch website content as raw HTML for parsing"
53
+
54
+ # Custom headers for authenticated requests
55
+ " Fetch protected API endpoint with Bearer token"
56
+ " Get content from site requiring specific User-Agent"
57
+ " Access authenticated documentation with API key"
56
58
```
57
59
58
60
## Complementary Use Cases
@@ -95,11 +97,12 @@ const content = await page.textContent('.dynamic-content');
95
97
96
98
## Performance Considerations
97
99
98
- ### ** Fetch MCP Performance**
100
+ ### ** Enhanced Fetch MCP Performance**
99
101
- ⚡ ** Fast** : Minimal overhead, direct HTTP requests
100
- - 💾 ** Lightweight** : Low memory usage
101
- - 🔄 ** Scalable** : Handle multiple concurrent requests
102
- - 📊 ** Efficient** : Perfect for bulk data operations
102
+ - 💾 ** Lightweight** : Low memory usage compared to browser automation
103
+ - 🔄 ** Versatile** : Multiple output formats (HTML, JSON, text, Markdown)
104
+ - 📊 ** Efficient** : Perfect for bulk data operations with content transformation
105
+ - 🔧 ** Flexible** : Custom headers support for authenticated requests
103
106
104
107
### ** Playwright MCP Performance**
105
108
- 🐌 ** Slower** : Full browser execution overhead
@@ -149,11 +152,19 @@ playwright('test product display on frontend');
149
152
150
153
## Agent Task Examples
151
154
152
- ### ** Research Tasks** (Fetch MCP)
155
+ ### ** Research Tasks** (Enhanced Fetch MCP)
153
156
```
154
- Agent: "Research the latest Laravel 12 security features"
155
- → Fetch: Laravel docs, security guides, release notes
156
- → Result: Comprehensive security feature summary
157
+ Agent: "Get Laravel 12 security best practices as clean Markdown"
158
+ → Enhanced Fetch: HTML to Markdown conversion, clean formatting
159
+ → Result: Well-formatted security documentation
160
+
161
+ Agent: "Extract plain text from this news article (remove ads/navigation)"
162
+ → Enhanced Fetch: Text extraction with HTML cleanup
163
+ → Result: Clean article content only
164
+
165
+ Agent: "Fetch API documentation and return as JSON structure"
166
+ → Enhanced Fetch: JSON parsing with structured output
167
+ → Result: Properly formatted API reference data
157
168
```
158
169
159
170
### ** Testing Tasks** (Playwright MCP)
@@ -174,12 +185,14 @@ Agent: "Integrate and test a new payment provider"
174
185
175
186
## Best Practices
176
187
177
- ### ** Choose Fetch MCP When:**
178
- - The content is static HTML
179
- - You need simple data extraction
180
- - Performance is critical
181
- - You're making API calls
182
- - The site doesn't require JavaScript
188
+ ### ** Choose Enhanced Fetch MCP When:**
189
+ - You need content in specific formats (Markdown, plain text, JSON)
190
+ - The content is static HTML or API responses
191
+ - You want clean text extraction without ads/navigation
192
+ - Performance is critical for bulk operations
193
+ - You're making API calls with custom authentication headers
194
+ - You need content transformation (HTML to Markdown)
195
+ - The site doesn't require JavaScript interaction
183
196
184
197
### ** Choose Playwright MCP When:**
185
198
- Content is JavaScript-generated
0 commit comments