News Sentiment API — Claude Code MCP server: news tone over time
Lets your agent pull sentiment history and growth for any keyword. Useful when you want to see how coverage tone shifted around a company or topic.
claude mcp add --transport http news-sentiment-api https://news-sentiment.api.trendsapi.ai/mcpWhat News Sentiment API does
The server sits in front of the Trends API and hands your agent two things: a sentiment time series and growth across a chosen window. No outlet scraping on your side — you get dated points on a 0-100 scale.
A TRENDSAPI_KEY is required, and a free one comes from trendsapi.ai. The Python client ships a sync TrendsAPI plus an async AsyncTrendsAPI, with get_time_series, get_growth and get_top_trends. Pass source in lowercase (news sentiment) and type exactly as the API spells it (Google Trends). Get the casing wrong or mix the two and the call comes back 400.
A negative growth value means tone dropped against the previous window. It does not mean the company itself is in bad shape. There are no per-article labels and no outlet breakdown, so don't expect the server to tell you which publication drove a move.
What it helps with
- chart how news tone around a company moved over a year
- compare growth across several windows in one call
- load a sentiment series into pandas and average it by month
- query sentiment history from the agent instead of scraping outlets
Example prompts for the agent
- Show me the news sentiment trend for nvidia over the last 12 months
- Pull growth for nvidia across the 3M and 12M windows
- Fetch the sentiment time series and average the values by month
How to install News Sentiment API
Platform CLI: remote server
claude mcp add --transport http news-sentiment-api https://news-sentiment.api.trendsapi.ai/mcpPlatform CLI: remote server
codex mcp add news-sentiment-api --url https://news-sentiment.api.trendsapi.ai/mcpConfig file
{
"mcpServers": {
"news-sentiment-api": {
"url": "https://news-sentiment.api.trendsapi.ai/mcp"
}
}
}Config file
{
"servers": {
"news-sentiment-api": {
"type": "http",
"url": "https://news-sentiment.api.trendsapi.ai/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http news-sentiment-api https://news-sentiment.api.trendsapi.ai/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about News Sentiment API
How do I install News Sentiment API in Claude Code?
Run claude mcp add --transport http news-sentiment-api https://news-sentiment.api.trendsapi.ai/mcp.
What does News Sentiment API do?
It returns news sentiment history and growth for a keyword over a chosen window, served through the Trends API. You don't scrape outlets yourself.
What do I need before using it?
A TRENDSAPI_KEY, free from trendsapi.ai. The Python client needs Python 3.9 or newer.