Ambivo Claude MCP Server
Ambivo MCP Server
A Model Context Protocol (MCP) server for interacting with the Ambivo CRM API using natural language.
Features
Natural language queries for entity data (leads, contacts, opportunities, etc.)
Direct entity data access with structured parameters
Response formatting options: table, natural language, or both
Standards‑based error handling with clear messages
Overview
This server enables you to query your Ambivo CRM data conversationally. You can ask things like:
"Show me leads created this week"
"Find contacts with gmail addresses"
"List opportunities worth more than $10,000"
"Show me leads with attribution_source google_ads from the last 7 days"
Installation
Option 1: Install from PyPI (Recommended)
pip install ambivo-mcp-serverOption 2: Install from Source
git clone https://github.com/ambivo-corp/ambivo-mcp-server.git
cd ambivo-mcp-server
pip install -e .Running the Server
# If installed via pip
ambivo-mcp-server
# Or using Python module
python -m ambivo_mcp_server.serverConfiguration
The server uses the following default configuration:
Base URL:
https://goferapi.ambivo.comTimeout: 30 seconds
Content Type:
application/json
You can modify these settings in the AmbivoAPIClient class if needed.
Authentication
First, set your authentication token using the
set_auth_tokentoolThe token will be included in all subsequent API requests as a Bearer token
The token should be a valid JWT token from your Ambivo API authentication
Available Tools
set_auth_token
Sets the JWT token used for authentication.
Parameters:
token(string, required) – the JWT token
Usage:\
{
"token": "your-jwt-token-here"
}natural_query
Processes a natural language query.
Parameters:
query(string, required) – the natural language queryresponse_format(string, optional) – "table", "natural", or "both" (default: "both")
Example queries:
"Show me leads created this week"
"Find contacts with gmail addresses"
"List opportunities worth more than $10,000"
"Show me leads with attribution_source google_ads from the last 7 days"
Usage:\
{
"query": "Show me leads created this week with attribution_source google_ads",
"response_format": "both"
}entity_data
Direct entity data access with structured parameters.
Parameters: (depends on the endpoint – typical: entity type, fields, filters, etc.)
Usage:\
{
"tool": "entity_data",
"arguments": {
"entity_type": "contact",
"filters": {"email": {"$regex": "@gmail.com$"}},
"limit": 100,
"sort": {"created_date": -1}
}
}API Endpoints
This MCP server interfaces with these Ambivo API endpoints:
/entity/natural_query
Method: POST
Purpose: Process natural language queries for entity data retrieval
Authentication: Required (JWT Bearer token)
Content-Type: application/json
/entity/data
Method: POST
Purpose: Direct entity data access with structured parameters
Authentication: Required (JWT Bearer token)
Content-Type: application/json
Error Handling
The server provides comprehensive error handling:
Authentication errors: Clear messages when token is missing or invalid
HTTP errors: Detailed HTTP status codes and response messages
Validation errors: Parameter validation with helpful error messages
Network errors: Timeout and connection error handling
Example Workflow
Set Authentication:\
{ "tool": "set_auth_token", "arguments": { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } }Natural Language Query:\
{ "tool": "natural_query", "arguments": { "query": "Show me all leads created in the last 30 days with phone numbers", "response_format": "both" } }Direct Entity Query:\
{ "tool": "entity_data", "arguments": { "entity_type": "contact", "filters": {"email": {"$regex": "@gmail.com$"}}, "limit": 100, "sort": {"created_date": -1} } }
Development
To extend this MCP server:
Add new tools: Implement additional tools in the
handle_list_tools()andhandle_call_tool()functionsModify API client: Extend the
AmbivoAPIClientclass to support additional endpointsUpdate configuration: Modify default settings in the configuration section
Troubleshooting
Common Issues:
"Authentication required" error: Ensure you've called
set_auth_tokenfirstHTTP 401/403 errors: Verify your JWT token is valid and not expired
Connection timeout: Check network connectivity and API endpoint availability
Invalid parameters: Review the tool schemas for required and optional parameters
Logging:
The server logs important events and errors. Check the console output for debugging information.
Related MCP Connectors
Talk to your live-events CRM (campaigns, analytics, paid ads, segments) in Claude and ChatGPT.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Manage your Elocuenti AI sales agents, CRM, campaigns and analytics from Claude.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.