Enables CrewAI agents to interact with Extend's platform for managing virtual cards, viewing credit cards, and checking transactions.
Offers toolkit integration with LangChain, supporting virtual card and spend management functionalities through Extend's API endpoints.
Provides tools for OpenAI's frameworks to interact with Extend APIs, enabling agents to manage virtual cards, credit cards, and transactions.
Extend AI Toolkit
Overview
The Extend AI Toolkit provides a python based implementation of tools to integrate with Extend APIs for multiple AI frameworks including Anthropic's Model Context Protocol (MCP), OpenAI, LangChain, and CrewAI. It enables users to delegate certain actions in the spend management flow to AI agents or MCP-compatible clients like Claude desktop.
These tools are designed for existing Extend users with API keys. If you are not signed up with Extend and would like to learn more about our modern, easy-to-use virtual card and spend management platform for small- and medium-sized businesses, you can check us out at paywithextend.com.
Features
- Multiple AI Framework Support: Works with Anthropic Model Context Protocol, OpenAI Agents, LangChain LangGraph & ReAct, and CrewAI frameworks
- Comprehensive Tool Set: Supports all of Extend's major API functionalities, spanning our Credit Card, Virtual Card, Transaction & Expense Management endpoints
Installation
You don't need this source code unless you want to modify the package. If you just want to use the package run:
Requirements
- Python: Version 3.10 or higher
- Extend API Key: Sign up at paywithextend.com to obtain an API key
- Framework-specific Requirements:
- LangChain:
langchain
andlangchain-openai
packages - OpenAI:
openai
package - CrewAI:
crewai
package - Anthropic:
anthropic
package (for Claude)
- LangChain:
Configuration
The library needs to be configured with your Extend API key and API, either through environment variables or command line arguments:
or via environment variables:
Available Tools
The toolkit provides a comprehensive set of tools organized by functionality:
Virtual Cards
get_virtual_cards
: Fetch virtual cards with optional filtersget_virtual_card_detail
: Get detailed information about a specific virtual card
Credit Cards
get_credit_cards
: List all credit cardsget_credit_card_detail
: Get detailed information about a specific credit card
Transactions
get_transactions
: Fetch transactions with various filtersget_transaction_detail
: Get detailed information about a specific transactionupdate_transaction_expense_data
: Update expense-related data for a transaction
Expense Management
get_expense_categories
: List all expense categoriesget_expense_category
: Get details of a specific expense categoryget_expense_category_labels
: Get labels for an expense categorycreate_expense_category
: Create a new expense categorycreate_expense_category_label
: Add a label to an expense categoryupdate_expense_category
: Modify an existing expense categorycreate_receipt_attachment
: Upload a receipt (and optionally attach to a transaction)automatch_receipts
: Initiate async job to automatch uploaded receipts to transactionsget_automatch_status
: Get the status of an automatch jobsend_receipt_reminder
: Send a reminder (via email) for a transaction missing a receipt
Usage Examples
Model Context Protocol
The toolkit provides resources in the extend_ai_toolkit.modelcontextprotocol
package to help you build an MCP server.
Development
Test Extend MCP server locally using MCP Inspector:
Claude Desktop Integration
Add this tool as an MCP server to Claude Desktop by editing the config file:
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
if you want to use the create_receipt_attachment tool with claude desktop you'll need to install the filesystem mcp server via npm install @modelcontextprotocol/server-filesystem
add then add to the config file as well.
Please note: due to current limitations images uploaded directly to the Claude Desktop cannot be uploaded to Extend due to the fact that the Claude Desktop app does not have access to the underlying image data. This is why the Filesystem MCP Server is necessary.
With the addition of Filesystem, you can setup a dedicated folder for receipts, and tell Claude it to upload the receipt and automatch it to the most likely transaction. Alternatively, if you know the transaction you want to attach the receipt to then you can tell Claude to upload the receipt for that transaction (and skip the automatch process.
Remote Execution
You can also run your server remotely and communicate via SSE transport:
and optionally connect using the MCP terminal client:
OpenAI
LangChain
CrewAI
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
An MCP server that enables AI agents to interact with Extend's spend management APIs, allowing virtual card management, transaction tracking, and receipt processing through natural language.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that lets AI assistants interact with your Lunchmoney data, enabling natural language queries about transactions, budgets, and spending patterns.Last updated -438TypeScriptMIT License
- -securityAlicense-qualityAn MCP server that helps AI assistants manage expense-sharing for social events, enabling the creation of gatherings, tracking of expenses, and calculation of fair reimbursements among participants.Last updated -PythonApache 2.0
Fewsats MCP Serverofficial
AsecurityFlicenseAqualityAn MCP server that integrates with Fewsats allowing AI agents to securely purchase anything by retrieving balances, accessing payment methods, and processing payments.Last updated -411Python- -security-license-qualityA specialized MCP server that enables AI agents to interact with Reddit, including reading posts, creating content, and managing subreddit configurations.Last updated -311TypeScript