Skip to main content
Glama
cbinsights

CB Insights MCP Server

Official
by cbinsights

ChatCBI

Use this tool to interact with CB Insights' conversational AI by providing clear, specific queries. Maintain context by including the chat ID from previous interactions for continuous dialogue.

Instructions

When using this tool, provide clear, specific queries for the best results. You can continue conversations with ChatCBI by including the chat ID from previous interaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idNo
messageYes

Implementation Reference

  • server.py:51-72 (handler)
    The handler function for the ChatCBI tool. It authenticates using get_auth_token, constructs a payload with the message and optional chat_id, and performs a POST request to the CB Insights /chatcbi endpoint, returning the raw response content.
    def chat_with_cbi(message: str, chat_id: Optional[str] = None) -> {}: token = get_auth_token() url = f"{API_BASE}/chatcbi" headers = { "Authorization": f"Bearer {token}", "Content-Type": "application/json" } payload = {"message": message} if chat_id: payload["chatID"] = chat_id with httpx.Client() as client: try: response = client.post(url, headers=headers, json=payload, timeout=TIMEOUT) response.raise_for_status() return response.content except Exception as e: raise Exception(e) return {}
  • server.py:46-50 (registration)
    Registers the ChatCBI tool with MCP using the @mcp.tool decorator, specifying name, description, annotations, and output behavior.
    @mcp.tool(name="ChatCBI", description="When using this tool, provide clear, specific queries for the best results. You can continue conversations with ChatCBI by including the chat ID from previous interaction.", annotations=ToolAnnotations(title="Chat with CBI", readOnlyHint=True, openWorldHint=True), structured_output=False, )
  • Defines the input schema with parameters message (str) and optional chat_id (str), and output as unstructured dict ({}).
    def chat_with_cbi(message: str, chat_id: Optional[str] = None) -> {}:
  • Helper function that retrieves the authentication token from the CB Insights API using client credentials.
    def get_auth_token() -> str: url = f"{API_BASE}/authorize" payload = { "clientId": CLIENT_ID, "clientSecret": CLIENT_SECRET } with httpx.Client() as client: try: response = client.post(url, json=payload, timeout=30.0) response.raise_for_status() return response.json()["token"] except Exception as e: raise Exception(f"Failed to authenticate: {str(e)}")

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cbinsights/cbi-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server