MCP Noticias EU Tool
Conecta a un servidor MCP externo para obtener noticias de El Universal y las procesa con Gemini.
Overview
This node connects to an external MCP (Model Context Protocol) server to fetch news articles from "El Universal" based on a user-provided search query. It then optionally processes the fetched news results using Google's Gemini generative AI model to produce a concise, user-friendly summary.
Common scenarios for this node include:
- Automatically retrieving the latest news about a specific topic or location from "El Universal".
- Summarizing large sets of news articles into digestible summaries for quick consumption.
- Integrating news fetching and summarization into automated workflows, such as alerting systems or content aggregation pipelines.
For example, a user could input the query string "últimas noticias de El Universal Cartagena" to get recent news about Cartagena, and receive either the raw news data or a summarized version generated by Gemini.
Properties
| Name | Meaning |
|---|---|
| Connection Type | Hidden property; fixed value "cmd" indicating the connection method used internally. |
| Cadena De Búsqueda De Noticias | The search query string sent to the MCP server to find relevant news articles. Example: "noticias de hoy, clima Cartagena". This is a required input. |
| Procesar Con Gemini | Boolean flag to determine whether the raw news results should be summarized by Gemini AI. Options: true (summarize), false (return raw results). Default is true. |
Output
The node outputs an array of JSON objects, each corresponding to one input item processed. Each output object contains:
queryString: The original search query string used.toolName: The name of the MCP tool called, always"fetch_news".toolArgs: The arguments passed to the MCP tool, including thequeryString.mcpRawResult: The raw response object returned by the MCP server containing the news data.geminiSummary: If enabled, the text summary generated by Gemini AI based on the raw news results. Otherwise, this may be undefined.finalOutput: The final textual output returned by the node. This is either the Gemini summary if summarization was requested, or the raw news text extracted from the MCP result.
The node does not output any binary data.
Dependencies
- Requires an API key credential for Google's Gemini generative AI service.
- Requires credentials containing the command and environment configuration to connect to the external MCP news server.
- Uses the MCP client SDK and Google Generative AI SDK internally.
- The MCP server is invoked via a spawned child process running a local script (
mcp_server.js) with configured environment variables.
Troubleshooting
- Missing Gemini API Key: The node will throw an error if the Gemini API key credential is not set up. Ensure the API key is correctly configured in n8n credentials.
- MCP Server Connection Failure: Errors connecting to the MCP server usually indicate incorrect command or environment settings in the MCP credentials. Verify the command path and environment variables are correct.
- Invalid MCP Tool Response: If the MCP tool does not return valid content (empty or malformed), the node throws an error. Check that the MCP server is functioning properly and returning expected data.
- Gemini Summarization Errors: Failures during summarization with Gemini will log errors but still return the raw MCP results. Common causes include network issues or invalid API keys.
- Environment Variable Parsing: If the environment variables JSON in credentials is malformed, a warning is logged and default environment variables are used.