Extend AI Toolkit MCP Server

MIT License
15
  • Apple
Integrations
  • 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.

AI 툴킷 확장

개요

Extend AI Toolkit은 Anthropic의 Model Context Protocol(MCP) , OpenAI , LangChain , CrewAI 등 다양한 AI 프레임워크의 Extend API와 통합할 수 있는 파이썬 기반 도구 구현을 제공합니다. 사용자는 지출 관리 흐름에서 특정 작업을 AI 에이전트 또는 Claude 데스크톱과 같은 MCP 호환 클라이언트에 위임할 수 있습니다.

이 도구는 API 키를 보유한 기존 Extend 사용자를 위해 설계되었습니다. Extend에 가입하지 않으셨지만 중소기업을 위한 최신의 사용하기 쉬운 가상 카드 및 지출 관리 플랫폼에 대해 자세히 알아보고 싶으시다면 paywithextend.com 에서 확인해 보세요.

특징

  • 다중 AI 프레임워크 지원 : Anthropic Model Context Protocol, OpenAI Agents, LangChain LangGraph & ReAct, CrewAI 프레임워크와 함께 작동합니다.
  • 포괄적인 도구 세트 : 신용 카드, 가상 카드, 거래 및 비용 관리 엔드포인트를 포함하여 Extend의 모든 주요 API 기능을 지원합니다.

설치

패키지를 수정하지 않는 한 이 소스 코드는 필요하지 않습니다. 패키지를 사용하려는 경우 다음을 실행하세요.

지엑스피1

요구 사항

  • Python : 버전 3.10 이상
  • API 키 확장 : paywithextend.com 에 가입하여 API 키를 받으세요.
  • 프레임워크별 요구 사항 :
    • LangChain: langchainlangchain-openai 패키지
    • OpenAI: openai 패키지
    • CrewAI: crewai 패키지
    • Anthropic: anthropic 패키지(클로드용)

구성

라이브러리는 환경 변수나 명령줄 인수를 통해 Extend API 키와 API로 구성되어야 합니다.

--api-key=your_api_key_here --api-secret=your_api_secret_here

또는 환경 변수를 통해:

EXTEND_API_KEY=your_api_key_here EXTEND_API_SECRET=your_api_secret_here

사용 가능한 도구

이 툴킷은 기능별로 구성된 포괄적인 도구 세트를 제공합니다.

가상 카드

  • 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 서버 확장 테스트:

npx @modelcontextprotocol/inspector python extend_ai_toolkit/modelcontextprotocol/main.py --tools=all
Claude 데스크톱 통합

구성 파일을 편집하여 이 도구를 Claude Desktop의 MCP 서버로 추가합니다.

MacOS의 경우: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json

Claude Desktop과 함께 create_receipt_attachment 도구를 사용하려면 npm install @modelcontextprotocol/server-filesystem add를 통해 파일 시스템 MCP 서버를 설치한 다음 구성 파일에도 추가해야 합니다.

참고: 현재 제한 사항으로 인해 Claude Desktop에 직접 업로드된 이미지는 Claude Desktop 앱이 기본 이미지 데이터에 액세스할 수 없기 때문에 Extend에 업로드할 수 없습니다. 따라서 파일 시스템 MCP 서버가 필요합니다.

파일 시스템을 추가하면 영수증 전용 폴더를 설정하고, Claude에게 영수증을 업로드하여 가장 가능성이 높은 거래와 자동으로 매칭하도록 설정할 수 있습니다. 또는 영수증을 첨부할 거래를 알고 있다면 Claude에게 해당 거래의 영수증을 업로드하도록 설정할 수 있습니다(자동 매칭 과정은 생략).

{ "extend-mcp": { "command": "python", "args": [ "-m", "extend_ai_toolkit.modelcontextprotocol.main", "--tools=all" ], "env": { "EXTEND_API_KEY": "apik_XXXX", "EXTEND_API_SECRET": "XXXXX" } }, // optional: if you want to use the create_receipt_attachment tool "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/receipts/folder" ] } }
원격 실행

원격으로 서버를 실행하고 SSE 전송을 통해 통신할 수도 있습니다.

python -m extend_ai_toolkit.modelcontextprotocol.main_sse --tools=all --api-key="apikey" --api-secret="apisecret"

선택적으로 MCP 터미널 클라이언트를 사용하여 연결합니다.

python -m extend_ai_toolkit.modelcontextprotocol.client.mcp_client --mcp-server-host localhost --mcp-server-port 8000 --llm-provider=anthropic --llm-model=claude-3-5-sonnet-20241022

오픈AI

import os from langchain_openai import ChatOpenAI from extend_ai_toolkit.openai.toolkit import ExtendOpenAIToolkit from extend_ai_toolkit.shared import Configuration, Scope, Product, Actions # Initialize the OpenAI toolkit extend_openai_toolkit = ExtendOpenAIToolkit.default_instance( api_key=os.environ.get("EXTEND_API_KEY"), api_secret=os.environ.get("EXTEND_API_SECRET"), configuration=Configuration( scope=[ Scope(Product.VIRTUAL_CARDS, actions=Actions(read=True)), Scope(Product.CREDIT_CARDS, actions=Actions(read=True)), Scope(Product.TRANSACTIONS, actions=Actions(read=True)), ] ) ) # Create an agent with the tools extend_agent = Agent( name="Extend Agent", instructions="You are an expert at integrating with Extend", tools=extend_openai_toolkit.get_tools() )

랭체인

import os from langchain_openai import ChatOpenAI from langgraph.prebuilt import create_react_agent from extend_ai_toolkit.langchain.toolkit import ExtendLangChainToolkit from extend_ai_toolkit.shared import Configuration, Scope, Product, Actions # Initialize the LangChain toolkit extend_langchain_toolkit = ExtendLangChainToolkit.default_instance( api_key=os.environ.get("EXTEND_API_KEY"), api_secret=os.environ.get("EXTEND_API_SECRET"), configuration=Configuration( scope=[ Scope(Product.VIRTUAL_CARDS, actions=Actions(read=True)), Scope(Product.CREDIT_CARDS, actions=Actions(read=True)), Scope(Product.TRANSACTIONS, actions=Actions(read=True)), ] ) ) # Create tools for the agent tools = extend_langchain_toolkit.get_tools() # Create the agent executor langgraph_agent_executor = create_react_agent( ChatOpenAI(model="gpt-4"), tools )

크루AI

import os from extend_ai_toolkit.crewai.toolkit import ExtendCrewAIToolkit from extend_ai_toolkit.shared import Configuration, Scope, Product, Actions # Initialize the CrewAI toolkit toolkit = ExtendCrewAIToolkit.default_instance( api_key=os.environ.get("EXTEND_API_KEY"), api_secret=os.environ.get("EXTEND_API_SECRET"), configuration=Configuration( scope=[ Scope(Product.VIRTUAL_CARDS, actions=Actions(read=True)), Scope(Product.CREDIT_CARDS, actions=Actions(read=True)), Scope(Product.TRANSACTIONS, actions=Actions(read=True)), ] ) ) # Configure the LLM (using Claude) toolkit.configure_llm( model="claude-3-opus-20240229", api_key=os.environ.get("ANTHROPIC_API_KEY") ) # Create the Extend agent extend_agent = toolkit.create_agent( role="Extend Integration Expert", goal="Help users manage virtual cards, view credit cards, and check transactions efficiently", backstory="You are an expert at integrating with Extend, with deep knowledge of virtual cards, credit cards, and transaction management.", verbose=True ) # Create a task for handling user queries query_task = toolkit.create_task( description="Process and respond to user queries about Extend services", agent=extend_agent, expected_output="A clear and helpful response addressing the user's query", async_execution=True ) # Create a crew with the agent and task crew = toolkit.create_crew( agents=[extend_agent], tasks=[query_task], verbose=True ) # Run the crew result = crew.kickoff()

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

-
security - not tested
A
license - permissive license
-
quality - not tested

AI 에이전트가 Extend의 지출 관리 API와 상호 작용할 수 있도록 하는 MCP 서버로, 자연어를 통한 가상 카드 관리, 거래 추적, 영수증 처리가 가능합니다.

  1. 개요
    1. 특징
      1. 설치
        1. 요구 사항
      2. 구성
        1. 사용 가능한 도구
          1. 가상 카드
          2. 신용카드
          3. 업무
          4. 경비 관리
        2. 사용 예
          1. 모델 컨텍스트 프로토콜
          2. 오픈AI
          3. 랭체인
          4. 크루AI
        3. 기여하다
          1. 특허

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              An MCP server that lets AI assistants interact with your Lunchmoney data, enabling natural language queries about transactions, budgets, and spending patterns.
              Last updated -
              4
              3
              8
              TypeScript
              MIT License
            • -
              security
              A
              license
              -
              quality
              An 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 -
              Python
              Apache 2.0
            • A
              security
              F
              license
              A
              quality
              An MCP server that integrates with Fewsats allowing AI agents to securely purchase anything by retrieving balances, accessing payment methods, and processing payments.
              Last updated -
              4
              11
              Python
            • -
              security
              -
              license
              -
              quality
              A specialized MCP server that enables AI agents to interact with Reddit, including reading posts, creating content, and managing subreddit configurations.
              Last updated -
              31
              1
              TypeScript

            View all related MCP servers

            MCP directory API

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

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/paywithextend/extend-ai-toolkit'

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