Skip to main content
Glama
ajcastrob

MCP Venezuela FakeNews

by ajcastrob

MCP Venezuela FakeNews

Servidor MCP (Model Context Protocol) para combatir desinformación sobre Venezuela. Integra patrones reales de fake news identificados en investigación (junio 2026) con búsqueda web actualizada vía Tavily.

Key Features

  • 4 herramientas MCP para verificar claims, buscar fuentes oficiales, listar patrones y generar reportes

  • Conocimiento base embebido de 6 patrones reales de desinformación venezolana (videos descontextualizados, contenido IA, usurpación de canales, falsos anuncios, operaciones YouTube, desinformación salarial)

  • Búsqueda Tavily opcional — sin API key funciona solo con el conocimiento base

  • Ligero — sin dependencias pesadas, compila a un solo archivo JS

Related MCP server: MCP Server for Google Search

Tech Stack

  • Runtime: Node.js 18+

  • Lenguaje: TypeScript 6.0 (compilado a ES2022)

  • Framework MCP: @modelcontextprotocol/sdk ^1.29

  • Validación: Zod ^4.4

  • Búsqueda web: Tavily Search API (opcional)

  • Entorno: dotenv para configuración local

Prerequisites

  • Node.js 18 o superior (20+ recomendado)

  • npm

  • (Opcional) Una API key de Tavily — la misma que usas en opencode

Getting Started

1. Clonar e instalar

git clone <repo-url> ~/mcp-venezuela-fakenews
cd ~/mcp-venezuela-fakenews
npm install

2. Configurar variable de entorno (opcional)

Copia .env.example a .env y agrega tu API key de Tavily:

cp .env.example .env
# Edita .env con tu clave real:
# TAVILY_API_KEY=tvly-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Sin API key las herramientas funcionan igual, pero las búsquedas web devuelven un aviso para que la configures.

3. Compilar

npm run build

Esto produce dist/index.js, dist/index.js.map y dist/index.d.ts.

4. Probar con el inspector MCP

npm run inspect

Esto abre una UI web local donde puedes probar cada herramienta interactivamente.

Architecture Overview

Directory Structure

mcp-venezuela-fakenews/
├── src/
│   └── index.ts          # Código fuente único (server + tools + lógica)
├── dist/                 # Compilado (generado por tsc)
│   ├── index.js
│   ├── index.js.map
│   └── index.d.ts
├── .env                  # Variables de entorno local (git-ignorado)
├── .env.example          # Plantilla para .env
├── package.json
├── tsconfig.json
└── README.md

Request Lifecycle

  1. El host MCP (opencode, Claude Desktop, etc.) inicia dist/index.js como subproceso via STDIO transport

  2. El servidor se conecta al transporte y registra sus 4 herramientas

  3. Cada llamada a tool es un mensaje JSON-RPC sobre STDIO

  4. La herramienta ejecuta su lógica: consulta patrones embebidos y/o llama a Tavily API

  5. Devuelve un content block con tipo text

Conocimiento embebido (sin base de datos)

El servidor no necesita base de datos externa. Los patrones de desinformación y datos clave están hardcodeados en src/index.ts:

  • PATTERNS: array de 6 objetos con nombre, descripción, ejemplos y método de detección

  • KEY_FACTS: objeto con 5 categorías (política, economía, terremotos, migración, desinformación)

Esto permite que el MCP funcione offline sin dependencias externas.

Tavily Search (opcional)

La función tavilySearch() en src/index.ts:62:

  • Lee TAVILY_API_KEY del entorno

  • Hace POST a https://api.tavily.com/search con query mejorada (agrega "Venezuela" y filtros de fuentes confiables)

  • Retorna resultados estructurados o un error manejable

  • Todas las tools manejan graceful degradation si no hay API key

Herramientas expuestas

Tool

Input

Output

get_fakenews_patterns

Ninguno

Lista completa de 6 patrones con ejemplos y detección

verify_claim

claim (string), context? (string)

Análisis del claim + patrones coincidentes + búsqueda web

search_official_sources

topic (string), max_results? (number, default 6)

Resultados de fuentes confiables (USGS, IOM, Reuters, etc.)

generate_factcheck_report

topic (string)

Reporte estructurado borrador con datos clave del cuaderno

Environment Variables

Variable

Requerida

Default

Descripción

TAVILY_API_KEY

No

API key de Tavily para búsquedas web. Sin ella las tools funcionan con conocimiento base solamente.

Available Scripts

Comando

Descripción

npm run build

Compila TypeScript a JS con tsc

npm run start

Ejecuta dist/index.js directamente

npm run dev

Watch mode: compila automáticamente en cada cambio (tsc -w)

npm run inspect

Abre el inspector MCP para probar herramientas

Configuración en OpenCode

Agrega esto a tu ~/.config/opencode/opencode.json o al opencode.json del proyecto:

{
  "mcpServers": {
    "venezuela-fakenews": {
      "command": "node",
      "args": ["/Users/josecastro/mcp-venezuela-fakenews/dist/index.js"]
    }
  }
}

Reinicia opencode o recarga la configuración.

Uso

Listar patrones de desinformación

Usa la herramienta get_fakenews_patterns

Verificar un claim

Usa verify_claim con:
  claim: "Delcy Rodríguez anunció aumento de salario a $800 mensuales"
  context: "salario"

Buscar fuentes oficiales

Usa search_official_sources con:
  topic: "terremotos junio 2026 víctimas oficiales"

Generar reporte

Usa generate_factcheck_report con:
  topic: "Situación económica de Venezuela post-terremotos"

Testing

El proyecto actualmente no tiene suite de tests. Para verificar manualmente:

# Compila sin errores
npm run build

# Prueba con el inspector
npm run inspect

Deployment

Como servidor MCP local (recomendado)

No necesita deployment — se ejecuta como subproceso del host MCP. Solo compilar y apuntar la configuración MCP al dist/index.js.

Como servicio remoto (experimental)

Si quisieras ejecutarlo como servidor remoto:

  1. Cambiar StdioServerTransport por SSEServerTransport del SDK

  2. Desplegar en cualquier plataforma Node (Railway, Fly.io, Render)

  3. Configurar el host MCP con la URL del SSE endpoint

Troubleshooting

TAVILY_API_KEY no configurada

Las tools funcionan sin API key, pero las búsquedas web no estarán disponibles. Configúrala en .env o exporta la variable:

export TAVILY_API_KEY="tvly-tu-clave-aqui"

Error de compilación

# Asegúrate de tener TypeScript 6+
npx tsc --version

# Reinstala dependencias
rm -rf node_modules && npm install

El MCP no se conecta

  • Verifica que dist/index.js existe (npm run build)

  • Verifica la ruta absoluta en la configuración MCP

  • Ejecuta directamente para ver errores: node dist/index.js

  • El servidor escribe logs a STDERR (visible en los logs del host MCP)

Contributing

Este proyecto nace de una investigación sobre desinformación en Venezuela (junio 2026). Las contribuciones son bienvenidas:

  • Agregar más patrones a PATTERNS en src/index.ts

  • Mejorar la detección automática de claims en verify_claim

  • Conectar con el cuaderno de Obsidian para lectura dinámica

  • Agregar tests

License

MIT

Available Tools

4 tools
generate_factcheck_reportB

Genera un reporte estructurado de verificación para un tema o claim sobre Venezuela.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYesTema o claim principal

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations provided, and the description does not disclose any behavioral traits beyond the basic action of generating a report. It does not mention whether this is a read-only operation, any required permissions or sources, or what the report contains, leaving the agent without crucial behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that is front-loaded with the main verb and object. Every word contributes to the meaning, with no wasted verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema and annotations, the description does not fully specify what the 'structured verification report' includes, nor does it explain usage context relative to sibling tools. The description is too minimal to be considered complete for an agent to invoke it correctly without further clarification.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single parameter 'topic', which already has a description ('Tema o claim principal'). The description adds minimal additional meaning, merely aligning with the schema field. Per the rubric, a baseline of 3 is appropriate when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates a structured verification report for a topic or claim about Venezuela, using a specific verb ('genera') and resource ('reporte estructurado de verificación'). This distinguishes it from siblings like verify_claim, which likely verifies a claim directly, and search_official_sources, which searches sources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as verify_claim or search_official_sources. The description only states what it does, not the context or prerequisites for use, leaving the agent to infer the appropriate scenario.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_fakenews_patternsA

Devuelve los patrones principales de desinformación en Venezuela identificados en la investigación (basado en el cuaderno Obsidian).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description must carry the behavioral disclosure. It states the tool returns patterns and mentions the Obsidian notebook as the basis, but it does not disclose any side effects, safety profile, or limitations beyond this. It is a simple retrieval statement but lacks richer behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that starts with the action verb and delivers the core message without extraneous words. It is concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema, no annotations), the description is adequate. It specifies the content ('patrones principales de desinformación') and the source ('cuaderno Obsidian'), which gives enough context for an agent to know what to expect. However, it does not describe the return format or any limitations, so it earns a 4 rather than a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline score is 4. The description correctly provides no parameter details as there are none to describe.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the main disinformation patterns in Venezuela, using the verb 'devuelve' and specifying the resource (patterns) and scope (Venezuela). It distinguishes itself from sibling tools like verify_claim or search_official_sources by focusing on patterns rather than verification or source searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives like search_official_sources or generate_factcheck_report. The usage is only implied from the purpose—when one needs disinformation patterns—but no exclusions or alternative references are included.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_official_sourcesB

Busca información en fuentes oficiales y confiables sobre un tema de Venezuela.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYesTema a buscar (ej: terremotos junio 2026, situación económica, migración)
max_resultsNo

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the search action and source scope; it does not reveal the return format, any restrictions, read-only status, or potential side effects. This is a minimal disclosure that adds little beyond the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that is front-loaded and free of unnecessary details. Every word contributes to the purpose, making it concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, so the description should explain what the search returns, but it does not. It also lacks usage guidance and any caveats. Given the simplicity of the tool, more context (e.g., result type, how to interpret results) is needed for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: the 'topic' parameter has a description, but 'max_results' does not. The tool description does not explain either parameter's usage, format, or semantics. It merely repeats the concept of 'tema', leaving 'max_results' unexplained and offering no additional meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('busca') with a clear resource ('fuentes oficiales y confiables') and scope ('tema de Venezuela'), clearly distinguishing it from sibling tools like verify_claim or get_fakenews_patterns. It tells the agent exactly what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention that it is appropriate for fact-checking or that it should be used before verify_claim/or instead of generating reports. No exclusions or conditional context are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

verify_claimA

Verifica una afirmación sobre Venezuela usando búsqueda Tavily + patrones conocidos del cuaderno.

ParametersJSON Schema
NameRequiredDescriptionDefault
claimYesLa afirmación o claim a verificar (ej: 'Delcy Rodríguez anunció aumento de salario a $800')
contextNoContexto adicional (terremoto, política, economía...)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the method (Tavily search + notebook patterns) but does not state what the tool returns (e.g., boolean verdict, evidence summary), whether it makes external API calls, or any side effects/limitations. Some behavioral insight is provided, but not enough for full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that clearly states the action and method. Every word is purposeful, with no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema or annotations, so the description must explain return values and usage context. It fails to mention what the tool outputs or how to interpret results, which is critical for a verification tool. This leaves a significant gap in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the description need not add much. The description's mention of 'afirmación' aligns with the claim parameter but adds no extra semantics beyond the schema's example and context explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action (verify) on a specific resource (a claim about Venezuela) using a defined method (Tavily search + known notebook patterns). This distinguishes it from sibling tools that fetch patterns, search official sources, or generate reports.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for verifying claims about Venezuela, but it does not explicitly state when to prefer this tool over siblings or provide exclusions. It lacks guidance such as 'use search_official_sources for official source verification' or 'use get_fakenews_patterns to fetch patterns first.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedgenerate_factcheck_report
    • First observedget_fakenews_patterns
    • First observedsearch_official_sources
    • First observedverify_claim

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct role: retrieving patterns, verifying a claim, searching sources, and generating a report. There is minimal overlap; verify_claim and search_official_sources serve different purposes despite both involving search.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (get_fakenews_patterns, verify_claim, search_official_sources, generate_factcheck_report). The style is uniformly snake_case with clear verbs, making the API predictable.

Tool Count5/5

With 4 tools, the set is well-scoped for a fact-checking server. It covers the essential operations without being bloated, fitting within the ideal 3-15 tool range.

Completeness4/5

The tool set covers the core workflow: retrieve patterns, verify a claim, search official sources, and generate a report. Minor gaps exist, such as no dedicated tool for listing all claims or updating patterns, but these are not critical for the stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers