Skip to main content

Stripe Agent Toolkit - Python

Deprecated: This package is no longer maintained and will receive no further updates, including security fixes. Use your client or framework’s native MCP support to connect to Stripe at https://mcp.stripe.com. See the Stripe MCP documentation. Final source. Existing users with migration questions can contact token-billing-team@stripe.com.

The documentation below is retained for historical reference.

The Stripe Agent Toolkit library enables popular agent frameworks including OpenAI's Agent SDK, LangChain, and CrewAI to integrate with Stripe APIs through function calling. The library is not exhaustive of the entire Stripe API. It is built directly on top of the Stripe Python SDK.

Installation

You don't need this source code unless you want to modify the package. If you just want to use the package, just run:

uv pip install stripe-agent-toolkit

Requirements

  • Python 3.11+

Usage

The library needs to be configured with your account's secret key which is available in your Stripe Dashboard. We strongly recommend using a Restricted API Key (rk_*) for better security and granular permissions. Tool availability is determined by the permissions you configure on the restricted key.

from stripe_agent_toolkit.openai.toolkit import create_stripe_agent_toolkit

async def main():
    toolkit = await create_stripe_agent_toolkit(secret_key="rk_test_...")
    tools = toolkit.get_tools()
    # ... use tools ...
    await toolkit.close()  # Clean up when done

The toolkit works with OpenAI's Agent SDK, LangChain, and CrewAI and can be passed as a list of tools. For example:

from agents import Agent

async def main():
    toolkit = await create_stripe_agent_toolkit(secret_key="rk_test_...")

    stripe_agent = Agent(
        name="Stripe Agent",
        instructions="You are an expert at integrating with Stripe",
        tools=toolkit.get_tools()
    )
    # ... use agent ...
    await toolkit.close()

Examples for OpenAI's Agent SDK, LangChain, and CrewAI are included in /examples.

Context

In some cases you will want to provide values that serve as defaults when making requests. Currently, the account context value enables you to make API calls for your connected accounts.

toolkit = await create_stripe_agent_toolkit(
    secret_key="rk_test_...",
    configuration={
        "context": {
            "account": "acct_123"
        }
    }
)

Development

uv venv --python 3.11
source .venv/bin/activate
uv pip install -r requirements.txt

Metadata

Release files for stripe-agent-toolkit 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stripe-agent-toolkit 0.7.1
File Size Uploaded Provenance Actions
stripe_agent_toolkit-0.7.1.tar.gz 19.3 kB With provenance Details for stripe_agent_toolkit-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stripe-agent-toolkit 0.7.1
File Interpreter ABI Platform Actions
stripe_agent_toolkit-0.7.1-py3-none-any.whl Python 3 none any Details for stripe_agent_toolkit-0.7.1-py3-none-any.whl

Total release size: 39.3 kB

Release files / stripe_agent_toolkit-0.7.1.tar.gz

Download URL stripe_agent_toolkit-0.7.1.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ae776c5c41ec0fd0886941cfb17b1b96fc57bbac03a3192bc7f70b88a64f9eb0
BLAKE2b-256 checksum
How to use checksums
0534f22fed1977942e3ad0336d567212a75810f676a6ac273c85fa4e8b6ce6b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / stripe_agent_toolkit-0.7.1-py3-none-any.whl

Download URL stripe_agent_toolkit-0.7.1-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49ac4def4a97b1a6665a7f05ac2f6565c3240b064958f3b79b12b238984cff10
BLAKE2b-256 checksum
How to use checksums
b7fc67cf00706f449727f3d30af5863361c29c1d0dcc4c18f51fbf8bc6fd629d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for stripe-agent-toolkit 0.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stripe_agent_toolkit-0.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page