What You’ll Build
An MCP server that enables AI assistants to:- View articles from the homepage
- Read comments on posts
- Navigate different sections (new, best, ask, show)
- Search for posts
- Submit new posts
- View user profiles
Generate the Server
Create the MCP server with a single command:1
URL Analysis
MCPKit analyzes the Hacker News homepage and discovers available actions.
2
Action Discovery
The AI discovers 6 main actions:
3
Server Generation
A complete MCP server is generated:
Your Hacker News MCP server is ready!
Available Tools
The generated server includes these tools:1. view_article
View a specific article from the homepage. Parameters:The title of the article to view
2. view_comments
View the comments for a specific article. Parameters:The title of the article whose comments to view
3. navigate_section
Navigate to different sections of Hacker News. Parameters:The section to navigate to (e.g., “new”, “best”, “ask”, “show”, “jobs”)
4. search_posts
Search Hacker News for posts matching a query. Parameters:The search query
5. submit_post
Submit a new post to Hacker News (requires authentication). Parameters:The title of the post
The URL of the post (optional)
The text content (optional, if no URL)
This tool requires authentication. You’ll need to create an authenticated context first.
6. view_user_profile
View the profile of a specific Hacker News user. Parameters:The username of the profile to view
Setup and Testing
Build the Server
Test with MCP Inspector

Add to Claude Code
Example Prompts
Once your server is connected, try these prompts:Research Mode
Research Mode
Prompt: “Search Hacker News for articles about LLMs from the past week”What happens:
- Uses
search_postswith query “LLMs” - Filters results by date
- Returns summaries of relevant articles
Trend Monitoring
Trend Monitoring
Prompt: “What are the top 3 posts on Hacker News right now and what are people saying about them?”What happens:
- Navigates to homepage
- Extracts top 3 article titles
- Uses
view_commentsfor each - Summarizes discussion themes
User Research
User Research
Prompt: “Show me what patio11 has been posting about lately”What happens:
- Uses
view_user_profilewith username “patio11” - Extracts recent submissions and comments
- Summarizes activity
Content Discovery
Content Discovery
Prompt: “Find Ask HN posts about career advice”What happens:
- Uses
navigate_sectionwith “ask” - Uses
search_postswith “career advice” - Returns relevant discussions
How It Works
Under the Hood
The generated tools use Stagehand’s AI-powered browser automation:Context Management
The server automatically manages Browserbase contexts:- Check for saved context - Looks for
~/.mcpkit/contexts/news.ycombinator.com.txt - Create new if needed - Creates a fresh Browserbase context
- Initialize Stagehand - Connects to the browser session
- Execute action - Runs the requested tool
- Return results - Sends structured data back to the AI
Customization Ideas
Add More Tools
Extend the generated server with custom tools:Improve Extraction
Enhance data extraction with better schemas:Add Caching
Cache frequently accessed data:Common Use Cases
- Research Assistant
- Trend Tracking
- Content Curation
Use the Hacker News MCP to research technical topics:The AI will:
- Search for relevant posts
- Read comment threads
- Extract key points from discussions
- Provide a balanced summary
Troubleshooting
Tool execution times out
Tool execution times out
Hacker News is usually fast, but if tools timeout:
- Check internet connection
- Verify Browserbase quota - Make sure you haven’t hit limits
- Try again - HN can occasionally be slow
Article not found
Article not found
If
view_article can’t find an article:- Check exact title - Use the exact title from HN
- Article may have fallen off front page - Try navigating to “new” first
- Use search instead - Try
search_postsfor more flexibility
Submit post fails
Submit post fails
To submit posts, you need authentication: