MCP server for Keyword Insights API
Project description
Keyword Insights MCP Server
An MCP (Model Context Protocol) server that provides tools for interacting with the Keyword Insights API.
Features
- 23 tools covering all Keyword Insights API endpoints
- Automatic authentication with token caching
- Async HTTP client for optimal performance
- Full support for keyword clustering, ranking, content briefs, and writer agent
- Pagination support for large result sets
- Explicit parameter schemas for better AI model understanding
- Compact responses - ~70% smaller output (no whitespace, nulls/empties stripped)
Installation
cd keyword-insights-mcp
pip install -e .
Configuration
Set your Keyword Insights credentials as environment variables:
export KEYWORD_INSIGHTS_EMAIL="your-email@example.com"
export KEYWORD_INSIGHTS_PASSWORD="your-password"
On Windows (PowerShell):
$env:KEYWORD_INSIGHTS_EMAIL = "your-email@example.com"
$env:KEYWORD_INSIGHTS_PASSWORD = "your-password"
Usage
With Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"keyword-insights": {
"command": "python",
"args": ["-m", "keyword_insights_mcp.server"],
"env": {
"KEYWORD_INSIGHTS_EMAIL": "your-email@example.com",
"KEYWORD_INSIGHTS_PASSWORD": "your-password"
}
}
}
}
With Claude Code
Add to your project's .mcp.json or Claude Code settings:
{
"mcpServers": {
"keyword-insights": {
"command": "python",
"args": ["-m", "keyword_insights_mcp.server"],
"env": {
"KEYWORD_INSIGHTS_EMAIL": "your-email@example.com",
"KEYWORD_INSIGHTS_PASSWORD": "your-password"
}
}
}
}
Testing with MCP Inspector
mcp dev src/keyword_insights_mcp/server.py
Available Tools
User
get_user- Get account data, credit balance, and subscription info
Keyword Ranking
create_advanced_ranking_order- Analyze SERP for a single keyword- Required:
keyword,location,language - Optional:
device,domain,include_word_count
- Required:
get_advanced_ranking_order- Get ranking order resultscreate_advanced_ranking_batch_order- Analyze SERP for multiple keywordsget_advanced_ranking_batch_order- Get batch ranking results
Content Brief
get_content_brief_languages- List supported languagescreate_content_brief- Create a content brief from SERP analysis- Required:
keyword,language,location
- Required:
get_content_brief- Get brief results bybrief_idlist_content_briefs- List all briefs
Keyword Content
create_keyword_content_order- Extract content insights (PAA, Reddit/Quora questions, meta titles/descriptions)- Required:
keyword,language,location,content_insights - Optional:
device - Credit costs: paa/reddit/quora = 50 credits, meta_titles/descriptions = 200 credits each
- Required:
get_keyword_content_order- Get content order results
Keyword Insights (Clustering)
get_insights_languages- List supported languagesget_insights_locations- List locations (returns first 20 by default)search_insights_locations- Search locations by name (recommended)create_insights_order- Create keyword clustering order- Required:
project_name,keywords,search_volumes,language,location,insights - Optional:
clustering_method,grouping_accuracy,hub_creation_method,device,url,folder_id - Insights options:
cluster,context,rank,title_ai
- Required:
get_insights_order- Get clustering order status/resultsget_insights_order_cost- Estimate order cost before creating- Required:
n_keywords,insights
- Required:
get_insights_order_json- Get clustered data with pagination- Required:
order_id - Optional:
page_size(default 50),page_number,sort_by,ascending
- Required:
export_insights_order_xlsx- Export to Excel filelist_insights_orders- List orders by count or date range
Writer Agent
get_writer_agent_options- Get available content types, tones, and POV optionscreate_writer_agent_order- Generate AI article outline, plan, and content- Required:
keyword - Optional:
language_code,location_name,content_type,point_of_view,folder_id,additional_insights
- Required:
get_writer_agent_order- Get generated content results
Example Usage
Once configured, you can ask Claude to:
- "Get my Keyword Insights account balance"
- "Search for locations matching 'Mexico'"
- "Estimate the cost of clustering 500 keywords with cluster and context insights"
- "Create a keyword insights order for these keywords with their search volumes"
- "Get page 2 of the clustered results for order abc123"
- "Create a content brief for 'best running shoes' in English for the United States"
- "Generate an article about 'sustainable gardening tips'"
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keyword_insights_mcp-0.1.0.tar.gz.
File metadata
- Download URL: keyword_insights_mcp-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7faddc2014bf73fb5629253a0e8920f87a1a66436b510e67790e4f8447dc3e1d
|
|
| MD5 |
6e580879f30a18440f2799dfb77feae0
|
|
| BLAKE2b-256 |
c7bf55a7da93cdc59902b8b8c332a515fdb3a2121853050cf32cd51bf026c270
|
File details
Details for the file keyword_insights_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: keyword_insights_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f404b2e0c03cd5e11ec17b2a3b294b83a88c1ec760c75251be10dcd10a9f8ff6
|
|
| MD5 |
64065518ae82d98761c4ecfa39031f8b
|
|
| BLAKE2b-256 |
b66bfd559379635eba142728c1e6f99c548dc22f64438ba6ef8cef7ba370ca9b
|