--- title: "Create Automations Using the Staircase AI MCP Server" slug: "create-automations-using-the-staircase-ai-mcp-server" updated: 2026-11-23T12:32:43Z published: 2026-11-23T12:32:43Z canonical: "support.gainsight.com/create-automations-using-the-staircase-ai-mcp-server" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.gainsight.com/llms.txt > Use this file to discover all available pages before exploring further. # Create Automations Using the Staircase AI MCP Server This article explains how to create personal OAuth credentials (Client ID and Client Secret) to authenticate against the Staircase AI MCP server using the OAuth2 `client_credentials` grant. This method does not require an interactive browser-based login flow. This article explains how to create personal OAuth credentials (Client ID and Client Secret) to authenticate against the Staircase AI MCP server using the OAuth2 `client_credentials` grant. This method does not require an interactive browser-based login flow. ## Overview Users can generate personal OAuth 2.0 credentials (Client ID and Client Secret) to authenticate LLM clients with the Staircase AI MCP server. This enables secure, programmatic access to Staircase AI data without a browser login, making it easier to integrate automated clients and LLM tools such as Claude. This capability supports system-to-system connections, allowing customers to automate processes and enable machines, not just users, to interact with Staircase AI. The Staircase AI MCP server exposes customer relationship data and account intelligence to large language models (LLMs) through the Model Context Protocol (MCP). To connect an LLM client, each user must authenticate using their personal OAuth 2.0 credentials. Once authenticated, the client can call MCP tools to retrieve account health summaries, risk signals, stakeholder changes, and other customer data in real time. ## Prerequisites Before you begin, make sure the following prerequisite is met: - MCP must be enabled at the organization level by your admin. For more information, refer to the [*Connect Staircase AI to LLMs Using MCP*](/v1/docs/connect-staircase-ai-to-llms-using-mcp) article. ## Create Personal API Credentials for the Staircase AI MCP Integration To add credentials: 1. Log in to Staircase.ai. 2. Navigate to **Settings > Profile > Staircase AI MCP**. The Staircase AI MCP details page appears. ![Profile page with Staircase AI MCP.jpg](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Profile_page_with_Staircase_AI_MCP(1).jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A33%3A19Z&se=2026-11-24T19%3A33%3A19Z&sr=b&sp=r&sig=5N69MeAt4%2FcmMZm7XmFFqxiwivxbt5jNA%2F%2F3zhnfnRY%3D) 3. Click **Add credential**. The **Add MCP credentials** dialog box appears. ![Add MCP credentials dialog box.](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Add_MCP_credentials_dialog_box.jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A33%3A19Z&se=2026-11-24T19%3A33%3A19Z&sr=b&sp=r&sig=2fPV8Jk0olSk6pXoL%2FSUbJPZs7U9DlEb4XhZxOBvbRw%3D) 4. Enter a **Name**. 5. Click **Add**. The **Add MCP credentials** dialog box appears. 6. Copy the **Client ID** and **Client secret** and paste them in a notepad. ![Add MCP credentials with Client ID.](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Add_MCP_credentials_with_Client_ID.jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A33%3A19Z&se=2026-11-24T19%3A33%3A19Z&sr=b&sp=r&sig=mWjbeoN%2BtRS9%2FXhBA%2FVhnG32ANzaHlxDnGhSCNp48As%3D) > [!WARNING] > **IMPORTANT**: > > The Client Secret is displayed only once. If you lose it, you must delete the credential and create a new one. There is no way to recover the secret afterward. 7. Click **Done**. The credential now appears in the credentials list with its creation date and last-used timestamp. You can revoke any credential from this screen at any time. ![Staircase AI MCP with personal API credentials.](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Staircase_AI_MCP_with_personal_API_credentials.jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A33%3A19Z&se=2026-11-24T19%3A33%3A19Z&sr=b&sp=r&sig=pUUR8S6x%2F3MSeY5UJQhpR4n%2BTU0Tsqyh2FSa57krB88%3D) ## Use the Credentials The credentials authenticate to the MCP server using the OAuth2 `client_credentials` grant. The authentication flow works as follows: 1. POST your `client_id` and `client_secret` to `https://mcp.staircase.ai/oauth/token`. 2. Receive a short-lived JWT access token (valid for 12 hours). 3. Pass the JWT as a bearer token on subsequent MCP requests. ## Set Environment Variables Export the values you copied from the UI before running the sample: ```plaintext export MCP_CLIENT_ID= export MCP_CLIENT_SECRET= ``` ## Sample Python Client The following minimal reference client uses `fastmcp` and `authlib`. It requires Python 3.13 or later, along with the `fastmcp` and `authlib` packages. ```plaintext import asyncio import json import os import sys from authlib.integrations.httpx_client import AsyncOAuth2Client from fastmcp import Client MCP_SERVER_URL = os.environ.get("MCP_SERVER_URL", "https://mcp.staircase.ai/mcp") TOKEN_ENDPOINT = MCP_SERVER_URL.rsplit("/mcp", 1)[0] + "/oauth/token" CLIENT_ID = os.environ["MCP_CLIENT_ID"] CLIENT_SECRET = os.environ["MCP_CLIENT_SECRET"] QUESTIONS = [    "Prep me for my upcoming call with Acme Corp and summarize account health, "    "recent risks, wins, and key stakeholder changes into a one-page brief.", ] async def fetch_client_credentials_token() -> str:    """Fetch a JWT via OAuth2 client_credentials grant using authlib."""    oauth_client = AsyncOAuth2Client(        client_id=CLIENT_ID,        client_secret=CLIENT_SECRET,        token_endpoint_auth_method="client_secret_post",    )    token = await oauth_client.fetch_token(        url=TOKEN_ENDPOINT, grant_type="client_credentials"    )    await oauth_client.aclose()    return token["access_token"] async def main():    access_token = await fetch_client_credentials_token()    print(f"[Auth] Obtained client_credentials token (len={len(access_token)})")    client = Client(MCP_SERVER_URL, auth=access_token)    async with client:        tools = await client.list_tools()        print(f"[MCP] Available tools: {', '.join(t.name for t in tools)}")        for question in QUESTIONS:            try:                print(f"\n[MCP] Question: {question}")                response = await client.call_tool(                    "staircase_query",                    {"query": question},                )                print(                    f"[MCP] Response:\n{json.dumps(response.structured_content, indent=2)}"                )            except Exception as e:                print(f"[MCP] Error: {e}", file=sys.stderr) if __name__ == "__main__":    asyncio.run(main()) ``` ### Run it ```plaintext python creds_client.py ``` ## Security Considerations Keep the following in mind when managing MCP credentials: - Treat the Client Secret like a password — never commit it to a code repository or share it in chats or documents. - Each credential is scoped to the user who created it. Revoke credentials from the MCP credentials screen when they are no longer needed. - Access tokens issued by `/oauth/token` expire after 12 hours. The client refreshes automatically by calling `fetch_token` again. - If an organization admin disables MCP at the org level, all existing credentials stop working immediately.