How to integrate Centralstationcrm MCP with LlamaIndex

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Centralstationcrm logo
LlamaIndex logo
divider

Introduction

This guide walks you through connecting Centralstationcrm to LlamaIndex using the Composio tool router. By the end, you'll have a working Centralstationcrm agent that can add new company to crm contacts, log a sales opportunity for a client, count total people in your crm through natural language commands.

This guide will help you understand how to give your LlamaIndex agent real control over a Centralstationcrm account through Composio's Centralstationcrm MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate Centralstationcrm with

TL;DR

Here's what you'll learn:
  • Set your OpenAI and Composio API keys
  • Install LlamaIndex and Composio packages
  • Create a Composio Tool Router session for Centralstationcrm
  • Connect LlamaIndex to the Centralstationcrm MCP server
  • Build a Centralstationcrm-powered agent using LlamaIndex
  • Interact with Centralstationcrm through natural language

What is LlamaIndex?

LlamaIndex is a data framework for building LLM applications. It provides tools for connecting LLMs to external data sources and services through agents and tools.

Key features include:

  • ReAct Agent: Reasoning and acting pattern for tool-using agents
  • MCP Tools: Native support for Model Context Protocol
  • Context Management: Maintain conversation context across interactions
  • Async Support: Built for async/await patterns

What is the Centralstationcrm MCP server, and what's possible with it?

The Centralstationcrm MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Centralstationcrm account. It provides structured and secure access to your customer relationship data, so your agent can perform actions like managing contacts, creating deals, updating company records, and tracking key interactions on your behalf.

  • Automated contact management: Quickly add new people to your CRM, update their details, and ensure your contact database stays current without manual entry.
  • Company and organization creation: Effortlessly create new company records so you can keep your account-based selling and organization tracking up-to-date.
  • Deal tracking and creation: Instantly log new sales opportunities by creating deals linked to your contacts or companies, helping your team stay on top of the pipeline.
  • Detailed relationship enrichment: Add addresses, assistants, avatars, and contact details to people in your CRM, making every customer profile richer and more actionable.
  • Milestone and history recording: Record important life events or milestones (like birthdays or anniversaries) for each person to boost relationship management and personalized outreach.

Supported Tools & Triggers

Tools
Check ConnectionTool to verify the connection status of the CentralStationCRM API key.
Count ActivitiesTool to retrieve activities count for a record, account, or user.
Count AttachmentsTool to retrieve the total count and total file size of attachments.
Count AvatarsTool to retrieve the total count and total file size of avatars in the system.
Count Companies External EmailsTool to retrieve the total amount of external emails for a specific company.
Count Deals External EmailsTool to retrieve the total amount of external emails for a specific deal.
Count External EmailsTool to retrieve the total amount of external emails.
Count People with FiltersTool to retrieve the total count of people with optional filtering capabilities.
Count People External EmailsTool to retrieve the total amount of external emails for a specific person.
Count Projects External EmailsTool to retrieve the total amount of external emails for a specific project.
Count ProtocolsTool to retrieve the total number of protocols in the account.
Create AttachmentsTool to create a new attachment in CentralStationCRM.
Create Calendar EventTool to create a new calendar event in CentralStationCRM.
Create Calendar Event AttendeeTool to create a calendar event attendee.
Create CommentTool to create a new comment on an entity (task, event, protocol, etc.
Create Company with Nested AttributesTool to create a company with nested attributes.
Create Company AvatarTool to create an avatar for a company.
Create Company Protocol AttachmentTool to create an attachment for a company protocol in CentralStationCRM.
Create Company AddressTool to create a new address for a specific company.
Create Company Contact DetailTool to create a new contact detail for a specific company.
Create Custom Field TypeTool to create a new custom field type in CentralStationCRM.
Create Deal Protocol AttachmentTool to create an attachment for a deal protocol.
Create DealTool to create a new deal in CentralStationCRM.
Create Group CalendarTool to create a new group calendar in CentralStationCRM.
Create HookTool to create a webhook hook in CentralStationCRM.
Create PeopleTool to create a person with nested attributes.
Create People Custom FieldTool to create a custom field for a person record.
Create People PositionsTool to create a new position for a specific person.
Create Person Protocol AttachmentTool to create an attachment for a person protocol in CentralStationCRM.
Create People TagsTool to create a new tag for a specific person.
Create Person AddressTool to create a new address for a specific person.
Create Person AssistantTool to create a new assistant (assi) entry for a specific person.
Create Person AvatarTool to create a new avatar for a specific person.
Create Person Contact DetailTool to create a new contact detail for a specific person.
Create Person Historic EventTool to create a new historic event for a specific person.
Create ProjectTool to create a new project record.
Create Project Protocol AttachmentTool to create an attachment for a project protocol in CentralStationCRM.
Create ProtocolTool to create a new protocol entry.
Create Protocol AttachmentTool to create an attachment for a protocol in CentralStationCRM.
Create TagTool to create a new tag for a person, company, or deal.
Create TaskTool to create a new task record.
Delete AttachmentsTool to delete an attachment by ID.
Delete AvatarTool to delete an avatar by its ID.
Delete Calendar EventTool to delete a calendar event by ID.
Delete Calendar Event AttendeeTool to delete a calendar event attendee by ID.
Delete CommentTool to delete a comment by its ID.
Delete Company AvatarTool to delete a company's avatar by its ID.
Delete Company Contact DetailTool to delete a contact detail of a company.
Delete Company Protocol AttachmentTool to delete a specific attachment from a company protocol.
Delete CompanyTool to delete a company record by ID.
Delete Company AddressTool to delete a company's address by its ID.
Delete Custom Field TypeTool to delete a custom field type by ID.
Delete DealTool to delete a deal record by ID.
Delete Deal Protocol AttachmentTool to delete a specific attachment from a deal protocol.
Delete Group CalendarTool to delete a group calendar by ID.
Delete HookTool to delete a webhook by ID.
Delete People Custom FieldsTool to delete a person's custom field by its ID.
Delete People PositionsTool to delete a position of a person by its ID.
Delete Person Protocol AttachmentTool to delete a specific attachment from a person protocol.
Delete personTool to delete a person record by ID.
Delete Person AddressTool to delete a person's address by its ID.
Delete Person AssiTool to delete an assi entry of a person.
Delete Person AvatarTool to delete a person's avatar by its ID.
Delete Person Contact DetailTool to delete a contact detail of a person.
Delete Person Historic EventTool to delete a historic event of a person by its ID.
Delete Person TagTool to destroy a tag from a person by its ID.
Delete ProjectTool to delete a project record by ID.
Delete Project Protocol AttachmentTool to delete a specific attachment from a project protocol.
Delete ProtocolTool to delete a protocol by ID.
Delete Protocol AttachmentTool to delete an attachment from a protocol.
Delete TaskTool to delete a task by its ID.
Get ActivityTool to retrieve details of a specific activity by its ID.
Get API User MaildropTool to retrieve the current API user's maildrop for people and companies.
Get AttachmentTool to retrieve details of a specific attachment by its ID.
Get AvatarTool to retrieve a specific avatar by its ID from CentralStationCRM.
Get Calendar EventTool to retrieve details of a specific calendar event by ID.
Get Calendar Event AttendeeTool to retrieve details of a specific calendar event attendee by ID.
Get CommentTool to retrieve details of a specific comment by its ID.
Get Company AvatarTool to retrieve a specific avatar of a company by avatar ID.
Get Company Protocol AttachmentTool to retrieve a specific attachment from a company protocol by its ID.
Get CompanyTool to retrieve details of a specific company by ID from CentralStationCRM.
Get Company AddressTool to retrieve a specific address of a company by address ID.
Get Company Contact DetailTool to retrieve a specific contact detail by ID for a company.
Get Custom Fields TypeTool to retrieve a custom field type by its ID.
Get DealTool to retrieve details of a specific deal by its ID.
Get Deal MaildropTool to retrieve the maildrop email address for a specific deal.
Get Deal Protocol AttachmentTool to retrieve a specific attachment from a deal protocol.
Get Group CalendarTool to retrieve details of a specific group calendar by ID.
Get HookTool to retrieve details of a specific webhook/hook by ID.
Get People PositionsTool to retrieve a specific position for a person by ID.
Get Person Protocol AttachmentTool to retrieve a specific attachment from a person protocol.
Get People TagsTool to retrieve a specific tag for a person by tag ID.
Get PersonTool to retrieve details of a specific person by ID.
Get Person AddressTool to retrieve a specific address of a person by address ID.
Get Person AddressesTool to retrieve all addresses for a specific person.
Get Person AssiTool to retrieve a specific assistant (assi) entry for a person by their IDs.
Get Person AvatarTool to retrieve a specific avatar of a person by avatar ID.
Get Person Contact DetailTool to retrieve a specific contact detail by ID for a person.
Get Person Custom FieldTool to retrieve a specific custom field for a person by custom field ID.
Get Person Historic EventTool to retrieve a specific historic event of a person by ID.
Get ProjectTool to retrieve details of a specific project by ID from CentralStationCRM.
Get Project MaildropTool to retrieve the maildrop email address for a specific project.
Get Project Protocol AttachmentTool to retrieve a specific attachment from a project protocol by its ID.
Get Protocol AttachmentTool to retrieve a specific attachment from a protocol by its ID.
Get Stats CompaniesRetrieve statistics about companies in your CRM.
Get Stats DealsRetrieve statistics about deals in your CRM.
Get Stats ProjectsRetrieve statistics about projects in your CRM.
Get TaskTool to retrieve details of a specific task by its ID.
Get UserTool to retrieve the current API user's details.
Get User By IDTool to retrieve details of a specific user by ID.
List ActivitiesTool to retrieve activities for records in CentralStationCRM.
List AttachmentsTool to retrieve a paginated list of all attachments from CentralStationCRM.
List AvatarsTool to retrieve all avatars from CentralStationCRM.
List Calendar EventsTool to retrieve all calendar events from the account.
List Calendar Event AttendeesTool to retrieve all attendees for a specific calendar event.
List CommentsTool to retrieve all comments from the account.
List CompaniesTool to retrieve a paginated list of all companies from CentralStationCRM.
List Company AddressesTool to retrieve all addresses for a specific company.
List Company AvatarsTool to retrieve all avatars for a specific company.
List Company Contact DetailsTool to retrieve all contact details for a specific company.
List Companies External EmailsTool to retrieve all external emails for a specific company from CentralStationCRM.
List Company Protocol AttachmentsTool to retrieve all attachments for a specific protocol within a company.
List Custom Fields TypesTool to retrieve all custom field types of the account.
List DealsTool to retrieve all deals with advanced filtering, sorting, and pagination options.
List Deals External EmailsTool to retrieve all external emails for a specific deal from CentralStationCRM.
List Deal Protocol AttachmentsTool to retrieve all attachments for a specific protocol within a deal.
List External EmailsTool to retrieve all external emails from CentralStationCRM.
List Filter GroupsTool to retrieve all filter groups from CentralStationCRM.
List Group CalendarsTool to retrieve all group calendars from the account.
List Historic EventsTool to retrieve all historic events from the CentralStationCRM account.
List HooksTool to retrieve all hooks of the account from CentralStationCRM.
List PeopleTool to retrieve a paginated list of all people from CentralStationCRM.
List People AssisTool to retrieve all assis of a person.
List People AvatarsTool to retrieve all avatars for a specific person.
List People Contact DetailsTool to retrieve all contact details for a specific person.
List People Custom FieldsTool to retrieve all custom fields for a specific person from the dedicated custom fields endpoint.
List People External EmailsTool to retrieve all external emails for a specific person from CentralStationCRM.
List People Historic EventsTool to retrieve all historic events of a person.
List People PositionsTool to retrieve all positions for a specific person.
List People Protocol AttachmentsTool to retrieve all attachments for a specific protocol within a person.
List People TagsTool to retrieve all tags for a specific person.
List ProjectsTool to retrieve a paginated list of all projects from CentralStationCRM.
List Projects External EmailsTool to retrieve all external emails for a specific project from CentralStationCRM.
List Project Protocol AttachmentsTool to retrieve all attachments for a specific protocol within a project.
List ProtocolsTool to retrieve all protocols from CentralStationCRM.
List Protocol AttachmentsTool to retrieve all attachments for a specific protocol.
List TagsTool to retrieve all tags from CentralStationCRM.
List Tags 2Tool to retrieve all tag names from CentralStationCRM.
List TasksTool to retrieve a paginated list of all tasks from CentralStationCRM.
List UsersTool to retrieve all users of the account from CentralStationCRM.
Merge CompaniesTool to merge multiple companies into an existing company by ID.
Merge PersonTool to merge another person into an existing person by ID.
Search AttachmentsSearch for attachments in CentralStationCRM by filename.
Search CompaniesTool to search for companies in CentralStationCRM by name.
Search Company Protocol AttachmentsTool to search for attachments within a specific protocol of a company.
Search Contact DetailsTool to search for contact details in CentralStationCRM by name, email, phone, or other criteria.
Search DealsTool to search for deals by name and retrieve matching results with pagination.
Search Deal Protocol AttachmentsTool to search for attachments within a specific deal protocol in CentralStationCRM.
Search PeopleSearch for people in CentralStationCRM by name, email, phone, or other text criteria.
Search Person Protocol AttachmentsTool to search for attachments within a specific person protocol in CentralStationCRM.
Search People V2Tool to search for people in CentralStationCRM using specific criteria like name, email, or phone.
Search ProjectsTool to search for projects in CentralStationCRM by name.
Search Project Protocol AttachmentsTool to search for attachments within a specific protocol of a project.
Search RecordsTool to retrieve search results from CentralStationCRM.
Search UsersTool to search for users in CentralStationCRM by first name or last name.
Stats PeopleRetrieve statistics about people (contacts) in your CRM.
Update Calendar EventTool to update an existing calendar event by ID.
Update Calendar Event AttendeeTool to update a calendar event attendee.
Update CommentTool to update an existing comment by ID.
Update CompanyTool to update an existing company by ID.
Update Company AddressTool to update a specific address of a company.
Update Company Contact DetailTool to update a contact detail for a company by ID.
Update Custom Field TypeTool to update a custom field type by ID.
Update DealTool to update an existing deal record.
Update Group CalendarTool to update an existing group calendar by ID.
Update People Custom FieldsTool to update a person's custom field by its ID.
Update People PositionTool to update a position for a specific person.
Update PersonTool to update an existing person by ID.
Update Person AddressTool to update a specific address of a person.
Update Person AssiTool to update an assi entry of a person.
Update Person Contact DetailTool to update a specific contact detail of a person by ID.
Update Person Historic EventTool to update a historic event of a person by ID.
Update Person TagTool to update a tag on a person.
Update ProjectTool to update an existing project record.
Update ProtocolTool to update an existing protocol by ID.
Update TaskTool to update an existing task by ID.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Prerequisites

Before you begin, make sure you have:
  • Python 3.8/Node 16 or higher installed
  • A Composio account with the API key
  • An OpenAI API key
  • A Centralstationcrm account and project
  • Basic familiarity with async Python/Typescript

Getting API Keys for OpenAI, Composio, and Centralstationcrm

OpenAI API key (OPENAI_API_KEY)
  • Go to the OpenAI dashboard
  • Create an API key if you don't have one
  • Assign it to OPENAI_API_KEY in .env
Composio API key and user ID
  • Log into the Composio dashboard
  • Copy your API key from Settings
    • Use this as COMPOSIO_API_KEY
  • Pick a stable user identifier (email or ID)
    • Use this as COMPOSIO_USER_ID

Installing dependencies

pip install composio-llamaindex llama-index llama-index-llms-openai llama-index-tools-mcp python-dotenv

Create a new Python project and install the necessary dependencies:

  • composio-llamaindex: Composio's LlamaIndex integration
  • llama-index: Core LlamaIndex framework
  • llama-index-llms-openai: OpenAI LLM integration
  • llama-index-tools-mcp: MCP client for LlamaIndex
  • python-dotenv: Environment variable management

Set environment variables

bash
OPENAI_API_KEY=your-openai-api-key
COMPOSIO_API_KEY=your-composio-api-key
COMPOSIO_USER_ID=your-user-id

Create a .env file in your project root:

These credentials will be used to:

  • Authenticate with OpenAI's GPT-5 model
  • Connect to Composio's Tool Router
  • Identify your Composio user session for Centralstationcrm access

Import modules

import asyncio
import os
import dotenv

from composio import Composio
from composio_llamaindex import LlamaIndexProvider
from llama_index.core.agent.workflow import ReActAgent
from llama_index.core.workflow import Context
from llama_index.llms.openai import OpenAI
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec

dotenv.load_dotenv()

Create a new file called centralstationcrm_llamaindex_agent.py and import the required modules:

Key imports:

  • asyncio: For async/await support
  • Composio: Main client for Composio services
  • LlamaIndexProvider: Adapts Composio tools for LlamaIndex
  • ReActAgent: LlamaIndex's reasoning and action agent
  • BasicMCPClient: Connects to MCP endpoints
  • McpToolSpec: Converts MCP tools to LlamaIndex format

Load environment variables and initialize Composio

OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not OPENAI_API_KEY:
    raise ValueError("OPENAI_API_KEY is not set in the environment")
if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set in the environment")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set in the environment")

What's happening:

This ensures missing credentials cause early, clear errors before the agent attempts to initialise.

Create a Tool Router session and build the agent function

async def build_agent() -> ReActAgent:
    composio_client = Composio(
        api_key=COMPOSIO_API_KEY,
        provider=LlamaIndexProvider(),
    )

    session = composio_client.create(
        user_id=COMPOSIO_USER_ID,
        toolkits=["centralstationcrm"],
    )

    mcp_url = session.mcp.url
    print(f"Composio MCP URL: {mcp_url}")

    mcp_client = BasicMCPClient(mcp_url, headers={"x-api-key": COMPOSIO_API_KEY})
    mcp_tool_spec = McpToolSpec(client=mcp_client)
    tools = await mcp_tool_spec.to_tool_list_async()

    llm = OpenAI(model="gpt-5")

    description = "An agent that uses Composio Tool Router MCP tools to perform Centralstationcrm actions."
    system_prompt = """
    You are a helpful assistant connected to Composio Tool Router.
    Use the available tools to answer user queries and perform Centralstationcrm actions.
    """
    return ReActAgent(tools=tools, llm=llm, description=description, system_prompt=system_prompt, verbose=True)

What's happening here:

  • We create a Composio client using your API key and configure it with the LlamaIndex provider
  • We then create a tool router MCP session for your user, specifying the toolkits we want to use (in this case, centralstationcrm)
  • The session returns an MCP HTTP endpoint URL that acts as a gateway to all your configured tools
  • LlamaIndex will connect to this endpoint to dynamically discover and use the available Centralstationcrm tools.
  • The MCP tools are mapped to LlamaIndex-compatible tools and plug them into the Agent.

Create an interactive chat loop

async def chat_loop(agent: ReActAgent) -> None:
    ctx = Context(agent)
    print("Type 'quit', 'exit', or Ctrl+C to stop.")

    while True:
        try:
            user_input = input("\nYou: ").strip()
        except (KeyboardInterrupt, EOFError):
            print("\nBye!")
            break

        if not user_input or user_input.lower() in {"quit", "exit"}:
            print("Bye!")
            break

        try:
            print("Agent: ", end="", flush=True)
            handler = agent.run(user_input, ctx=ctx)

            async for event in handler.stream_events():
                # Stream token-by-token from LLM responses
                if hasattr(event, "delta") and event.delta:
                    print(event.delta, end="", flush=True)
                # Show tool calls as they happen
                elif hasattr(event, "tool_name"):
                    print(f"\n[Using tool: {event.tool_name}]", flush=True)

            # Get final response
            response = await handler
            print()  # Newline after streaming
        except KeyboardInterrupt:
            print("\n[Interrupted]")
            continue
        except Exception as e:
            print(f"\nError: {e}")

What's happening here:

  • We're creating a direct terminal interface to chat with your Centralstationcrm database
  • The LLM's responses are streamed to the CLI for faster interaction.
  • The agent uses context to maintain conversation history
  • You can type 'quit' or 'exit' to stop the chat loop gracefully
  • Agent responses and any errors are displayed in a clear, readable format

Define the main entry point

async def main() -> None:
    agent = await build_agent()
    await chat_loop(agent)

if __name__ == "__main__":
    # Handle Ctrl+C gracefully
    signal.signal(signal.SIGINT, lambda s, f: (print("\nBye!"), exit(0)))
    try:
        asyncio.run(main())
    except KeyboardInterrupt:
        print("\nBye!")

What's happening here:

  • We're orchestrating the entire application flow
  • The agent gets built with proper error handling
  • Then we kick off the interactive chat loop so you can start talking to Centralstationcrm

Run the agent

npx ts-node llamaindex-agent.ts

When prompted, authenticate and authorise your agent with Centralstationcrm, then start asking questions.

Complete Code

Here's the complete code to get you started with Centralstationcrm and LlamaIndex:

import asyncio
import os
import signal
import dotenv

from composio import Composio
from composio_llamaindex import LlamaIndexProvider
from llama_index.core.agent.workflow import ReActAgent
from llama_index.core.workflow import Context
from llama_index.llms.openai import OpenAI
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec

dotenv.load_dotenv()

OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not OPENAI_API_KEY:
    raise ValueError("OPENAI_API_KEY is not set")
if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set")

async def build_agent() -> ReActAgent:
    composio_client = Composio(
        api_key=COMPOSIO_API_KEY,
        provider=LlamaIndexProvider(),
    )

    session = composio_client.create(
        user_id=COMPOSIO_USER_ID,
        toolkits=["centralstationcrm"],
    )

    mcp_url = session.mcp.url
    print(f"Composio MCP URL: {mcp_url}")

    mcp_client = BasicMCPClient(mcp_url, headers={"x-api-key": COMPOSIO_API_KEY})
    mcp_tool_spec = McpToolSpec(client=mcp_client)
    tools = await mcp_tool_spec.to_tool_list_async()

    llm = OpenAI(model="gpt-5")
    description = "An agent that uses Composio Tool Router MCP tools to perform Centralstationcrm actions."
    system_prompt = """
    You are a helpful assistant connected to Composio Tool Router.
    Use the available tools to answer user queries and perform Centralstationcrm actions.
    """
    return ReActAgent(
        tools=tools,
        llm=llm,
        description=description,
        system_prompt=system_prompt,
        verbose=True,
    );

async def chat_loop(agent: ReActAgent) -> None:
    ctx = Context(agent)
    print("Type 'quit', 'exit', or Ctrl+C to stop.")

    while True:
        try:
            user_input = input("\nYou: ").strip()
        except (KeyboardInterrupt, EOFError):
            print("\nBye!")
            break

        if not user_input or user_input.lower() in {"quit", "exit"}:
            print("Bye!")
            break

        try:
            print("Agent: ", end="", flush=True)
            handler = agent.run(user_input, ctx=ctx)

            async for event in handler.stream_events():
                # Stream token-by-token from LLM responses
                if hasattr(event, "delta") and event.delta:
                    print(event.delta, end="", flush=True)
                # Show tool calls as they happen
                elif hasattr(event, "tool_name"):
                    print(f"\n[Using tool: {event.tool_name}]", flush=True)

            # Get final response
            response = await handler
            print()  # Newline after streaming
        except KeyboardInterrupt:
            print("\n[Interrupted]")
            continue
        except Exception as e:
            print(f"\nError: {e}")

async def main() -> None:
    agent = await build_agent()
    await chat_loop(agent)

if __name__ == "__main__":
    # Handle Ctrl+C gracefully
    signal.signal(signal.SIGINT, lambda s, f: (print("\nBye!"), exit(0)))
    try:
        asyncio.run(main())
    except KeyboardInterrupt:
        print("\nBye!")

Conclusion

You've successfully connected Centralstationcrm to LlamaIndex through Composio's Tool Router MCP layer. Key takeaways:
  • Tool Router dynamically exposes Centralstationcrm tools through an MCP endpoint
  • LlamaIndex's ReActAgent handles reasoning and orchestration; Composio handles integrations
  • The agent becomes more capable without increasing prompt size
  • Async Python provides clean, efficient execution of agent workflows
You can easily extend this to other toolkits like Gmail, Notion, Stripe, GitHub, and more by adding them to the toolkits parameter.

How to build Centralstationcrm MCP Agent with another framework

FAQ

What are the differences in Tool Router MCP and Centralstationcrm MCP?

With a standalone Centralstationcrm MCP server, the agents and LLMs can only access a fixed set of Centralstationcrm tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Centralstationcrm and many other apps based on the task at hand, all through a single MCP endpoint.

Can I use Tool Router MCP with LlamaIndex?

Yes, you can. LlamaIndex fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Centralstationcrm tools.

Can I manage the permissions and scopes for Centralstationcrm while using Tool Router?

Yes, absolutely. You can configure which Centralstationcrm scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Centralstationcrm data and credentials are handled as safely as possible.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.