Hackernews -Typescript
HackerNews MCP Server - A comprehensive Model Context Protocol (MCP) server that provides seamless integration with the HackerNews API
claude mcp add --transport stdio traves-theberge-hackernews-mcp-typescript node dist/server.js \ --env LOG_LEVEL="info" \ --env SERVER_NAME="hackernews-mcp-server" \ --env CACHE_MAX_SIZE="1000" \ --env SERVER_VERSION="1.0.0" \ --env CACHE_TTL_SECONDS="300" \ --env HACKERNEWS_API_TIMEOUT="10000" \ --env HACKERNEWS_API_BASE_URL="https://hacker-news.firebaseio.com/v0"
How to use
This MCP server exposes a set of tools to interact with Hacker News data through the Model Context Protocol. It provides five interactive commands: search_posts to filter and locate stories by keywords, author, score, and date range; get_post to retrieve full post details including metadata, comments, and engagement metrics; search_user to analyze user profiles and activity patterns; search_trending to identify current trending topics from top stories; and search_comments to analyze discussion engagement and identify top commenters. You can use these tools to perform research, build content analysis dashboards, or power assistants that need up-to-date Hacker News insights. To begin, ensure the server is running (npm start) and connect your MCP client (e.g., Cursor) to the configured MCP endpoint. The client will present these tools for you to invoke with natural language commands or structured queries, eliciting responses that include story data, user stats, or discussion analytics.
How to install
Prerequisites:
- Node.js 18+
- npm or yarn
Installation steps:
- Clone the repository and install dependencies:
git clone <repository-url>
cd hackernews-mcp-server
npm install
- Build the project:
npm run build
- Configure the MCP client (Cursor):
- The .cursor/mcp.json file is already configured
- Restart Cursor to load the MCP server
- Start the MCP server:
npm start
- Connect with your MCP client and begin issuing the supported MCP tool commands.
Additional notes
Tips and considerations:
- Environment variables are optional but can customize behavior. See the Configuration section in the README for details.
- The server performs caching to reduce API calls (default TTL 300 seconds, max size 1000 items).
- If you modify code, re-run npm run build before npm start to ensure the latest changes are deployed.
- Common issues: network timeouts talking to the Hacker News API; adjust HACKERNEWS_API_TIMEOUT if you're behind constrained networks. Ensure Node.js 18+ is used for compatibility with TypeScript build outputs.
- The MCP tool names and capabilities are listed under MCP Tools & Capabilities in the README; use these exact tool names when issuing requests.
Related MCP Servers
context7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.
promptboard
The Shared Whiteboard for Your AI Agents via MCP. Paste screenshots, mark them up, and share with AI.