About
Kotlin News — Model Context Protocol server
README
A Ktor-based server written in Kotlin implementing the Model Context Protocol (MCP) with tools for fetching news headlines and searching news articles using the NewsAPI.
Features
- Top Headlines Tool: Fetches top news headlines by category (business, entertainment, general, health, science, sports, technology).
- Search News Tool: Searches news articles by query, with advanced search options and date/sort filters.
Requirements
- JDK 11+
- Gradle
- NewsAPI Key: Register at newsapi.org and set the
NEWS_API_KEYenvironment variable.
Getting Started
1. Clone the repository
git clone https://github.com/nishantpardamwar/kotlin-news-mcp-server.git
cd mcpserver
2. Set up your NewsAPI key
Set the NEWS_API_KEY environment variable:
IntelliJ IDEA:
- Open the project in IntelliJ IDEA.
- Go to Run > Edit Configurations...
- Select your run configuration for this project (or create a new one).
- In the Environment variables field, add:
NEWS_API_KEY=your_api_key_here - Click OK to save.
3. Build and run the server
Hit Run 'Application.kt' (▶) on your AndroidStudio/IntelliJ IDE
The server will start on http://localhost:3001.
Usage
The server exposes two MCP tools:
1. Get Top Headlines
- Tool Name:
get-top-headline - Description: Get top headlines by category.
- Input:
category(string): One ofbusiness,entertainment,general,health,science,sports,technology.
2. Search News
- Tool Name:
search-news-query - Description: Search news by query with advanced options.
- Input:
query(string): Keywords or phrases to search for.fromDate(string, optional): Oldest article date (ISO 8601).toDate(string, optional): Newest article date (ISO 8601).sortBy(string, optional):relevancy,popularity, orpublishedAt.
Integration with Cursor
To use this MCP server with Cursor, you need to configure Cursor to connect to your local MCP server instance. Follow these steps:
- Start the MCP server (see instructions above).
- Go to Cursor → Settings → Tools & Integrations → New MCP Server.
- Add the following configuration:
{
"mcpServers": {
"news-mpc-server": {
"url": "http://localhost:3001/sse"
}
}
}
You should now be able to use the tools provided by this server (such as get-top-headline and search-news-query) directly within Cursor's MCP tool interface.
Project Structure
src/main/kotlin/Application.kt: Main entry point, server setup.src/main/kotlin/NewsTool.kt: Tool implementations for news fetching/search.build.gradle.kts: Build configuration.
Dependencies
- Ktor (server, CIO engine)
- Model Context Protocol Kotlin SDK
- NewsAPI
License
This project is licensed under the MIT License - see the LICENSE file for details.
⭐ Star this repository if you found it helpful!
Installing Kotlin News
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/nishantpardamwar/kotlin-news-mcp-serverFAQ
Is Kotlin News MCP free?
Yes, Kotlin News MCP is free — one-click install via Unyly at no cost.
Does Kotlin News need an API key?
No, Kotlin News runs without API keys or environment variables.
Is Kotlin News hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Kotlin News in Claude Desktop, Claude Code or Cursor?
Open Kotlin News on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Kotlin News with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
