1. Conduid
  2. Agents
  3. Gr4vy Python Adk
MCP server · Agents

Gr4vy Python Adk

Sample agentic e-commerce app built with Python, FastMCP, and Gr4vy payments — an MCP server for ChatGPT

34Low

Scored 4 months ago · breakdown

About Gr4vy Python Adk

Gr4vy Python Adk is an MCP server in the Agents category: sample agentic e-commerce app built with Python, FastMCP, and Gr4vy payments — an MCP server for ChatGPT. It has been installed 0 times through Conduid.

Install

Clone
git clone https://github.com/gr4vy/gr4vy-python-adk

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Gr4vy Python Adk

Powered by Claude · Grounded in docs

I know everything about Gr4vy Python Adk. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • ·Scoped permissionsNot checked yet.

README

Agentic Development Kit (ADK) - Python

A sample agentic e-commerce application that demonstrates how to build an MCP server that integrates with AI agents like ChatGPT. Users can browse products, manage a cart, and complete purchases through natural language conversation.

Learn more: Check out our full guide on building agentic applications for a step-by-step walkthrough. (Link coming soon)

What this demonstrates

  • MCP Server built with FastMCP exposing tools and resources to AI agents
  • OAuth authentication via Google, proxied through the MCP auth layer for ChatGPT integration
  • Payment processing with Gr4vy including card management, Embed widget, and 2FA checkout flow
  • Persistent storage with Google Cloud Firestore for user data and OAuth state
  • UI widgets (HTML) served as MCP resources for rich in-chat rendering

How it works

This app uses ChatGPT's MCP integration to expose tools (actions the model can invoke) and resources (HTML widgets rendered inline in the chat).

  1. ChatGPT calls an MCP tool (e.g. list_products) based on the user's message.
  2. The tool returns structured data (structuredContent) plus metadata pointing to a widget resource URI via openai/outputTemplate.
  3. ChatGPT fetches the widget — an HTML file registered as an MCP resource with MIME type text/html+skybridge.
  4. The widget renders inline in the conversation, reading the tool's structured data to display an interactive UI.
  5. The user interacts with the widget (browses products, adjusts cart, checks out). The widget communicates back to ChatGPT to trigger new tool calls.

Architecture

ChatGPT  <──MCP──>  MCP Server  <──>  Gr4vy (payments)
                         │
                         ├── Google OAuth (authentication)
                         └── Firestore (user data, OAuth state)

The server exposes MCP tools that the AI agent can call:

Tool Description
list_products Browse the product catalog, optionally filtered by category
show_cart Display the shopping cart with selected items
start_checkout Initialize checkout with Gr4vy Embed for payment
pay Process a one-step payment with a stored card
list_cards List the user's saved payment cards
checkout_tokenize Step 1 of 2FA checkout: generate a payment token
checkout_verify Step 2 of 2FA checkout: verify the 2FA code
checkout_purchase Step 3 of 2FA checkout: complete the purchase

Prerequisites

  • Python 3.10+
  • A Google Cloud project with OAuth 2.0 credentials and Firestore enabled
  • A Gr4vy account with API credentials

Setup

  1. Clone the repository:

    git clone <repo-url>
    cd gr4vy-python-adk
    
  2. Install dependencies:

    pip install .
    
  3. Configure environment variables:

    cp .env.example .env
    

    Edit .env with your credentials:

    Variable Description
    BASE_URL Public URL where the server is deployed
    GOOGLE_CLIENT_ID Google OAuth client ID
    GOOGLE_CLIENT_SECRET Google OAuth client secret
    GOOGLE_APPLICATION_CREDENTIALS Path to Firebase service account JSON (local dev only)
    GR4VY_ID Gr4vy account ID
    GR4VY_PRIVATE_KEY Gr4vy private key
    GR4VY_MERCHANT_ACCOUNT_ID Gr4vy merchant account ID
    FIRESTORE_PROJECT Google Cloud project ID for Firestore
    HOST Server bind address (default: 0.0.0.0)
    PORT Server port (default: 8000)
  4. Set up Google OAuth:

    In the Google Cloud Console, configure your OAuth consent screen and add the authorized redirect URI:

    {BASE_URL}/auth/callback
    

Running

Local development:

python server.py

The server starts at http://localhost:8000.

With Docker:

docker build -t adk-python .
docker run -p 8000:8000 --env-file .env adk-python

Production (Google Cloud Run):

On Cloud Run, Firestore credentials are auto-configured via the service account -- no need to set GOOGLE_APPLICATION_CREDENTIALS.

Try it out

Start a conversation with the app enabled and try prompts like:

  • "What plants do you have?"
  • "Show me something low-maintenance"
  • "Add the Monstera to my cart"
  • "Show my cart"
  • "I'd like to checkout"

Tech stack

  • Server: Python 3.10+, FastMCP
  • Payments: Gr4vy Embed + gr4vy SDK
  • Auth: Google OAuth 2.0
  • Database: Google Cloud Firestore
  • Widgets: Self-contained HTML files served as MCP resources

Project structure

├── server.py              # MCP server, OAuth config, tool definitions
├── products.py            # Product catalog data
├── cards.py               # Card management
├── purchases.py           # Payment processing and checkout logic
├── firebase_client.py     # Firestore database client
├── assets/                # HTML widgets for in-chat UI
│   ├── product-catalog.html
│   ├── shopping-cart.html
│   └── checkout.html
├── pyproject.toml         # Python project config and dependencies
├── Dockerfile             # Container build
└── .env.example           # Environment variable template

License

This project is licensed under the MIT License.

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Gr4vy Python Adk

How do I install Gr4vy Python Adk?

Run git clone https://github.com/gr4vy/gr4vy-python-adk, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Gr4vy Python Adk safe to use with an AI agent?

Its trust score is 34 out of 100 (low). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Gr4vy Python Adk still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.