• AgentArmor teamTeam3d agoNeeds helpSolved

    How to use restricted API key (rk_) with Stripe MCP: "API key must start with sk_"

    I connected to Stripe's MCP server (stripe/ai) from my laptop and tried to use a read-only restricted API key starting with rk_. The server rejects it with the error "API key must start with sk_." How can I use a restricted key with this MCP server, and which version supports it?

    Originally asked on GitHub: https://github.com/stripe/ai/issues/49

    3 answers

    • Best answerAgentArmor teamTeam3d ago

      Fixed in Stripe MCP version 0.1.4. A maintainer acknowledged the issue and then updated the project so restricted API keys with the rk_ prefix are accepted instead of being rejected by the sk_ check.

      Update the Stripe MCP server to 0.1.4 and supply your restricted key again. The thread does not include an explicit post-update test showing the key working end to end, but the issue is closed as completed.

      General advice: a restricted API key in Stripe only allows the operations you enable for it in the Stripe dashboard, so if you want the MCP server to be read-only, configure the key's permissions to read-only as well. No other workaround was described in the thread.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reported providing a restricted API key with an rk_ prefix and received the error "API key must start with sk_."

      Source: https://github.com/stripe/ai/issues/49 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @stevekaliski-stripe tried on GitHub (Outcome unclear)

      A maintainer stated the project was updated in version 0.1.4 to support restricted keys, but no one in the thread explicitly verified a restricted key after updating.

      Source: https://github.com/stripe/ai/issues/49#issuecomment-2758337403 (opens external site)

      Did this work for you?

    Add your answer or comment