Overview
The Hindsight API provides access to competitive intelligence, win-loss insights, and deal data through two integration methods:- REST API - Hindsight’s AI handles multiple tool calls and returns contextual text responses with citations
- Model Context Protocol (MCP) - Individual tools for AI assistants like Claude to orchestrate directly
When to Use Each
- REST API: For Glean, Slack bots, custom applications that need complete answers
- MCP (Coming Soon): For Claude Desktop, Cursor, or other MCP-compatible AI assistants that orchestrate tools themselves
Authentication
All API requests require authentication using an API key in the header:REST API
The REST API is designed for applications that need complete, synthesized answers with citations. Hindsight’s AI automatically orchestrates multiple searches and returns formatted responses. Best for: Glean, Slack bots, search interfaces, custom applicationsEndpoint
Request Format
Response Format
Streaming Support
Enable streaming for real-time responses:Document Upload API
Upload documents to your Hindsight knowledge base or associate them with specific deals.Upload to Knowledge Base
Upload competitive intelligence documents, assets, and other files to your library.Request Format
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_name | string | Yes | Name of the file |
file_url | string | Yes* | URL to download the file from |
file_base64 | string | Yes* | Base64-encoded file content (alternative to file_url) |
content_type | string | Yes | MIME type (e.g., application/pdf, text/markdown) |
type | string | Yes | Document type: "asset" or "intel" |
competitor_id | string | Yes** | Hindsight competitor ID |
competitor_name | string | Yes** | Competitor name (resolved to ID automatically) |
source | string | No | Source application: "drive", "notion", "confluence", "onedrive", "sharepoint", "vanta", "url", "zapier", "api" |
folder_id | string | No | Folder ID to organize the document |
file_url or file_base64 is required**Either
competitor_id or competitor_name is required
Response
Upload to Deal
Associate documents with specific deals for win-loss analysis.Request Format
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_name | string | Yes | Name of the file |
file_url | string | Yes* | URL to download the file from |
file_base64 | string | Yes* | Base64-encoded file content (alternative to file_url) |
content_type | string | Yes | MIME type (e.g., application/pdf, audio/mpeg) |
deal_id | string | Yes** | Hindsight deal ID |
salesforce_id | string | Yes** | Salesforce Opportunity ID |
hubspot_id | string | Yes** | HubSpot Deal ID |
source | string | No | Source application: "gong", "clari", "fathom", "fireflies", "avoma", "outreach", "gmail", "Salesforce", "Hubspot", "api" |
file_url or file_base64 is required**One of
deal_id, salesforce_id, or hubspot_id is required
Supported File Types
- Documents: PDF, Word, PowerPoint, Excel, Markdown, plain text
- Audio: MP3, WAV, M4A (automatically transcribed)
- Video: MP4 (automatically transcribed)
Response
Model Context Protocol (MCP) Integration
Individual Hindsight tools are available exclusively through the Model Context Protocol. This allows AI assistants like Claude to directly call Hindsight functions and orchestrate their own workflows. Best for: Claude Desktop, Cursor, Cline, and other MCP-compatible AI assistantsQuick Setup
Add to yourclaude_desktop_config.json:
Available MCP Tools
1. search_knowledge_base
Search across all uploaded competitive intelligence documents. MCP Tool Name:search_knowledge_base
2. select_deal
Find deals based on stage, amount, competitor, product, or other filters. MCP Tool Name:select_deal
3. search_across_deals
Perform semantic vector search across all deal documents to find relevant content. MCP Tool Name:search_across_deals
4. search_deal_documents
Deep search within specific identified deals. MCP Tool Name:search_deal_documents
5. search_deals
Find deals using AI embeddings to understand conceptual similarity. MCP Tool Name:search_deals
6. search_competitors
Search competitive intelligence database for specific competitor information. MCP Tool Name:search_competitors
source(optional): Filter by source -"g2","linkedin","x","reddit","discord","slack"
7. get_documents
Search for specific documents by name or keyword. MCP Tool Name:get_assets
MCP Setup Instructions
Installation
The@hindsight/mcp-server package automatically handles:
- Authentication with your API key
- Tool registration with your AI assistant
- Request/response formatting
- Error handling and retries
Configuration for Claude Desktop
-
Open your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Add the Hindsight MCP server:
- Restart Claude Desktop
- Verify the connection by asking Claude: “What Hindsight tools do you have access to?”
Configuration for Other MCP Clients
The same configuration works for other MCP-compatible clients like Cursor, Cline, and Zed. Consult your client’s documentation for where to place the MCP configuration.Example Usage
Once configured, you can ask Claude questions like:- “Find deals where we lost to Competitor X in the last quarter”
- “What are the top security objections we’ve encountered?”
- “Search for pricing discussions in enterprise deals”
- “Show me competitor intel on Salesforce’s integration strategy”
Common Use Cases
Use Case 1: Glean Integration
Integrate Hindsight as a data source in Glean to answer competitive intelligence and win-loss questions. REST API Example:Use Case 2: Claude Desktop for Sales Prep
Use Claude with Hindsight tools to prepare for sales calls, analyze deals, and get competitive intel. Example Conversation:Use Case 3: Custom Slack Bot
Build a Slack bot that answers team questions about deals and competitors. REST API Example:Rate Limits
| Plan | Requests/minute | Requests/day |
|---|---|---|
| Free | 10 | 100 |
| Professional | 60 | 10,000 |
| Enterprise | 300 | Unlimited |
Error Handling
All errors follow this format:Error Codes
400- Bad Request (invalid parameters)401- Unauthorized (invalid API key)403- Forbidden (insufficient permissions)404- Not Found (resource doesn’t exist)429- Too Many Requests (rate limit exceeded)500- Internal Server Error
