Ap Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Ap Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<a href="https://www.npmjs.com/package/ap-mcp-server"><img src="https://img.shields.io/npm/v/ap-mcp-server.svg" alt="NPM Version"></a> <a href="https://github.com/rbonestell/ap-mcp-server/actions/workflows/build.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/rbonestell/ap-mcp-server/build.yml?logo=typescript&logoColor=white" alt="Build Status"></a> <a href="https://github.com/rbonestell/ap-mcp-server/actions/workflows/test.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/rbonestell/ap-mcp-server/test.yml?branch=main&logo=jest&logoColor=white&label=tests" alt="Test Results"></a> <a href="https://app.codecov.io/gh/rbonestell/ap-mcp-server/"><img src="https://img.shields.io/codecov/c/github/rbonestell/ap-mcp-server?logo=codecov&logoColor=white" alt="Code Coverage"></a> <img src="https://img.shields.io/badge/tools-26-brightgreen.svg?logo=modelcontextprotocol" alt="26 Available Tools"> <a href="https://www.anthropic.com/claude-code"><img src="https://img.shields.io/badge/made_with-claude_code-da7756.svg?logo=claude&logoColor=white" alt="Made with Claude Code"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
An _unofficial_ Model Context Protocol (MCP) server that transforms the Associated Press Media API into an AI-optimized content intelligence resource. With 26 powerful tools, this MCP server enables conversational AI applications to seamlessly access, analyze, and interact with AP's comprehensive news content through natural language interfaces.
Perfect for: Conversational AI assistants, news analysis applications, content research tools, and automated journalism workflows.
[!NOTE] For more info about the AP Media API, visit the AP developer documentation.
AP_ENFORCE_PLAN)#### Claude Code (CLI)
Add to your Claude Code MCP configuration:
{
"mcpServers": {
"ap-media": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ap-mcp-server@latest"],
"env": {
"AP_API_KEY": "your_api_key_here"
}
}
}
}#### Visual Studio Code et al.
For VS Code, Windsurf, Cursor, Void, and other VS Code-based editors:
Add the following server definition to your workspace MCP settings (.vscode/mcp.json):
{
"servers": {
"ap-media": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ap-mcp-server@latest"],
"env": {
"AP_API_KEY": "your_api_key_here"
}
}
}
}#### Generic MCP Client Configuration
Applies to Claude Desktop, ChatGPT Desktop, OpenAI Codex, etc.
For most MCP-compatible AI tools, use this standard configuration format:
{
"mcpServers": {
"ap-media": {
"command": "npx",
"args": ["-y", "ap-mcp-server@latest"],
"env": {
"AP_API_KEY": "your_api_key_here"
}
}
}
}The AP MCP Server is designed to be used directly by AI tools, chatbots, and LLM applications through the MCP protocol. AI assistants can access AP news content using natural language:
AI tools automatically convert these requests into the appropriate MCP tool calls.
| Variable | Required | Default | Description |
|---|---|---|---|
AP_API_KEY | ✅ | - | Your AP API key |
AP_BASE_URL | 🚫 | https://api.ap.org/media/v | AP API base URL |
AP_TIMEOUT | 🚫 | 30000 | Request timeout (ms) |
AP_RETRIES | 🚫 | 3 | Retry attempts for failed requests |
AP_ENFORCE_PLAN | 🚫 | true | Enforce in_my_plan=true for all content requests (AI safety feature) |
AP_DEBUG | 🚫 | false | Enable debug logging |
AP_LOG_LEVEL | 🚫 | info | Log level (error, warn, info, debug) |
AP_VERBOSE_LOGGING | 🚫 | false | Enable request/response logging |
AP_CACHE_ENABLED | 🚫 | true | Enable intelligent caching system |
AP_CACHE_TTL_TRENDS | 🚫 | 300000 | Trending topics cache TTL (5 minutes) |
AP_CACHE_TTL_SEARCH | 🚫 | 180000 | Search results cache TTL (3 minutes) |
The AP MCP Server now includes intelligent prompt templates that simplify complex operations and optimize API usage. These prompts abstract away parameter complexity and provide natural language interfaces for common workflows.
#### breaking-news-search Search for the latest breaking news with optimized parameters.
topic, hours_ago, location, max_results#### topic-deep-dive Comprehensive research on a specific topic with in-depth coverage.
topic, days_back, min_word_count, include_analysis, max_results#### multimedia-search Find photos, videos, graphics, and audio content.
topic, media_type, days_back, high_quality_only, max_results#### regional-coverage Get comprehensive news coverage for specific regions or locations.
location, include_national, include_local, days_back, max_results#### smart-search Intelligently search with natural language queries and auto-expansion.
query, search_mode, auto_expand#### trend-analysis Analyze trending topics and patterns in news coverage.
category, timeframe, location_filter, include_sentiment, max_topics#### content-recommendations Get AI-powered content recommendations based on topics or past content.
based_on, subjects, content_types, location_preference, max_recommendations#### coverage-comparison Compare news coverage across different time periods.
topic, period1_days_ago, period2_days_ago, period_length_days, metrics#### quick-trending Get a quick snapshot of what's trending right now.
max_topics#### create-news-monitor Set up automated monitoring for specific news topics.
topic, monitor_name, email, alert_frequency, description#### breaking-alert-setup Quick setup for urgent breaking news alerts.
topics, email, sensitivity#### list-monitors View all active content monitors and their status.
include_status, include_history#### manage-monitor Update or delete existing monitors.
monitor_id, action, new_email, new_frequency#### daily-news-briefing Generate a comprehensive daily news briefing.
categories, location, include_breaking, include_trending, include_recommendations#### research-workflow Comprehensive research workflow for investigating topics.
topic, depth, time_range_days, include_multimedia, include_analysis#### content-curation Curate content for specific audiences or purposes.
audience, topics, content_mix, total_items#### story-development Assist in developing stories with background and context.
story_topic, story_type, needs#### search_content
Advanced content search with flexible filtering and sorting options.
Parameters:
query (string): Search querysort (string): Sort criteria (default: _score:desc)page (number): Page number (starts at 1)page_size (number): Items per page (max 100)include/exclude (arrays): Field filteringpricing (boolean): Include pricing informationin_my_plan (boolean): Only return items in your planAI Usage: When an AI tool receives a request like "Find AI healthcare articles", it automatically converts this to appropriate search parameters including query terms, sorting, and field selection.
#### search_content_all
Auto-paginated search for large result sets (up to 2,000 items).
Parameters:
search_content but automatically handles paginationmax_items (number): Maximum items to retrieve (default: 1000, max: 2000)Perfect for: Bulk analysis, trend detection, comprehensive research.
#### get_content_item
Retrieve a specific content item by its ID.
Parameters:
item_id (string, required): The AP item IDinclude/exclude (arrays): Field filteringpricing (boolean): Include pricing information#### get_content_bulk
Retrieve multiple content items efficiently (up to 50 items).
Parameters:
item_ids (array, required): Array of AP item IDs (max 50)include/exclude (arrays): Field filteringpricing (boolean): Include pricing informationPerfect for: Batch content retrieval, related article fetching.
#### get_content_feed
Access the live AP content feed for real-time news.
Parameters:
query (string): Filter querypage_size (number): Number of items to returninclude/exclude (arrays): Field filtering#### get_rss_feeds & get_rss_feed
List and access RSS feeds for your account.
Parameters for `get_rss_feed`:
rss_id (number, required): RSS feed IDpage_size (number): Items per pageinclude/exclude (arrays): Field filtering#### get_ondemand_content
Access your organization's OnDemand queue.
Parameters:
consumer_id (string): Consumer identifierqueue (string): Queue IDpage_size (number): Items per page#### optimize_search_query
Convert natural language queries into optimized AP API searches using NLP.
Parameters:
natural_query (string, required): Natural language querycontext (object): Additional context for optimizationAI Usage: When an AI receives "Find recent articles about AI in healthcare", this tool automatically converts it to an optimized AP API query with proper keywords, date filters, and content type specifications.
#### analyze_content_trends
Analyze trending topics and patterns in news content.
Parameters:
query (string): Base query for trend analysistime_range (string): Time period to analyze ("24h", "7d", "30d")trend_type (string): Type of trend analysis ("topics", "entities", "sentiment")Perfect for: Understanding news patterns, identifying emerging stories.
#### get_content_recommendations
Get AI-powered content recommendations based on a reference item.
Parameters:
reference_item_id (string): Item ID to base recommendations onrecommendation_type (string): "related", "similar", or "trending"max_results (number): Maximum recommendations (default: 10)Perfect for: Content discovery, related article suggestions.
#### get_trending_subjects
Fast discovery of currently trending topics with caching.
Parameters:
time_window (string): Time window for trends ("1h", "6h", "24h")category (string): Optional category filtermin_mentions (number): Minimum mention thresholdPerfect for: Real-time trend monitoring, content planning.
#### get_account_info
Basic account information and available endpoints.
#### get_account_plans
Account plans, entitlements, and usage meters.
#### get_account_downloads
Download history and usage tracking.
Parameters:
min_date (string): Start date (YYYY-MM-DD or ISO-8601)max_date (string): End date (YYYY-MM-DD or ISO-8601)format (string): Response format (json or csv)#### get_account_quotas
Current API quotas and usage limits.
#### get_followed_topics
List of topics you're following.
#### create_monitor
Create content monitors for automated alerts.
Parameters:
name (string, required): Monitor namedescription (string): Descriptionconditions (array): Monitoring conditionsnotify (array): Notification settings#### list_monitors
List all existing monitors.
#### get_monitor
Get detailed information about a specific monitor.
Parameters:
monitor_id (string, required): Monitor ID#### update_monitor
Update an existing monitor's settings.
Parameters:
monitor_id (string, required): Monitor IDupdates (object): Fields to update#### delete_monitor
Delete a monitor.
Parameters:
monitor_id (string, required): Monitor ID#### get_monitor_status
Check the status of a monitor.
Parameters:
monitor_id (string, required): Monitor ID#### get_monitor_history
Get historical data for a monitor.
Parameters:
monitor_id (string, required): Monitor IDstart_date (string): Start date for historyend_date (string): End date for history#### build_search_query
Build structured search queries with validation.
Parameters:
keywords (array): Keywords to searchoperators (array): Search operators (AND, OR, NOT)date_range (object): Date range filterscontent_types (array): Content type filters#### get_content_rendition
Retrieve the full content of articles and media by fetching renditions using href URLs.
Parameters:
href (string, required): The href URL from a content item's renditions or linksformat (string): Optional Accept header for desired formatencoding (string): Optional encoding preference for text contentUse Case: Get full NITF text, images, videos, audio files from previous search results. Perfect for: Accessing complete article content, downloading media files, getting full text for analysis.
This MCP server provides complete coverage of the AP Media API with intelligent enhancements:
/content/search - Content search (Enhanced with auto-pagination and bulk operations)/content/{item_id} - Single item lookup (Enhanced with bulk retrieval)/content/feed - Live content feed/content/rss - RSS feed list/content/rss/{rss_id} - Specific RSS feed/content/ondemand - OnDemand queue/account - Account information/account/plans - Plans and entitlements/account/downloads - Download history/account/quotas - API quotas and usage limits/account/followedtopics - Followed topics management/account/monitors/create - Create content monitor/account/monitors - List all monitors/account/monitors/{id} - Get specific monitor details/account/monitors/{id}/update - Update monitor settings/account/monitors/{id}/delete - Delete monitor/account/monitors/{id}/status - Monitor status and health/account/monitors/{id}/history - Monitor historical dataThe MCP server includes automatic plan enforcement to prevent AI agents from accessing content outside their authorized AP plan. This is enabled by default for safety.
Configuration:
AP_ENFORCE_PLAN=true (default) to enforce plan restrictions on all content requestsAP_ENFORCE_PLAN=false to allow unrestricted content access (use with caution)When enabled, all relevant content requests automatically include in_my_plan=true, ensuring AI agents only access authorized content. This prevents:
AI tools can efficiently process large amounts of news content:
get_trending_subjects to identify what's currently trendingsearch_content_all to get extensive results on trending topics (up to 2,000 items)get_content_bulk to retrieve full content for the most relevant articles (up to 50 items)AI assistants leverage multiple tools for intelligent content discovery:
optimize_search_query converts natural language to precise search parametersanalyze_content_trends provides insights into content patterns and emerging storiesget_content_recommendations suggests related articles based on reference contentAI systems can set up automated content monitoring:
The server implements intelligent caching to optimize performance:
#### Cache Types & TTL
#### Cache Configuration
# Customize cache behavior
AP_CACHE_ENABLED=true
AP_CACHE_TTL_TRENDS=300000 # 5 minutes in milliseconds
AP_CACHE_TTL_SEARCH=180000 # 3 minutes in milliseconds#### Performance Tips
The server implements comprehensive AI-friendly error handling:
suggested_action, can_retry, and alternative_tool properties for self-healing AI behaviorRun the test suite:
npm testsearch_content_all: Maximum 2,000 items (configurable)get_content_bulk: Maximum 50 items per request.env file contains AP_API_KEY=your_key_hereAP_TIMEOUT in your environmentEnable debug logging:
export AP_DEBUG=true
export AP_LOG_LEVEL=debug
npm startMIT License - see LICENSE file for details.
For issues related to:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.