MCP News Server

MCP News Server

Enables AI coding assistants to publish news articles to a website database, REST API, or local JSON file.

Category
Visit Server

README

MCP News Server

A Model Context Protocol (MCP) server written in Node.js / TypeScript that registers a publish_article tool. It enables AI coding assistants (like Antigravity or Claude Desktop) to publish search results, news, or articles directly onto your website database or REST API endpoint.


Features

  • Flexible Routing: Can publish directly to a MySQL database, send a POST request to a REST API, or save to a local JSON file (fallback for testing).
  • Automatic Slugs: Generates SEO-friendly URLs/slugs automatically from the article title.
  • Zod Schemas: Standard, type-safe request payload validation.
  • Model Context Protocol Compliant: Communicates over stdio transport.

Installation & Setup

1. Clone & Build

Ensure you have Node.js (v18+) and npm installed:

# Clone the repository
git clone https://github.com/thilakace/mcp-news-server.git
cd mcp-news-server

# Install dependencies
npm install

# Compile TypeScript
npm run build

2. Configure Environment Variables

Copy the .env.example file to .env:

cp .env.example .env

Open .env and fill in your details:

  • To insert into a database, complete the DB_* parameters.
  • To push via REST API, specify the API_ENDPOINT and API_BEARER_TOKEN.
  • If both are left empty, it runs in Testing Mode and saves articles to local_articles.json.

Registering in your AI Client / IDE

To let your AI assistant use this tool, add the server configuration to your MCP settings.

In Gemini Antigravity (or Cline/Roo-Code/Windsurf)

Add the server configuration to your global or project mcp_config.json:

{
  "mcpServers": {
    "mcp-news-server": {
      "command": "node",
      "args": ["C:/Users/ThilagarajaS/.gemini/antigravity/scratch/mcp-news-server/build/index.js"],
      "env": {
        "DB_HOST": "localhost",
        "DB_USER": "db_user",
        "DB_PASSWORD": "YourStrongPassword123!",
        "DB_NAME": "laravel_db"
      }
    }
  }
}

(Make sure to update the absolute path to point to your build/index.js file).


Tool API Reference

publish_article

Publishes a news article directly to your platform.

Parameters:

  • title (string, required): The headline/title of the news article.
  • summary (string, required): A brief 1-2 sentence summary of the news.
  • content (string, required): The complete body copy/text of the article.
  • category (string, required): The news section/category (e.g. Local Festivals, Infrastructure, Sports).
  • tags (array of strings, required): Related tags or keywords for SEO classification.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured