auth-check
Verify authentication status for App Store Connect and Google Play Console to enable store management directly from AI clients.
Instructions
Check authentication status for App Store Connect / Google Play Console.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store | No | Store to check (default: both) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"store": {
"description": "Store to check (default: both)",
"enum": [
"appStore",
"googlePlay",
"both"
],
"type": "string"
}
},
"type": "object"
}
Implementation Reference
- src/tools/auth/check.ts:17-68 (handler)The handler function `handleAuthCheck` that implements the core logic of the 'auth-check' tool. It checks authentication status for App Store Connect and/or Google Play Console based on the provided store option, using services to verify auth, and returns a formatted text response with results.export async function handleAuthCheck(options: AuthCheckOptions) { const { store } = options; const { store: targetStore, includeAppStore, includeGooglePlay, } = getStoreTargets(store); const results: string[] = []; console.error(`[MCP] π Checking authentication (store: ${targetStore})`); if (includeAppStore) { console.error(`[MCP] Checking App Store Connect...`); const appStoreResult = await appStoreService.verifyAuth(300); if (appStoreResult.success && appStoreResult.data) { results.push(`β **App Store Connect**`); results.push(` Issuer ID: ${appStoreResult.data.payload.iss}`); results.push(` Key ID: ${appStoreResult.data.header.kid}`); results.push(` JWT created successfully`); } else { results.push(`β **App Store Connect**`); results.push( ` ${appStoreResult.error?.message || "Authentication failed"}` ); } results.push(""); } if (includeGooglePlay) { console.error(`[MCP] Checking Google Play Console...`); const playStoreResult = await googlePlayService.verifyAuth(); if (playStoreResult.success && playStoreResult.data) { results.push(`β **Google Play Console**`); results.push(` Project: ${playStoreResult.data.project_id}`); results.push(` Service Account: ${playStoreResult.data.client_email}`); } else { results.push(`β **Google Play Console**`); results.push( ` ${playStoreResult.error?.message || "Authentication failed"}` ); } } return { content: [ { type: "text" as const, text: `π **Authentication Status**\n\n${results.join("\n")}`, }, ], }; }
- src/index.ts:145-156 (schema)The input schema definition for the 'auth-check' tool using Zod: an optional 'store' parameter with enum ['appStore', 'googlePlay', 'both']. Note: storeSchema is defined earlier at line 31.registerToolWithInfo( "auth-check", { description: "Check authentication status for App Store Connect / Google Play Console.", inputSchema: z.object({ store: storeSchema.describe("Store to check (default: both)"), }), }, handleAuthCheck, "Authentication" );
- src/index.ts:145-156 (registration)Registration of the 'auth-check' tool in the MCP server via `registerToolWithInfo`, linking the name, description, schema, handler, and category.registerToolWithInfo( "auth-check", { description: "Check authentication status for App Store Connect / Google Play Console.", inputSchema: z.object({ store: storeSchema.describe("Store to check (default: both)"), }), }, handleAuthCheck, "Authentication" );