# How to integrate Rentman MCP with Vercel AI SDK v6

```json
{
  "title": "How to integrate Rentman MCP with Vercel AI SDK v6",
  "toolkit": "Rentman",
  "toolkit_slug": "rentman",
  "framework": "Vercel AI SDK",
  "framework_slug": "ai-sdk",
  "url": "https://composio.dev/toolkits/rentman/framework/ai-sdk",
  "markdown_url": "https://composio.dev/toolkits/rentman/framework/ai-sdk.md",
  "updated_at": "2026-03-29T06:47:47.225Z"
}
```

## Introduction

This guide walks you through connecting Rentman to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Rentman agent that can list all crew assignments for this week, show available equipment for project 1234, create new project booking for next month through natural language commands.
This guide will help you understand how to give your Vercel AI SDK agent real control over a Rentman account through Composio's Rentman MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Rentman with

- [OpenAI Agents SDK](https://composio.dev/toolkits/rentman/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/rentman/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/rentman/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/rentman/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/rentman/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/rentman/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/rentman/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/rentman/framework/cli)
- [Google ADK](https://composio.dev/toolkits/rentman/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/rentman/framework/langchain)
- [Mastra AI](https://composio.dev/toolkits/rentman/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/rentman/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/rentman/framework/crew-ai)

## TL;DR

Here's what you'll learn:
- How to set up and configure a Vercel AI SDK agent with Rentman integration
- Using Composio's Tool Router to dynamically load and access Rentman tools
- Creating an MCP client connection using HTTP transport
- Building an interactive CLI chat interface with conversation history management
- Handling tool calls and results within the Vercel AI SDK framework

## What is Vercel AI SDK?

The Vercel AI SDK is a TypeScript library for building AI-powered applications. It provides tools for creating agents that can use external services and maintain conversation state.
Key features include:
- streamText: Core function for streaming responses with real-time tool support
- MCP Client: Built-in support for Model Context Protocol via @ai-sdk/mcp
- Step Counting: Control multi-step tool execution with stopWhen: stepCountIs()
- OpenAI Provider: Native integration with OpenAI models

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

The Rentman MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Rentman account. It provides structured and secure access so your agent can perform Rentman operations on your behalf.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `RENTMAN_DELETE_APPOINTMENT` | Delete Appointment | Tool to delete an appointment by its unique ID. Use when you need to remove an appointment from Rentman. |
| `RENTMAN_DELETE_APPOINTMENTCREW` | Delete Appointmentcrew Item | Tool to delete an appointmentcrew item by its numeric ID. Use when removing an appointment crew assignment. |
| `RENTMAN_DELETE_CONTACT` | Delete Contact | Tool to delete a contact by its ID. Use when you need to remove a contact from Rentman. |
| `RENTMAN_DELETE_CONTACT_PERSON` | Delete contact person | Tool to delete a contact person from Rentman by their numeric ID. Use when you need to permanently remove a contact person from the system. |
| `RENTMAN_DELETE_COST_ITEM` | Delete Cost Item | Tool to delete a cost item in Rentman by its numeric ID. Use when you need to remove a cost record from the system. |
| `RENTMAN_DELETE_CREW_AVAILABILITY` | Delete Crew Availability | Tool to delete a crew availability item by its ID. Use when you need to remove a specific crew availability entry after confirming its ID. |
| `RENTMAN_DELETE_PROJECT_REQUEST` | Delete Project Request | Tool to delete a project request by its ID. Use when you need to remove a project request from Rentman. |
| `RENTMAN_DELETE_PROJECT_REQUEST_EQUIPMENT_ITEM` | Delete Project Request Equipment Item | Tool to delete a project request equipment item by its ID. Use when you need to remove a project request equipment item from Rentman. |
| `RENTMAN_DELETE_TIME_REGISTRATION` | Delete Time Registration | Tool to delete a time registration item in Rentman by its numeric ID. Use when you need to remove a time registration record from the system. |
| `RENTMAN_GET_ACCESSORIES_COLLECTION` | Get Accessories Collection | Tool to retrieve a collection of accessories from Rentman. Use when you need to list or search accessories with optional filtering, sorting, and pagination. |
| `RENTMAN_GET_APPOINTMENT_CREW` | Get Appointment Crew | Tool to retrieve the linked crew members for a specific appointment. Use when you need to get the list of crew assigned to an appointment. |
| `RENTMAN_GET_APPOINTMENTCREW_COLLECTION` | Get Appointmentcrew Collection | Tool to retrieve appointmentcrew collection from Rentman. Use when you need to list appointment crew assignments with optional pagination, sorting, and field filtering. Results are limited to 300 items per request. |
| `RENTMAN_GET_APPOINTMENTS_COLLECTION` | Get Appointments Collection | Tool to retrieve a collection of appointments from Rentman. Use when you need to list or search appointments with optional filtering, sorting, and pagination. |
| `RENTMAN_GET_CONTACT_CONTACTPERSONS` | Get Contact Contactpersons | Tool to retrieve all contactpersons linked to a specific contact in Rentman. Use when you need to get a list of people associated with a contact organization or entity. Returns comprehensive contact person details including names, contact information, and custom fields. |
| `RENTMAN_GET_CONTACT_FILE_FOLDERS` | Get Contact File Folders | Tool to get file folders linked to a contact. Use when you need to retrieve all file folders associated with a specific contact by their ID. |
| `RENTMAN_GET_CONTACT_FILES` | Get Contact Files | Tool to get files linked to a contact. Use when you need to retrieve all files associated with a specific contact by their ID. |
| `RENTMAN_GET_CONTACT_PERSON_FILE_FOLDERS` | Get Contact Person File Folders | Tool to retrieve file folders linked to a contact person in Rentman. Use when you need to get all file folders associated with a specific contact person by their ID. |
| `RENTMAN_GET_CONTACT_PERSON_FILES` | Get Contact Person Files | Tool to retrieve files linked to a contact person in Rentman. Use when you need to get all files associated with a specific contact person by their ID. |
| `RENTMAN_GET_CONTACT_PERSONS` | Get Contact Persons | Tool to retrieve the collection of contact persons from Rentman. Use this when you need to list or search contact persons with optional filtering, pagination, and field selection. |
| `RENTMAN_GET_CONTACTS_COLLECTION` | Get Contacts Collection | Tool to retrieve a collection of contacts from Rentman. Use when you need to fetch contact information with optional filtering and pagination. |
| `RENTMAN_GET_CONTRACT_INVOICELINES` | Get contract invoicelines | Retrieves invoicelines linked to a specific contract. Use when you need to get billing information including VAT amounts (BTW bedrag) for a contract. |
| `RENTMAN_GET_CONTRACT_FILES` | Get Contract Files | Tool to retrieve files linked to a specific contract. Use when you need to get all files associated with a contract ID. |
| `RENTMAN_GET_CONTRACTS_COLLECTION` | Get Contracts Collection | Tool to retrieve a collection of contracts from Rentman. Use when you need to list contracts with optional filtering, pagination, and sorting. Returns contract details including pricing, dates, and associated entities. |
| `RENTMAN_GET_COSTS_COLLECTION` | Get Costs Collection | Tool to retrieve costs collection from Rentman. Use when you need to fetch a list of costs with optional filtering, sorting, and pagination. |
| `RENTMAN_GET_CREW_MEMBER_APPOINTMENTS` | Get Crew Member Appointments | Tool to retrieve appointments for a specific crew member. Use when you need to get the schedule or appointments linked to a crew member by their ID. |
| `RENTMAN_GET_CREW_AVAILABILITY` | Get Crew Availability | Tool to retrieve crew availability records for a specific crew member in Rentman. Use when you need to check availability periods, unavailability, or scheduling information for a crew member. |
| `RENTMAN_GET_CREW_AVAILABILITY_COLLECTION` | Get Crew Availability Collection | Tool to retrieve crew availability collection from Rentman. Use when you need to get information about crew members' availability periods, including their availability status, time periods, and related details. Supports pagination, field selection, and sorting. |
| `RENTMAN_GET_CREW_COLLECTION` | Get Crew Collection | Tool to retrieve crew collection from Rentman. Use when you need to list crew members with optional filtering, pagination, and field selection. |
| `RENTMAN_GET_CREW_FILE_FOLDERS` | Get Crew File Folders | Tool to retrieve file folders linked to a crew member. Use when you need to get the folder structure for organizing files associated with a specific crew member by their ID. |
| `RENTMAN_GET_CREW_FILES` | Get Crew Files | Tool to retrieve files linked to a crew member. Use when you need to get all files associated with a specific crew member by their ID. |
| `RENTMAN_GET_CREW_MEMBER` | Get Crew Member | Tool to retrieve a crew member item by ID from Rentman. Use when you need to fetch detailed information about a specific crew member including contact details, address, and custom fields. |
| `RENTMAN_GET_CREWRATES_COLLECTION` | Get Crewrates Collection | Tool to retrieve crewrates collection from Rentman. Use when you need to fetch crew member rate information with optional filtering, sorting, and pagination. |
| `RENTMAN_GET_CREW_RATES` | Get Crew Rates | Tool to get crew rates linked collection for a specific crew member. Use when you need to retrieve rate information associated with a crew member by their ID. |
| `RENTMAN_GET_EQUIPMENT_ACCESSORIES` | Get Equipment Accessories | Tool to get accessories linked to a specific equipment item. Use when you need to retrieve the list of accessories associated with an equipment itemtype by its ID. |
| `RENTMAN_GET_EQUIPMENT_COLLECTION` | Get equipment collection | Tool to get the equipment collection from Rentman. Use when you need to retrieve a list of equipment items with optional filtering and pagination. |
| `RENTMAN_GET_EQUIPMENT_FILE_FOLDERS` | Get Equipment File Folders | Tool to get file folders linked to equipment. Use when you need to retrieve all file folders associated with a specific equipment item by its ID. |
| `RENTMAN_GET_EQUIPMENT_FILES` | Get Equipment Files | Tool to get files linked to equipment. Use when you need to retrieve all files associated with a specific equipment item by its ID. |
| `RENTMAN_GET_EQUIPMENT_REPAIRS` | Get Equipment Repairs | Tool to retrieve repairs linked to a specific equipment item. Use when you need to fetch repair history or current repairs for equipment by its ID. |
| `RENTMAN_GET_EQUIPMENT_SERIAL_NUMBERS` | Get Equipment Serial Numbers | Tool to retrieve serial numbers linked to a specific equipment item. Use when you need to get all serial numbers associated with an equipment/itemtype ID. |
| `RENTMAN_GET_EQUIPMENT_SETS_CONTENT_COLLECTION` | Get Equipment Sets Content Collection | Tool to retrieve the equipment sets content collection from Rentman. Use when you need to list or query equipment items that belong to sets, including their quantities and relationships. |
| `RENTMAN_GET_EQUIPMENT_SETS_CONTENT` | Get Equipment Sets Content | Tool to get equipment sets content linked collection for a specific equipment item. Use when you need to retrieve the list of equipment items that are part of a set. |
| `RENTMAN_GET_EQUIPMENT_STOCKMOVEMENTS` | Get Equipment Stockmovements | Tool to get stockmovements linked collection for a specific equipment item. Use when you need to retrieve stock movement history for equipment. |
| `RENTMAN_GET_FILES_COLLECTION` | Get Files Collection | Tool to retrieve files collection from Rentman. Use when you need to list or search for files with optional pagination using limit and offset parameters. |
| `RENTMAN_GET_FOLDER_ITEM` | Get Folder Item | Tool to retrieve a folder item by ID from Rentman. Use when you need to get details about a specific folder. |
| `RENTMAN_GET_FOLDERS_COLLECTION` | Get Folders Collection | Tool to retrieve folders collection from Rentman. Use when you need to list all folders or search for specific folders using filters and sorting. Supports pagination with limit and offset parameters. |
| `RENTMAN_GET_INVOICE_FILES` | Get Invoice Files | Tool to retrieve files linked to an invoice in Rentman. Use when you need to get all files associated with a specific invoice by its ID. |
| `RENTMAN_GET_INVOICE_INVOICELINES` | Get Invoice Invoicelines | Tool to retrieve invoicelines linked to a specific invoice. Use when you need to get line item details including VAT amounts (BTW bedrag), prices, and ledger codes for a particular invoice. |
| `RENTMAN_GET_INVOICE_LINES` | Get Invoice Lines | Tool to retrieve invoicelines collection from Rentman. Use when you need to access invoice line items with details like VAT amounts, prices, and ledger codes. Supports pagination (up to 300 items per request), field selection, and sorting. |
| `RENTMAN_GET_INVOICE_PAYMENTS` | Get Invoice Payments | Tool to retrieve payments linked to a specific invoice. Use when you need to get payment records associated with an invoice. |
| `RENTMAN_GET_INVOICES_COLLECTION` | Get Invoices Collection | Tool to retrieve a collection of invoices from Rentman. Use when you need to fetch invoice records with optional pagination, filtering, and field selection. |
| `RENTMAN_GET_LEDGERCODES_COLLECTION` | Get Ledgercodes Collection | Tool to retrieve ledger codes collection from Rentman. Use when you need to fetch ledger code information that defines the type of trade for invoice lines. |
| `RENTMAN_GET_PAYMENTS_COLLECTION` | Get Payments Collection | Tool to retrieve a collection of payments from Rentman. Use when you need to fetch payment records with optional pagination, sorting, and field selection. |
| `RENTMAN_GET_PROJECT_CONTRACTS` | Get Project Contracts | Tool to retrieve contracts linked to a specific project from Rentman. Use when you need to fetch all contracts associated with a project by its ID. |
| `RENTMAN_GET_PROJECT_COSTS` | Get Project Costs | Tool to retrieve costs linked to a specific project from Rentman. Use when you need to fetch all cost items associated with a particular project by its ID. |
| `RENTMAN_GET_PROJECTCREW_COLLECTION` | Get Projectcrew Collection | Tool to retrieve projectcrew collection from Rentman. Use when you need to list project crew assignments with optional filtering, pagination, and field selection. |
| `RENTMAN_GET_PROJECT_EQUIPMENT_COLLECTION` | Get Project Equipment Collection | Tool to retrieve a collection of project equipment from Rentman. Use when you need to list or search project equipment items with optional filtering, sorting, and pagination. |
| `RENTMAN_GET_PROJECTEQUIPMENTGROUP_COLLECTION` | Get Projectequipmentgroup Collection | Tool to retrieve projectequipmentgroup collection from Rentman. Use when you need to list project equipment groups with optional pagination, sorting, and field filtering. Results are limited to 300 items per request. |
| `RENTMAN_GET_PROJECT_EQUIPMENT_GROUP_PROJECT_EQUIPMENT` | Get project equipment group project equipment | Tool to get projectequipment linked collection for a specific projectequipmentgroup. Use when you need to retrieve project equipment items associated with a project equipment group by its ID. |
| `RENTMAN_GET_PROJECT_FILE_FOLDERS` | Get Project File Folders | Tool to retrieve file folders linked to a specific project. Use when you need to get all file folder structures associated with a project by its ID. |
| `RENTMAN_GET_PROJECT_FILES` | Get Project Files | Tool to retrieve files linked to a project. Use when you need to get all files associated with a specific project by its ID. |
| `RENTMAN_GET_PROJECT_FUNCTION_GROUP_PROJECT_FUNCTIONS` | Get Project Function Group Project Functions | Tool to get project functions linked to a specific project function group in Rentman. Use when you need to retrieve the custom linked collection of project functions for a given project function group ID. |
| `RENTMAN_GET_PROJECT_FUNCTION_GROUPS_COLLECTION` | Get Project Function Groups Collection | Tool to retrieve a collection of project function groups from Rentman. Use when you need to fetch project function group information with optional filtering, pagination, and field selection. |
| `RENTMAN_GET_PROJECT_FUNCTION_CREW` | Get Project Function Crew | Tool to get project crew linked to a specific project function. Use when you need to retrieve crew members assigned to a project function by its ID. |
| `RENTMAN_GET_PROJECTFUNCTION_PROJECTVEHICLES` | Get Projectfunction Projectvehicles | Tool to retrieve project vehicles linked to a project function. Use when you need to get all vehicles associated with a specific project function by its ID. |
| `RENTMAN_GET_PROJECTFUNCTIONS_COLLECTION` | Get Projectfunctions Collection | Tool to retrieve a collection of projectfunctions from Rentman. Use when you need to fetch projectfunction information with optional filtering and pagination. |
| `RENTMAN_GET_PROJECT_CREW` | Get Project Crew | Tool to get project crew custom linked collection for a specific project. Use when you need to retrieve crew members assigned to a project by its ID. |
| `RENTMAN_GET_PROJECT_EQUIPMENT` | Get Project Equipment | Tool to retrieve all equipment items linked to a specific project in Rentman. Use when you need to get the equipment planning details for a particular project, including quantities, pricing, and planning periods. |
| `RENTMAN_GET_PROJECT_PROJECTEQUIPMENTGROUP` | Get project projectequipmentgroup | Tool to get projectequipmentgroup linked collection for a specific project. Use when you need to retrieve project equipment groups associated with a project by its ID. |
| `RENTMAN_GET_PROJECT_FUNCTION_GROUPS_FOR_PROJECT` | Get Project Function Groups For Project | Tool to retrieve project function groups linked to a specific project in Rentman. Use when you need to fetch project function groups associated with a particular project ID. |
| `RENTMAN_GET_PROJECT_PROJECTFUNCTIONS` | Get Project Projectfunctions | Tool to retrieve projectfunctions linked to a specific project. Use when you need to fetch project function information for a given project ID. |
| `RENTMAN_GET_PROJECT_PROJECTVEHICLES` | Get Project Projectvehicles | Tool to retrieve project vehicles linked to a project. Use when you need to get all vehicles associated with a specific project by its ID. |
| `RENTMAN_GET_PROJECT_QUOTES` | Get Project Quotes | Tool to retrieve quotes linked to a project. Use when you need to get all quotes associated with a specific project by its ID. |
| `RENTMAN_GET_PROJECT_REQUEST_EQUIPMENT` | Get Project Request Equipment | Tool to retrieve projectrequestequipment linked to a specific project request in Rentman. Use when you need to get equipment items associated with a project request. |
| `RENTMAN_GET_PROJECT_REQUEST_EQUIPMENT_COLLECTION` | Get Project Request Equipment Collection | Tool to retrieve project request equipment collection from Rentman. Use when you need to list project request equipment items with optional pagination, sorting, and field filtering. Results are limited to 300 items per request. |
| `RENTMAN_GET_PROJECT_REQUESTS_COLLECTION` | Get Project Requests Collection | Tool to retrieve a collection of project requests from Rentman. Use when you need to fetch project request information with optional pagination. |
| `RENTMAN_GET_PROJECTS_COLLECTION` | Get Projects Collection | Tool to retrieve a collection of projects from Rentman. Use when you need to fetch project information with optional filtering and pagination. |
| `RENTMAN_GET_PROJECT_SUBPROJECTS` | Get Project Subprojects | Tool to retrieve subprojects linked to a specific project from Rentman. Use when you need to fetch all subproject items associated with a project by its ID. |
| `RENTMAN_GET_PROJECTTYPES_COLLECTION` | Get Projecttypes Collection | Tool to retrieve a collection of project types from Rentman. Use when you need to fetch project type information with optional filtering and pagination. |
| `RENTMAN_GET_PROJECTVEHICLES_COLLECTION` | Get Projectvehicles Collection | Tool to retrieve projectvehicles collection from Rentman. Use when you need to list project vehicles with optional filtering, pagination, and field selection. |
| `RENTMAN_GET_QUOTE_FILES` | Get Quote Files | Tool to get files linked to a quote. Use when you need to retrieve all files associated with a specific quote by its ID. |
| `RENTMAN_GET_QUOTE_INVOICELINES` | Get quote invoicelines | Retrieves invoicelines linked to a specific quote. Use when you need to get billing information including VAT amounts (BTW bedrag) for a quote. |
| `RENTMAN_GET_QUOTES_COLLECTION` | Get Quotes Collection | Tool to retrieve a collection of quotes from Rentman. Use when you need to fetch quote information with optional pagination. |
| `RENTMAN_GET_RATEFACTORS_COLLECTION` | Get Ratefactors Collection | Tool to retrieve a collection of ratefactors from Rentman. Use when you need to fetch ratefactor information with optional filtering and pagination. |
| `RENTMAN_GET_RATE_RATEFACTORS` | Get Rate Ratefactors | Tool to retrieve the ratefactors custom linked collection for a specific rate. Use when you need to get the list of ratefactors associated with a rate. |
| `RENTMAN_GET_RATES_COLLECTION` | Get Rates Collection | Tool to retrieve rates collection from Rentman. Use when you need to fetch rate information with optional filtering, sorting, and pagination. |
| `RENTMAN_GET_REPAIR_FILE_FOLDERS` | Get Repair File Folders | Tool to get file folders linked to a repair. Use when you need to retrieve all file folders associated with a specific repair by its ID. |
| `RENTMAN_GET_REPAIR_FILES` | Get Repair Files | Tool to get files linked to a repair. Use when you need to retrieve all files associated with a specific repair item by its ID. |
| `RENTMAN_GET_REPAIRS_COLLECTION` | Get Repairs Collection | Tool to retrieve a collection of repairs from Rentman. Use when you need to fetch repair records with optional filtering and pagination. |
| `RENTMAN_GET_SERIAL_NUMBER_FILE_FOLDERS` | Get Serial Number File Folders | Tool to get file folders linked to a serial number. Use when you need to retrieve all file folders associated with a specific serial number by its ID. |
| `RENTMAN_GET_SERIAL_NUMBER_FILES` | Get Serial Number Files | Tool to get files linked to a serial number. Use when you need to retrieve all files associated with a specific serial number item by its ID. |
| `RENTMAN_GET_SERIALNUMBERS_COLLECTION` | Get Serialnumbers Collection | Tool to retrieve a collection of serialnumbers from Rentman. Use when you need to fetch serialnumber information with optional filtering and pagination. |
| `RENTMAN_GET_STATUSES_COLLECTION` | Get Statuses Collection | Tool to retrieve a collection of statuses from Rentman. Use when you need to fetch status information with optional filtering and pagination. |
| `RENTMAN_GET_STOCKLOCATIONS_COLLECTION` | Get Stocklocations Collection | Tool to retrieve stock locations collection from Rentman. Use when you need to fetch information about warehouse or storage locations with optional filtering and pagination. |
| `RENTMAN_GET_STOCKMOVEMENTS_COLLECTION` | Get Stockmovements Collection | Tool to retrieve the stock movements collection from Rentman. Use when you need to fetch a list of stock movements with optional filtering, sorting, and pagination. |
| `RENTMAN_GET_SUBPROJECT_FILE_FOLDERS` | Get Subproject File Folders | Tool to get file folders linked to a subproject. Use when you need to retrieve all file folders associated with a specific subproject by its ID. |
| `RENTMAN_GET_SUBPROJECT_PROJECT_CREW` | Get Subproject Project Crew | Tool to get project crew custom linked collection for a specific subproject. Use when you need to retrieve crew members assigned to a subproject by its ID. |
| `RENTMAN_GET_SUBPROJECT_PROJECT_EQUIPMENT` | Get Subproject Project Equipment | Tool to retrieve project equipment collection from a specific subproject in Rentman. Use when you need to list all equipment items or search for specific equipment associated with a subproject. Supports pagination with limit and offset parameters. |
| `RENTMAN_GET_SUBPROJECT_PROJECTEQUIPMENTGROUP` | Get subproject projectequipmentgroup | Tool to get projectequipmentgroup linked collection for a specific subproject. Use when you need to retrieve project equipment groups associated with a subproject by its ID. |
| `RENTMAN_GET_PROJECT_FUNCTION_GROUPS_FOR_SUBPROJECT` | Get Project Function Groups For Subproject | Tool to retrieve project function groups linked to a specific subproject in Rentman. Use when you need to fetch project function groups associated with a particular subproject ID. |
| `RENTMAN_GET_SUBPROJECT_PROJECTVEHICLES` | Get Subproject Projectvehicles | Tool to retrieve project vehicles linked to a subproject. Use when you need to get all vehicles associated with a specific subproject by its ID. |
| `RENTMAN_GET_SUBPROJECTS_COLLECTION` | Get Subprojects Collection | Tool to retrieve subprojects collection from Rentman. Use when you need to list all subprojects or search for specific subprojects using filters and sorting. Supports pagination with limit and offset parameters. |
| `RENTMAN_GET_SUBRENTAL_EQUIPMENT_COLLECTION` | Get Subrental Equipment Collection | Tool to retrieve a collection of subrental equipment items from Rentman. Use when you need to fetch subrental equipment information with optional filtering and pagination. |
| `RENTMAN_GET_SUBRENTAL_EQUIPMENT_GROUP` | Get Subrental Equipment Group | Tool to get subrental equipment group custom linked collection from Rentman. Use when you need to retrieve equipment groups associated with a specific subrental item. |
| `RENTMAN_GET_SUBRENTAL_EQUIPMENT_GROUP_COLLECTION` | Get Subrental Equipment Group Collection | Tool to retrieve the complete collection of subrental equipment groups from Rentman. Use when you need to fetch all subrental equipment groups with optional filtering and pagination. |
| `RENTMAN_GET_SUBRENTAL_EQUIPMENT_GROUP_SUBRENTAL_EQUIPMENT` | Get subrental equipment group subrental equipment | Tool to get subrentalequipment custom linked collection for a specific subrentalequipmentgroup. Use when you need to retrieve subrental equipment items associated with a subrental equipment group by its ID. |
| `RENTMAN_GET_SUBRENTAL_FILE_FOLDERS` | Get Subrental File Folders | Tool to get file folders linked to a subrental. Use when you need to retrieve the collection of file folders associated with a specific subrental by its ID. |
| `RENTMAN_GET_SUBRENTAL_FILES` | Get Subrental Files | Tool to get files linked to a subrental. Use when you need to retrieve all files associated with a specific subrental item by its ID. |
| `RENTMAN_GET_SUBRENTALS_COLLECTION` | Get Subrentals Collection | Tool to get subrentals collection from Rentman. Use when you need to retrieve a list of subrentals with optional pagination. |
| `RENTMAN_GET_SUBRENTAL_SUBRENTALEQUIPMENT` | Get Subrental Subrentalequipment | Tool to retrieve subrentalequipment linked to a specific subrental in Rentman. Use when you need to get a list of equipment items associated with a subrental. |
| `RENTMAN_GET_TAX_CLASSES_COLLECTION` | Get Tax Classes Collection | Tool to retrieve a collection of tax classes from Rentman. Use when you need to fetch tax class information with optional filtering and pagination. |
| `RENTMAN_GET_TIMEREGISTRATION_ACTIVITIES` | Get Timeregistration Activities | Tool to retrieve all timeregistrationactivities linked to a specific timeregistration in Rentman. Use when you need to get details about activities associated with a time registration entry. Returns comprehensive activity details including duration, description, and project function references. |
| `RENTMAN_GET_TIMEREGISTRATION_ACTIVITIES_COLLECTION` | Get Timeregistration Activities Collection | Tool to retrieve a collection of timeregistration activities from Rentman. Use when you need to fetch time registration activity records with optional pagination and filtering. |
| `RENTMAN_GET_TIMEREGISTRATION_COLLECTION` | Get Timeregistration Collection | Tool to retrieve a collection of timeregistrations from Rentman. Use when you need to fetch time registration records with optional pagination. |
| `RENTMAN_GET_TIME_REGISTRATION_FILES` | Get Time Registration Files | Tool to get files linked to a time registration. Use when you need to retrieve all files associated with a specific time registration entry by its ID. |
| `RENTMAN_GET_VEHICLE_FILE_FOLDERS` | Get Vehicle File Folders | Tool to get file folders linked to a vehicle. Use when you need to retrieve all file folders associated with a specific vehicle by their ID. |
| `RENTMAN_GET_VEHICLE_FILES` | Get Vehicle Files | Tool to get files linked to a vehicle. Use when you need to retrieve all files associated with a specific vehicle by its ID. |
| `RENTMAN_GET_VEHICLES_COLLECTION` | Get Vehicles Collection | Tool to retrieve a collection of vehicles from Rentman. Use when you need to fetch vehicle information with optional filtering and pagination. |
| `RENTMAN_LIST_ACTUALCONTENT` | List Actualcontent | Tool to get actualcontent collection from Rentman. Use when you need to retrieve the actual content of serialized physical combinations with pagination support. |
| `RENTMAN_LIST_EQUIPMENTASSIGNEDSERIALS_COLLECTION` | List Equipmentassignedserials Collection | Tool to retrieve serial numbers assigned to serialized physical combinations from Rentman. Use when you need to fetch manually assigned serial numbers (not actual content) from the serial numbers tab. |
| `RENTMAN_LIST_FACTORGROUPS` | List Factorgroups | Tool to retrieve factorgroups collection from Rentman. Use when you need to fetch all factor groups with optional filtering and pagination. |
| `RENTMAN_LIST_FACTORGROUPS_FACTORS` | List Factorgroups Factors | Tool to retrieve the factors collection for a specific factorgroup. Use when you need to get the list of factors associated with a factorgroup. |
| `RENTMAN_LIST_FACTORS` | List Factors | Tool to retrieve a collection of factors from Rentman. Use when you need to fetch factor information with optional filtering and pagination. |
| `RENTMAN_LIST_FILE_FOLDERS` | List File Folders | Tool to retrieve file folders collection from Rentman. Use when you need to list folders that files can be organized into, with optional pagination. |
| `RENTMAN_LIST_LEAVE_MUTATIONS` | List Leave Mutations | Tool to retrieve leave mutations collection from Rentman. Use when you need to list leave mutations and their information. Leave mutations are immutable records, so any mistakes should be corrected by creating a new opposite mutation. |
| `RENTMAN_LIST_LEAVE_REQUESTS` | List Leave Requests | Tool to retrieve leave requests collection from Rentman. Use when you need to work with leave requests and their information such as approval status, reviewer, and requested dates. |
| `RENTMAN_LIST_LEAVE_REQUEST_TIMEREGISTRATION` | List Leave Request Timeregistration | Tool to get timeregistration collection for a specific leave request. Use when you need to retrieve time registrations linked to a leave request. |
| `RENTMAN_LIST_LEAVE_TYPES` | List Leave Types | Tool to retrieve leave types collection from Rentman. Use when you need to work with leave types and their information, including properties like availability impact and approval requirements. |
| `RENTMAN_LIST_SERIALNUMBER_ACTUALCONTENT` | List Serialnumber Actualcontent | Tool to retrieve the actualcontent collection for a specific serialnumber item. Use when you need to get all actualcontent entries associated with a serialnumber ID. |
| `RENTMAN_LIST_SERIALNUMBER_EQUIPMENT_ASSIGNED_SERIALS` | List Serialnumber Equipment Assigned Serials | Tool to retrieve equipmentassignedserials collection for a specific serialnumber item. Use when you need to get all equipment assigned serials associated with a serialnumber ID. |
| `RENTMAN_LIST_STOCKLOCATIONS_VEHICLES` | List Stocklocations Vehicles | Tool to retrieve vehicles collection for a stocklocation. Use when you need to get all vehicles associated with a specific stocklocation by its ID. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Rentman MCP server is an implementation of the Model Context Protocol that connects your AI agent to Rentman. It provides structured and secure access so your agent can perform Rentman operations on your behalf through a secure, permission-based interface.
With Composio's managed implementation, you don't have to create your own developer app. For production, if you're building an end product, we recommend using your own credentials. The managed server helps you prototype fast and go from 0-1 faster.

## Step-by-step Guide

### 1. Prerequisites

Before you begin, make sure you have:
- Node.js and npm installed
- A Composio account with API key
- An OpenAI API key

### 1. Getting API Keys for OpenAI and Composio

OpenAI API Key
- Go to the [OpenAI dashboard](https://platform.openai.com/settings/organization/api-keys) and create an API key. You'll need credits to use the models, or you can connect to another model provider.
- Keep the API key safe.
Composio API Key
- Log in to the [Composio dashboard](https://dashboard.composio.dev?utm_source=toolkits&utm_medium=framework_docs).
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.

### 2. Install required dependencies

First, install the necessary packages for your project.
What you're installing:
- @ai-sdk/openai: Vercel AI SDK's OpenAI provider
- @ai-sdk/mcp: MCP client for Vercel AI SDK
- @composio/core: Composio SDK for tool integration
- ai: Core Vercel AI SDK
- dotenv: Environment variable management
```bash
npm install @ai-sdk/openai @ai-sdk/mcp @composio/core ai dotenv
```

### 3. Set up environment variables

Create a .env file in your project root.
What's needed:
- OPENAI_API_KEY: Your OpenAI API key for GPT model access
- COMPOSIO_API_KEY: Your Composio API key for tool access
- COMPOSIO_USER_ID: A unique identifier for the user session
```bash
OPENAI_API_KEY=your_openai_api_key_here
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_user_id_here
```

### 4. Import required modules and validate environment

What's happening:
- We're importing all necessary libraries including Vercel AI SDK's OpenAI provider and Composio
- The dotenv/config import automatically loads environment variables
- The MCP client import enables connection to Composio's tool server
```typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});
```

### 5. Create Tool Router session and initialize MCP client

What's happening:
- We're creating a Tool Router session that gives your agent access to Rentman tools
- The create method takes the user ID and specifies which toolkits should be available
- The returned mcp object contains the URL and authentication headers needed to connect to the MCP server
- This session provides access to all Rentman-related tools through the MCP protocol
```typescript
async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["rentman"],
  });

  const mcpUrl = session.mcp.url;
```

### 6. Connect to MCP server and retrieve tools

What's happening:
- We're creating an MCP client that connects to our Composio Tool Router session via HTTP
- The mcp.url provides the endpoint, and mcp.headers contains authentication credentials
- The type: "http" is important - Composio requires HTTP transport
- tools() retrieves all available Rentman tools that the agent can use
```typescript
const mcpClient = await createMCPClient({
  transport: {
    type: "http",
    url: mcpUrl,
    headers: session.mcp.headers, // Authentication headers for the Composio MCP server
  },
});

const tools = await mcpClient.tools();
```

### 7. Initialize conversation and CLI interface

What's happening:
- We initialize an empty messages array to maintain conversation history
- A readline interface is created to accept user input from the command line
- Instructions are displayed to guide the user on how to interact with the agent
```typescript
let messages: ModelMessage[] = [];

console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log(
  "Ask any questions related to rentman, like summarize my last 5 emails, send an email, etc... :)))\n",
);

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  prompt: "> ",
});

rl.prompt();
```

### 8. Handle user input and stream responses with real-time tool feedback

What's happening:
- We use streamText instead of generateText to stream responses in real-time
- toolChoice: "auto" allows the model to decide when to use Rentman tools
- stopWhen: stepCountIs(10) allows up to 10 steps for complex multi-tool operations
- onStepFinish callback displays which tools are being used in real-time
- We iterate through the text stream to create a typewriter effect as the agent responds
- The complete response is added to conversation history to maintain context
- Errors are caught and displayed with helpful retry suggestions
```typescript
rl.on("line", async (userInput: string) => {
  const trimmedInput = userInput.trim();

  if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
    console.log("\nGoodbye!");
    rl.close();
    process.exit(0);
  }

  if (!trimmedInput) {
    rl.prompt();
    return;
  }

  messages.push({ role: "user", content: trimmedInput });
  console.log("\nAgent is thinking...\n");

  try {
    const stream = streamText({
      model: openai("gpt-5"),
      messages,
      tools,
      toolChoice: "auto",
      stopWhen: stepCountIs(10),
      onStepFinish: (step) => {
        for (const toolCall of step.toolCalls) {
          console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
```

## Complete Code

```typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});

async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["rentman"],
  });

  const mcpUrl = session.mcp.url;

  const mcpClient = await createMCPClient({
    transport: {
      type: "http",
      url: mcpUrl,
      headers: session.mcp.headers, // Authentication headers for the Composio MCP server
    },
  });

  const tools = await mcpClient.tools();

  let messages: ModelMessage[] = [];

  console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
  console.log(
    "Ask any questions related to rentman, like summarize my last 5 emails, send an email, etc... :)))\n",
  );

  const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    prompt: "> ",
  });

  rl.prompt();

  rl.on("line", async (userInput: string) => {
    const trimmedInput = userInput.trim();

    if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
      console.log("\nGoodbye!");
      rl.close();
      process.exit(0);
    }

    if (!trimmedInput) {
      rl.prompt();
      return;
    }

    messages.push({ role: "user", content: trimmedInput });
    console.log("\nAgent is thinking...\n");

    try {
      const stream = streamText({
        model: openai("gpt-5"),
        messages,
        tools,
        toolChoice: "auto",
        stopWhen: stepCountIs(10),
        onStepFinish: (step) => {
          for (const toolCall of step.toolCalls) {
            console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
```

## Conclusion

You've successfully built a Rentman agent using the Vercel AI SDK with streaming capabilities! This implementation provides a powerful foundation for building AI applications with natural language interfaces and real-time feedback.
Key features of this implementation:
- Real-time streaming responses for a better user experience with typewriter effect
- Live tool execution feedback showing which tools are being used as the agent works
- Dynamic tool loading through Composio's Tool Router with secure authentication
- Multi-step tool execution with configurable step limits (up to 10 steps)
- Comprehensive error handling for robust agent execution
- Conversation history maintenance for context-aware responses
You can extend this further by adding custom error handling, implementing specific business logic, or integrating additional Composio toolkits to create multi-app workflows.

## How to build Rentman MCP Agent with another framework

- [OpenAI Agents SDK](https://composio.dev/toolkits/rentman/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/rentman/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/rentman/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/rentman/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/rentman/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/rentman/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/rentman/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/rentman/framework/cli)
- [Google ADK](https://composio.dev/toolkits/rentman/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/rentman/framework/langchain)
- [Mastra AI](https://composio.dev/toolkits/rentman/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/rentman/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/rentman/framework/crew-ai)

## Related Toolkits

- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Notion](https://composio.dev/toolkits/notion) - Notion is a collaborative workspace for notes, docs, wikis, and tasks. It streamlines team knowledge, project tracking, and workflow customization in one place.
- [Airtable](https://composio.dev/toolkits/airtable) - Airtable combines the flexibility of spreadsheets with the power of a database for easy project and data management. Teams use Airtable to organize, track, and collaborate with custom views and automations.
- [Asana](https://composio.dev/toolkits/asana) - Asana is a collaborative work management platform for teams to organize and track projects. It streamlines teamwork, boosts productivity, and keeps everyone aligned on goals.
- [Google Tasks](https://composio.dev/toolkits/googletasks) - Google Tasks is a to-do list and task management tool integrated into Gmail and Google Calendar. It helps you organize, track, and complete tasks across your Google ecosystem.
- [Linear](https://composio.dev/toolkits/linear) - Linear is a modern issue tracking and project planning tool for fast-moving teams. It helps streamline workflows, organize projects, and boost productivity.
- [Jira](https://composio.dev/toolkits/jira) - Jira is Atlassian’s platform for bug tracking, issue tracking, and agile project management. It helps teams organize work, prioritize tasks, and deliver projects efficiently.
- [Clickup](https://composio.dev/toolkits/clickup) - ClickUp is an all-in-one productivity platform for managing tasks, docs, goals, and team collaboration. It streamlines project workflows so teams can work smarter and stay organized in one place.
- [Monday](https://composio.dev/toolkits/monday) - Monday.com is a customizable work management platform for project planning and collaboration. It helps teams organize tasks, automate workflows, and track progress in real time.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agiled](https://composio.dev/toolkits/agiled) - Agiled is an all-in-one business management platform for CRM, projects, and finance. It helps you streamline workflows, consolidate client data, and manage business processes in one place.
- [Ascora](https://composio.dev/toolkits/ascora) - Ascora is a cloud-based field service management platform for service businesses. It streamlines scheduling, invoicing, and customer operations in one place.
- [Basecamp](https://composio.dev/toolkits/basecamp) - Basecamp is a project management and team collaboration tool by 37signals. It helps teams organize tasks, share files, and communicate efficiently in one place.
- [Beeminder](https://composio.dev/toolkits/beeminder) - Beeminder is an online goal-tracking platform that uses monetary pledges to keep you motivated. Stay accountable and hit your targets with real financial incentives.
- [Boxhero](https://composio.dev/toolkits/boxhero) - Boxhero is a cloud-based inventory management platform for SMBs, offering real-time updates, barcode scanning, and team collaboration. It helps businesses streamline stock tracking and analytics for smarter inventory decisions.
- [Breathe HR](https://composio.dev/toolkits/breathehr) - Breathe HR is cloud-based HR software for SMEs to manage employee data, absences, and performance. It simplifies HR admin, making it easy to keep employee records accurate and up to date.
- [Breeze](https://composio.dev/toolkits/breeze) - Breeze is a project management platform designed to help teams plan, track, and collaborate on projects. It streamlines workflows and keeps everyone on the same page.
- [Bugherd](https://composio.dev/toolkits/bugherd) - Bugherd is a visual feedback and bug tracking tool for websites. It helps teams and clients report website issues directly on live sites for faster fixes.
- [Canny](https://composio.dev/toolkits/canny) - Canny is a platform for managing customer feedback and feature requests. It helps teams prioritize product decisions based on real user insights.
- [Chmeetings](https://composio.dev/toolkits/chmeetings) - Chmeetings is a church management platform for events, members, donations, and volunteers. It streamlines church operations and improves community engagement.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Rentman MCP?

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

### Can I use Tool Router MCP with Vercel AI SDK v6?

Yes, you can. Vercel AI SDK v6 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 Rentman tools.

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

Yes, absolutely. You can configure which Rentman 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 Rentman data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
