Server Peecai
Community MCP server for the Peec AI API - AI Search Analytics
Ask AI about Server Peecai
Powered by Claude ยท Grounded in docs
I know everything about Server Peecai. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Peec AI MCP Server
Community-built MCP server for the Peec AI API โ AI Search Analytics for brand visibility, sentiment, and citations across ChatGPT, Perplexity, and other AI models.
Note: This is an unofficial community project, not affiliated with or endorsed by Peec AI. It requires a Peec AI account and API key.
API Beta: The Peec AI API is currently in beta โ endpoints, payloads, and responses may change. Access is limited to Enterprise customers.
What it does
Peec AI tracks how brands appear in AI-generated answers. This MCP server gives any MCP-compatible client direct access to that data โ 38 tools covering projects, brands, prompts, chats, query analysis, analytics reports, source content, brand profiles, and full CRUD operations.
Key capabilities:
- Query brand visibility, sentiment, and position across AI models
- Analyze which domains and URLs get cited in AI responses
- Inspect individual chat interactions with full source attribution
- Slice data by model, prompt, category tag, topic, country, or date
- Create, update, and delete brands, prompts, tags, and topics (opt-in)
- Review and act on AI-generated prompt and topic suggestions
Quick Start
1. Get your API key
Sign up at app.peec.ai and create an API key under Settings > API Keys.
2. Configure
Claude Code
claude mcp add --transport stdio peecai -- npx -y mcp-server-peecai
Set environment variables:
export PEECAI_API_KEY="your-api-key"
export PEECAI_PROJECT_ID="your-project-id" # optional default
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"peecai": {
"command": "npx",
"args": ["-y", "mcp-server-peecai"],
"env": {
"PEECAI_API_KEY": "your-api-key",
"PEECAI_PROJECT_ID": "your-project-id"
}
}
}
}
VS Code / Cursor
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"peecai": {
"command": "npx",
"args": ["-y", "mcp-server-peecai"],
"env": {
"PEECAI_API_KEY": "your-api-key",
"PEECAI_PROJECT_ID": "your-project-id"
}
}
}
}
3. Verify
Confirm the peecai server is connected โ in Claude Code run /mcp, in VS Code/Cursor check the MCP server status in the output panel.
Tools
Data Retrieval (19 tools)
list_projects โ List all projects for the company.
- Returns: project IDs, names, statuses (
CUSTOMER= active,PITCH= demo) - Parameters:
limit,offset
list_brands โ List tracked brands with their associated domains.
- Parameters:
project_id,limit,offset
list_prompts โ List monitored search prompts.
- Returns: prompt messages, tags, topics, user location, search volume
- Parameters:
project_id,topic_id,tag_id,limit,offset
list_tags โ List category tags for a project.
- Parameters:
project_id,limit,offset
list_topics โ List topic groupings for a project.
- Parameters:
project_id,limit,offset
list_models โ Deprecated; prefer list_model_channels. List tracked AI models (ChatGPT, Perplexity, etc.).
- Returns: model IDs and active status
- Parameters:
project_id,limit,offset
list_model_channels โ List model channels (stable IDs grouping one or more models, e.g. openai-0, perplexity-0).
- Returns: channel ID, description, currently active model, active status
- Parameters:
project_id,limit,offset
list_chats โ List AI chat interactions with optional date and dimension filtering.
- Returns: chat IDs, prompt/model/model_channel refs, dates
- Parameters:
project_id,start_date,end_date,brand_id,prompt_id,model_id,model_channel_id,limit,offset
get_chat_content โ Get full content of a specific chat.
- Returns: sources (URLs, domains, citation counts), brands mentioned, messages, queries, products
- Parameters:
chat_id,project_id
list_prompt_suggestions โ List AI-generated prompt suggestions.
- Parameters:
project_id,topic_id,limit,offset
list_topic_suggestions โ List AI-generated topic suggestions.
- Parameters:
project_id,limit,offset
list_brand_suggestions โ List AI-generated brand suggestions.
- Returns: suggestion ID, name, domains, chat_count
- Parameters:
project_id,limit,offset
get_project_profile โ Read the project's brand profile (occupation, industry, brand identity, target markets, audience distribution).
- Returns:
profileobject ornullif not yet profiled - Parameters:
project_id
Analytics Reports
All report tools support dimensions for multi-level breakdowns: prompt_id, model_id, model_channel_id, tag_id, topic_id, date, country_code, chat_id. Date filtering via start_date / end_date (YYYY-MM-DD). Server-side filtering via filters parameter (field, operator: "in" | "not_in", values).
get_brands_report โ Brand analytics per brand.
| Metric | Description |
|---|---|
visibility | Ratio 0โ1 (visibility_count / visibility_total) |
sentiment | Score 0โ100, 50 = neutral |
position | Average rank when mentioned, lower = better |
share_of_voice | Share of voice 0โ1 (proportion of total mentions) |
mention_count | Number of times the brand was mentioned |
get_domains_report โ Domain-level analytics.
| Metric | Description |
|---|---|
retrieval_rate | Share of chats retrieving this domain (0โ1) |
citation_rate | Average citations per retrieval |
classification | OWN, CORPORATE, COMPETITOR, RELATED, EDITORIAL, REFERENCE, INSTITUTIONAL, UGC, OTHER |
get_urls_report โ URL-level analytics.
| Metric | Description |
|---|---|
retrieval_count | Number of chats retrieving this URL (replaces deprecated retrievals) |
citation_count | Total citations across all chats |
citation_rate | Average citations per retrieval |
classification | HOMEPAGE, PRODUCT_PAGE, CATEGORY_PAGE, LISTICLE, COMPARISON, ARTICLE, HOW_TO_GUIDE, PROFILE, ALTERNATIVE, DISCUSSION, OTHER |
get_url_content โ Get the scraped markdown content of a source URL discovered via get_urls_report.
- Returns:
content(markdown, null while scraping pending),title,domain,channel_title,classification,url_classification,content_length,truncated,content_updated_at - Parameters:
url,project_id,max_length(1โ20,000,000, default 100,000) - If stored content exceeds
max_length,truncated=trueโ re-request with a largermax_lengthto get more.
Query Analysis
search_queries โ Get search queries AI models generated when answering prompts.
- Parameters:
project_id,start_date,end_date,filters,limit,offset
shopping_queries โ Get shopping/product queries AI models generated.
- Parameters:
project_id,start_date,end_date,filters,limit,offset
Write Operations (19 tools, opt-in)
Write tools are disabled by default for safety. Enable them by setting PEECAI_ALLOW_WRITES=true.
When disabled, these tools are completely invisible โ they don't appear in tools/list and cannot be called by any client.
| Entity | Create | Update | Delete |
|---|---|---|---|
| Brands | create_brand | update_brand | delete_brand |
| Prompts | create_prompt | update_prompt | delete_prompt |
| Tags | create_tag | update_tag | delete_tag |
| Topics | create_topic | update_topic | delete_topic |
| Suggestions | Accept | Reject |
|---|---|---|
| Prompt suggestions | accept_prompt_suggestion | reject_prompt_suggestion |
| Topic suggestions | accept_topic_suggestion | reject_topic_suggestion |
| Brand suggestions | accept_brand_suggestion | reject_brand_suggestion |
set_project_profile โ Replace the project's brand profile (occupation, industry, brand identity, target markets, audience distribution). Full overwrite; audienceDistribution percentages must sum to 100. Triggers a background refresh of prompt suggestions.
Delete operations are soft-deletes and irreversible through the API. Delete tools carry destructiveHint: true in their MCP annotations, causing clients like Claude Code to require explicit user approval before execution.
Tool Annotations
| Tool type | Read-only | Idempotent | Destructive |
|---|---|---|---|
| All read tools (19) | Yes | Yes | No |
| Create (4) | No | No | No |
| Update (4) | No | Yes | No |
| Delete (4) | No | Yes | Yes |
| Accept suggestion (3) | No | No | No |
| Reject suggestion (3) | No | Yes | No |
set_project_profile (1) | No | Yes | Yes |
Resources
MCP resources provide reference data that clients can fetch without a tool call.
| Resource | Type | Description |
|---|---|---|
peecai://projects | Static | List all projects |
peecai://projects/{project_id}/brands | Template | Brands for a project |
peecai://projects/{project_id}/tags | Template | Tags for a project |
peecai://projects/{project_id}/topics | Template | Topics for a project |
peecai://projects/{project_id}/models | Template | AI models for a project |
peecai://projects/{project_id}/prompts | Template | Prompts for a project |
Resource templates support listing โ clients can enumerate available resources across all projects.
Prompt Templates
Guided analytical workflows available as MCP prompts. All prompts support project_id autocompletion.
| Prompt | Description |
|---|---|
brand-visibility-analysis | Analyze brand visibility, sentiment, and position across AI models |
competitive-gap-analysis | Compare own brand vs competitors across prompts and models |
ai-search-citation-report | Analyze domain and URL citations in AI responses |
Example Prompts
"List my Peec AI projects"
"Show brand visibility for the last 30 days"
"Which domains get cited most in AI search results?"
"Compare brand sentiment across ChatGPT and Perplexity"
"Show me the full chat content for chat ID abc-123"
"Get URL report broken down by AI model and country"
"What search queries do AI models use when answering my prompts?"
"Create a brand 'My Brand' with domain mybrand.com"
"Add a new prompt: 'best CRM software 2025' for country DE"
Environment Variables
| Variable | Required | Description |
|---|---|---|
PEECAI_API_KEY | Yes | API key from app.peec.ai |
PEECAI_PROJECT_ID | No | Default project ID โ saves repeating it in every tool call |
PEECAI_ALLOW_WRITES | No | Set to true to enable write operations (create/update/delete). Disabled by default for safety. |
MCP Protocol Features
This server implements the MCP 2025-11-25 specification:
- Structured content โ list tools return
structuredContentalongside text for type-safe client parsing - Tool annotations โ
readOnlyHint,destructiveHint,idempotentHinton every tool - Progress notifications โ report tools send progress updates when the client provides a
progressToken - Structured logging โ API errors are sent as MCP log notifications with endpoint, status, and message context
- Prompt completions โ
project_idargument supports autocompletion viacompletable() - Resource templates โ with
listcallbacks for enumerating resources across projects - Cancellation support โ all tools forward the MCP
AbortSignalto API calls
API Drift Detection
The Peec AI API is in beta and may change. A drift detection script compares the live OpenAPI spec against a committed snapshot:
npm run check:api-drift
- No drift: exit code 0, snapshot is current
- Drift detected: exit code 1, shows a diff of changes
No API key is required โ the OpenAPI spec is publicly accessible.
Development
Prerequisites
- Node.js >= 22
- npm
Commands
npm install # Install dependencies
npm run build # Compile TypeScript to dist/
npm run dev # Watch mode โ recompile on changes
npm test # Run unit tests (372 tests)
npm run test:watch # Run tests in watch mode
npm run test:integration # Run integration tests (requires PEECAI_API_KEY)
npm run check:api-drift # Check for API spec changes
Integration Tests
Integration tests hit the live Peec AI API and are skipped by default in npm test.
# Read-only smoke test (all 19 read tools + prompts + resources)
PEECAI_API_KEY=xxx npm run test:integration
# Full CRUD round-trip (requires a test project + write access)
PEECAI_ALLOW_WRITES=true PEECAI_TEST_PROJECT_ID=or_xxx npm run test:integration
Project Structure
src/
โโโ index.ts # Server entry point, tool/resource/prompt registration
โโโ api-client.ts # HTTP client for Peec AI Customer API
โโโ types.ts # TypeScript interfaces for API responses
โโโ schemas.ts # Zod output schemas for structured content
โโโ util.ts # Validation, date handling, MCP response helpers
โโโ prompts.ts # MCP prompt templates (guided workflows)
โโโ tools/ # One file per MCP tool (or tool group)
โโโ projects.ts # list_projects
โโโ brands.ts # list_brands
โโโ prompts.ts # list_prompts
โโโ tags.ts # list_tags
โโโ topics.ts # list_topics
โโโ models.ts # list_models
โโโ model-channels.ts # list_model_channels
โโโ chats.ts # list_chats
โโโ chat-content.ts # get_chat_content
โโโ prompt-suggestions.ts # list_prompt_suggestions
โโโ topic-suggestions.ts # list_topic_suggestions
โโโ brand-suggestions.ts # list_brand_suggestions
โโโ project-profile.ts # get_project_profile, set_project_profile
โโโ report-brands.ts # get_brands_report
โโโ report-domains.ts # get_domains_report
โโโ report-urls.ts # get_urls_report
โโโ url-content.ts # get_url_content
โโโ queries-search.ts # search_queries
โโโ queries-shopping.ts # shopping_queries
โโโ write-brands.ts # create/update/delete brand
โโโ write-prompts.ts # create/update/delete prompt
โโโ write-tags.ts # create/update/delete tag
โโโ write-topics.ts # create/update/delete topic
โโโ suggestion-actions.ts # accept/reject suggestions
License
Built by Tobias Hein at artaxo โ a digital marketing agency specializing in AI Search Optimization.
