Token导航 LogoToken导航TokenDH.com
Response Token Sizes logo
运维云端stdio官方级别未说明来源级核验

Response Token Sizes

MCP Server

用于分析Stripe MCP服务器中OpenAPI规范令牌使用情况的工具,支持动态API响应和令牌计数。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude云端部署ClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

tomchen-stripe

提供方

tomchen-stripe

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -e .

详细介绍

MCP服务器OpenAPI令牌大小

标记有多少代币 三元刀具设计 因为Stripe面向用户的MCP服务器用完了。

在三元工具设计中,Stripe的API在MCP响应中动态返回给用户,而不是在用户连接到Stripe的MCP服务器时静态返回。

大约有572个Stripe API,176个是顶级API(2025年)。

所有响应都是从以下位置解析的 Stripe的OpenAPI规范.

我们使用GPT-4的tiktoken来编码令牌。

Metatool响应是使用此生成的 原型.

安装

pip install -e .

用法

python get_size.py 

Stripe的OpenAPI规范令牌计数

  • spec3.json: 1218830
  • spec3.sdk.json: 1557620

Stripe mcp令牌使用情况

使用176进行基准测试\* Stripe的572个API端点(占总API的30%)中的(顶级API)。

使用三元工具设计

list-api-endpoints, get-api-endpoint-schema, invoke-api-endpoint

列出api端点

  1. 仅返回所有工具名称
文件令牌(176个api)估计令牌(572个api)
响应/列出api端点/name-only.txt903个代币2709个代币
  1. 返回所有工具名称和描述
文件令牌(176个api)估计令牌(572个api)
responses/列出api端点/name-and-description.txt4347个代币13041个代币
  1. 返回相关工具名称/描述

估计我们是否要返回与用户试图做的事情相关的工具子集。这里有更多关于我们如何返回API子集的探索。

估计令牌(适用于大约十几个API)名称估计令牌(用于大约十几个APIs)名称和描述
61个代币297个代币

公共API端点增长(2020-2025)

年度运营ID计数同比增长%变化
2025年(10月24日)583+21+3.7%
2024年(12月24日)562+64+12.9%
2023年(12月21日)498+54+12.2%
2022年(12月23日)444+54+13.8%
2021年(12月23日)390+28+7.7%
2020年(12月15日)362基线-

获取api端点模式

  1. 返回完整的OpenAPI模式
文件令牌
PostProducts(P89模式大小) responses/get-api端点模式/full-openapi-schema.txt2873个代币
PostCheckoutSessions(P100架构大小) responses/get-api端点模式/完整的postcheckoutsessions-schema.json16413个代币

模型上下文大小(当前-2025)

模型输入上下文窗口
GPT-5400k
GPT-5迷你400k
GPT-5纳米400k
GPT-4.11047k
GPT-oss-120b131k
GPT-oss-20b131k
GPT-5聊天128k
聊天GPT-4o128k
claude-sonnet-4-5200k
claude-haiku-4-520万
claude-opus-4-1200k
双子座-2.5-pro1048k
双子座2.5英尺1048k

模型上下文大小(较旧)

模型输入上下文窗口
GPT-4.1迷你版1047k
GPT-4涡轮增压发动机128k
GPT-3.5涡轮增压发动机16k
GPT-48k
o1200k
o3200k
claude-sonnet-4-0200k
claude-opus-4-0200k
claude-3-5-haiku最新200k
克劳德·海库3200k
双子座-2.0闪光1048k
双子座-2.0-flash-lite1048k

OpenAI Anthropic 深度求索 光标

模型弃用时间表

Anthropic:平均1~1.5年 OpenAI:平均约1.5-3年

包括操作ID

Click to expand

DeleteAccountsAccount
DeleteCouponsCoupon
DeleteCustomersCustomer
DeleteEphemeralKeysKey
DeleteInvoiceitemsInvoiceitem
DeleteInvoicesInvoice
DeletePlansPlan
DeleteProductsId
DeleteSubscriptionItemsItem
DeleteSubscriptionsSubscriptionExposedId
DeleteTaxIdsId
DeleteWebhookEndpointsWebhookEndpoint
GetAccount
GetAccounts
GetAccountsAccount
GetApplicationFees
GetApplicationFeesId
GetBalance
GetBalanceSettings
GetBalanceTransactions
GetBalanceTransactionsId
GetCharges
GetChargesCharge
GetConfirmationTokensConfirmationToken
GetCountrySpecs
GetCountrySpecsCountry
GetCoupons
GetCouponsCoupon
GetCreditNotes
GetCreditNotesId
GetCustomers
GetCustomersCustomer
GetDisputes
GetDisputesDispute
GetEvents
GetEventsId
GetExchangeRates
GetExchangeRatesRateId
GetFileLinks
GetFileLinksLink
GetFiles
GetFilesFile
GetInvoicePayments
GetInvoicePaymentsInvoicePayment
GetInvoiceRenderingTemplates
GetInvoiceRenderingTemplatesTemplate
GetInvoiceitems
GetInvoiceitemsInvoiceitem
GetInvoices
GetInvoicesInvoice
GetLinkAccountSessionsSession
GetLinkedAccounts
GetLinkedAccountsAccount
GetMandatesMandate
GetPaymentIntents
GetPaymentIntentsIntent
GetPaymentLinks
GetPaymentLinksPaymentLink
GetPaymentMethodConfigurations
GetPaymentMethodConfigurationsConfiguration
GetPaymentMethodDomains
GetPaymentMethodDomainsPaymentMethodDomain
GetPaymentMethods
GetPaymentMethodsPaymentMethod
GetPayouts
GetPayoutsPayout
GetPlans
GetPlansPlan
GetPrices
GetPricesPrice
GetProducts
GetProductsId
GetPromotionCodes
GetPromotionCodesPromotionCode
GetQuotes
GetQuotesQuote
GetRefunds
GetRefundsRefund
GetReviews
GetReviewsReview
GetSetupAttempts
GetSetupIntents
GetSetupIntentsIntent
GetShippingRates
GetShippingRatesShippingRateToken
GetSourcesSource
GetSubscriptionItems
GetSubscriptionItemsItem
GetSubscriptionSchedules
GetSubscriptionSchedulesSchedule
GetSubscriptions
GetSubscriptionsSubscriptionExposedId
GetTaxCodes
GetTaxCodesId
GetTaxIds
GetTaxIdsId
GetTaxRates
GetTaxRatesTaxRate
GetTokensToken
GetTopups
GetTopupsTopup
GetTransfers
GetTransfersTransfer
GetWebhookEndpoints
GetWebhookEndpointsWebhookEndpoint
PostAccountLinks
PostAccountSessions
PostAccounts
PostAccountsAccount
PostBalanceSettings
PostCharges
PostChargesCharge
PostCoupons
PostCouponsCoupon
PostCreditNotes
PostCreditNotesId
PostCustomerSessions
PostCustomers
PostCustomersCustomer
PostDisputesDispute
PostEphemeralKeys
PostExternalAccountsId
PostFileLinks
PostFileLinksLink
PostFiles
PostInvoiceitems
PostInvoiceitemsInvoiceitem
PostInvoices
PostInvoicesInvoice
PostLinkAccountSessions
PostPaymentIntents
PostPaymentIntentsIntent
PostPaymentLinks
PostPaymentLinksPaymentLink
PostPaymentMethodConfigurations
PostPaymentMethodConfigurationsConfiguration
PostPaymentMethodDomains
PostPaymentMethodDomainsPaymentMethodDomain
PostPaymentMethods
PostPaymentMethodsPaymentMethod
PostPayouts
PostPayoutsPayout
PostPlans
PostPlansPlan
PostPrices
PostPricesPrice
PostProducts
PostProductsId
PostPromotionCodes
PostPromotionCodesPromotionCode
PostQuotes
PostQuotesQuote
PostRefunds
PostRefundsRefund
PostSetupIntents
PostSetupIntentsIntent
PostShippingRates
PostShippingRatesShippingRateToken
PostSources
PostSourcesSource
PostSubscriptionItems
PostSubscriptionItemsItem
PostSubscriptionSchedules
PostSubscriptionSchedulesSchedule
PostSubscriptions
PostSubscriptionsSubscriptionExposedId
PostTaxIds
PostTaxRates
PostTaxRatesTaxRate
PostTokens
PostTopups
PostTopupsTopup
PostTransfers
PostTransfersTransfer
PostWebhookEndpoints
PostWebhookEndpointsWebhookEndpoint

其他数据点

MCP动态工具之间的余弦距离

以下文件包含{operationId}:{description}条目:

data/spec3-top-level-name-description.json:176个顶级API工具名称+说明 data/spec3-top-level-name-description.json:所有572 API工具名称+说明

scripts/run_pipeline.py 嵌入上述文件中的条目、计算成对最近邻距离, 对它们进行聚类,然后计算聚类之间的距离。彼此靠近的集群 如果集群内靠近的工具或工具的余弦距离\<=0.15,则将其标记为潜在模糊:

对于176个顶级API,有三个潜在的模糊集群:

  1. GetAccount,GetAccountsAccount
  2. GetPaymentMethods配置,GetPaymentMethod配置
  3. GetPaymentMethodDomains,GetPaymentMethodDomains支付方法域

第一个是别名,重复的API。第二个和第三个是列表与细节端点,自然会与用户提示区分开来,例如“显示我的支付配置”(列表)与“显示我我的支付设置”(细节)。

对于全572 API文件,有67个潜在的模糊聚类,分为以下几类:

  • 列表与详细端点
  • 财政部内部银行与外部银行
  • 别名/重复API

这些歧义可以通过用户写的自然提示来消除,例如“显示我的信用余额交易”(列表)与“显示我信用余额交易“(详细信息)。

Stripe MCP工具的尺寸(11/7/25)

retrieve_balance.json                             52 tokens
get_stripe_account_info.json                      54 tokens
finalize_invoice.json                            108 tokens
cancel_subscription.json                         111 tokens
list_coupons.json                                129 tokens
list_products.json                               135 tokens
create_product.json                              143 tokens
create_customer.json                             150 tokens
create_payment_link.json                         167 tokens
create_invoice.json                              170 tokens
list_invoices.json                               184 tokens
list_customers.json                              192 tokens
list_payment_intents.json                        204 tokens
list_prices.json                                 208 tokens
create_invoice_item.json                         220 tokens
create_refund.json                               248 tokens
list_disputes.json                               241 tokens
fetch_stripe_resources.json                      271 tokens
search_stripe_documentation.json                 292 tokens
list_subscriptions.json                          310 tokens
create_price.json                                412 tokens
update_dispute.json                              437 tokens
create_coupon.json                               514 tokens
update_subscription.json                         518 tokens
search_stripe_resources.json                    1494 tokens
-----------------------------------------------------------
TOTAL                                           6964 tokens

假设最小的令牌窗口容量(128K-ChatGPT5),我们消耗了5% 今天的上下文窗口。

如果我们用完了100%的上下文窗口,我们可以添加:

  • 81我们最大的工具
  • 435个我们的平均尺寸工具

如果我们使用了50%的上下文窗口,我们可以添加:

  • 40我们最大的工具
  • 117个我们的平均尺寸工具

如果我们使用了25%的上下文窗口,我们可以添加:

  • 我们最大的20个工具
  • 58我们的平均大小的工具

如果我们使用了10%的上下文窗口,我们可以添加:

  • 8我们最大的工具
  • 我们平均尺寸的43个工具

get_static_tools_sizes.py.

目录标签

目录标签

PythonClaude云端部署OpenAPI分析本地部署令牌计数动态APIStripe集成性能基准测试

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP