扩展AI工具包
概述
Extend AI 工具包提供了基于 Python 的工具实现,可与多种 AI 框架的 Extend API 集成,包括 Anthropic 的模型上下文协议 (MCP) 、 OpenAI 、 LangChain和CrewAI 。它允许用户将支出管理流程中的某些操作委托给 AI 代理或与 MCP 兼容的客户端,例如 Claude 桌面。
这些工具专为拥有 API 密钥的现有 Extend 用户设计。如果您尚未注册 Extend,但想了解更多关于我们面向中小型企业的现代化、易于使用的虚拟卡和支出管理平台的信息,请访问paywithextend.com 。
特征
- 支持多种 AI 框架:可与 Anthropic Model Context Protocol、OpenAI Agents、LangChain LangGraph & ReAct 和 CrewAI 框架配合使用
- 全面的工具集:支持 Extend 的所有主要 API 功能,涵盖我们的信用卡、虚拟卡、交易和费用管理端点
安装
除非您想修改该包,否则不需要此源代码。如果您只想使用该包,请运行:
要求
- Python :3.10 或更高版本
- 扩展 API 密钥:在paywithextend.com注册以获取 API 密钥
- 框架特定要求:
- LangChain:
langchain
和langchain-openai
包 - OpenAI:
openai
包 - CrewAI:
crewai
软件包 - Anthropic:
anthropic
包(适用于 Claude)
- LangChain:
配置
该库需要通过环境变量或命令行参数使用您的扩展 API 密钥和 API 进行配置:
或通过环境变量:
可用工具
该工具包提供了一套按功能组织的综合工具:
虚拟卡
get_virtual_cards
:使用可选过滤器获取虚拟卡get_virtual_card_detail
:获取特定虚拟卡的详细信息
信用卡
get_credit_cards
:列出所有信用卡get_credit_card_detail
:获取特定信用卡的详细信息
交易
get_transactions
:使用各种过滤器获取交易get_transaction_detail
:获取特定交易的详细信息update_transaction_expense_data
:更新交易的费用相关数据
费用管理
get_expense_categories
:列出所有费用类别get_expense_category
:获取特定费用类别的详细信息get_expense_category_labels
:获取费用类别的标签create_expense_category
:创建一个新的费用类别create_expense_category_label
:为费用类别添加标签update_expense_category
:修改现有的费用类别create_receipt_attachment
:上传收据(并可选择附加到交易)automatch_receipts
:启动异步作业以自动将上传的收据与交易进行匹配get_automatch_status
:获取自动匹配作业的状态send_receipt_reminder
:针对缺少收据的交易发送提醒(通过电子邮件)
使用示例
模型上下文协议
该工具包在extend_ai_toolkit.modelcontextprotocol
包中提供了资源,以帮助您构建MCP服务器。
发展
使用 MCP Inspector 在本地测试扩展 MCP 服务器:
Claude 桌面集成
通过编辑配置文件将此工具作为 MCP 服务器添加到 Claude Desktop:
在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
如果您想将 create_receipt_attachment 工具与 claude 桌面一起使用,您需要通过npm install @modelcontextprotocol/server-filesystem
add 安装文件系统 mcp 服务器,然后将其添加到配置文件中。
请注意:由于目前的限制,直接上传到 Claude Desktop 的图像无法上传到 Extend,因为 Claude Desktop 应用无法访问底层图像数据。因此, Filesystem MCP Server是必不可少的。
通过添加文件系统,您可以设置一个专门的收据文件夹,并告诉 Claude 上传该收据并将其自动匹配到最可能的交易。或者,如果您知道要将收据附加到哪笔交易,则可以告诉 Claude 上传该交易的收据(并跳过自动匹配过程)。
远程执行
您还可以远程运行服务器并通过 SSE 传输进行通信:
并可选择使用 MCP 终端客户端进行连接:
OpenAI
朗链
CrewAI
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
MCP 服务器使 AI 代理能够与 Extend 的支出管理 API 进行交互,从而允许通过自然语言进行虚拟卡管理、交易跟踪和收据处理。
Related MCP Servers
- -securityAlicense-qualityMCP server enabling AI agents to programmatically connect to and control Apache Superset instances, allowing users to manage dashboards, charts, databases, datasets, and run SQL queries through natural language interactions.Last updated -75PythonMIT License
- -securityFlicense-qualityAn MCP server that enables AI assistants to interact with Flutterwave payment services, providing tools for transaction management, payment link generation, and automated customer support.Last updated -TypeScript
- -securityAlicense-qualityAn MCP server that extends AI agents' context window by providing tools to store, retrieve, and search memories, allowing agents to maintain history and context across long interactions.Last updated -9TypeScriptMIT License
- -securityAlicense-qualityAn MCP server that enables AI agents to interact with the SpaceTraders API, managing agents, fleets, contracts, and trading operations in the SpaceTraders universe.Last updated -PythonMIT License