Back to Home
PayMCP icon

paymcp-subscription-demo-py

Verified Safe

by PayMCP

Overview

A sample Model Context Protocol (MCP) server demonstrating how to gate access to tools behind active Stripe subscriptions with OAuth/OIDC authentication.

Installation

Run Command
pdm run server.py

Environment Variables

  • HOST
  • PORT
  • OIDC_ISSUER
  • AUTH_HOST
  • AUTH_PORT
  • AUTH_REALM
  • OAUTH_CLIENT_ID
  • OAUTH_CLIENT_SECRET
  • STRIPE_SECRET_KEY
  • STRIPE_SUBSCRIPTION_ID

Security Notes

The server uses `os.getenv` for all sensitive configuration values, preventing hardcoded secrets. OAuth/OIDC token verification is implemented using standard JWT decoding and JWKS fetching. Custom logic for issuer and audience validation correctly handles variations from different providers (Auth0, Keycloak, generic OIDC), including array audiences and trailing slash inconsistencies. No 'eval' or malicious patterns were found. The primary risk would be misconfiguration of the OAuth provider or Stripe details, which is external to the code.

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassLow
Avg Tokens25
Stars0
Forks0
Last Update2025-12-06

Tags

MCPSubscriptionStripeOAuthOIDC