/ AI, MCP, ADMOB

AdMob API MCP 서버 만들기 - Part 5: 애드몹 실적 리포트 조회 기능을 도구로 제공하기

지난 4부에서는 우리가 직접 만든 MCP 서버를 Gemini CLI에 연결하는 방법을 알아봤습니다. 드디어 나만의 AI 에이전트와 서버가 대화할 수 있는 기반이 마련되었죠!

이번 포스트에서는 한 걸음 더 나아가, AI 에이전트가 애드몹 실적 데이터를 자유자재로 다룰 수 있도록 네트워크 리포트미디에이션 리포트 기능을 도구로 추가하는 방법을 자세히 살펴보겠습니다.

애드몹 리포트의 측정기준과 측정항목 알아보기

계정 정보나 앱 목록 조회는 비교적 간단했지만, 광고 실적 리포트는 어떤 기준으로 데이터를 보느냐에 따라 결과가 천차만별입니다. 그래서 리포트 기능을 제대로 만들려면 먼저 AdMob API가 어떤 측정기준(Dimensions)측정항목(Metrics)을 지원하는지 정확히 알아야 합니다.

사용 가능한 전체 항목은 공식 문서에서 확인할 수 있는데요, 리포트 종류에 따라 지원하는 항목이 다르다는 점에 유의해야 합니다.

이제 우리 AI 에이전트가 이 기준들을 잘 이해하고 활용할 수 있도록 tools.ts 파일에 각 항목을 enum으로 깔끔하게 정의해 보겠습니다. 네트워크 리포트와 미디에이션 리포트에서 공통으로 쓰는 항목과 특정 리포트 전용 항목을 구분해서 코드를 작성하면 더 좋겠죠?

// src/tools.ts

enum Dimension {
  DATE = "DATE",
  MONTH = "MONTH",
  WEEK = "WEEK",
  AD_SOURCE = "AD_SOURCE",
  AD_SOURCE_INSTANCE = "AD_SOURCE_INSTANCE",
  AD_UNIT = "AD_UNIT",
  APP = "APP",
  MEDIATION_GROUP = "MEDIATION_GROUP",
  AD_TYPE = "AD_TYPE",
  COUNTRY = "COUNTRY",
  FORMAT = "FORMAT",
  PLATFORM = "PLATFORM",
  MOBILE_OS_VERSION = "MOBILE_OS_VERSION",
  GMA_SDK_VERSION = "GMA_SDK_VERSION",
  APP_VERSION_NAME = "APP_VERSION_NAME",
  SERVING_RESTRICTION = "SERVING_RESTRICTION",
}

enum Metric {
  AD_REQUESTS = "AD_REQUESTS",
  CLICKS = "CLICKS",
  ESTIMATED_EARNINGS = "ESTIMATED_EARNINGS",
  IMPRESSIONS = "IMPRESSIONS",
  IMPRESSION_CTR = "IMPRESSION_CTR",
  IMPRESSION_RPM = "IMPRESSION_RPM",
  MATCHED_REQUESTS = "MATCHED_REQUESTS",
  MATCH_RATE = "MATCH_RATE",
  SHOW_RATE = "SHOW_RATE",
  OBSERVED_ECPM = "OBSERVED_ECPM",
}

const COMMON_REPORT_DIMENSIONS = [
  Dimension.DATE,
  Dimension.MONTH,
  Dimension.WEEK,
  Dimension.AD_UNIT,
  Dimension.APP,
  Dimension.COUNTRY,
  Dimension.FORMAT,
  Dimension.PLATFORM,
  Dimension.MOBILE_OS_VERSION,
  Dimension.GMA_SDK_VERSION,
  Dimension.APP_VERSION_NAME,
  Dimension.SERVING_RESTRICTION,
];

const COMMON_REPORT_METRICS = [
  Metric.AD_REQUESTS,
  Metric.CLICKS,
  Metric.ESTIMATED_EARNINGS,
  Metric.IMPRESSIONS,
  Metric.IMPRESSION_CTR,
  Metric.MATCHED_REQUESTS,
  Metric.MATCH_RATE,
];

/** https://developers.google.com/admob/api/reference/rest/v1/accounts.networkReport/generate#dimension */
const NETWORK_REPORT_DIMENSIONS = [...COMMON_REPORT_DIMENSIONS, Dimension.AD_TYPE];

/** https://developers.google.com/admob/api/reference/rest/v1/accounts.networkReport/generate#metric */
const NETWORK_REPORT_METRICS = [...COMMON_REPORT_METRICS, Metric.IMPRESSION_RPM, Metric.SHOW_RATE];

/** https://developers.google.com/admob/api/reference/rest/v1/accounts.mediationReport/generate#dimension */
const MEDIATION_REPORT_DIMENSIONS = [
  ...COMMON_REPORT_DIMENSIONS,
  Dimension.AD_SOURCE,
  Dimension.AD_SOURCE_INSTANCE,
  Dimension.MEDIATION_GROUP,
];

/** https://developers.google.com/admob/api/reference/rest/v1/accounts.mediationReport/generate#metric */
const MEDIATION_REPORT_METRICS = [...COMMON_REPORT_METRICS, Metric.OBSERVED_ECPM];

...

리포트 생성 스펙 검토하기

네트워크 리포트미디에이션 리포트를 생성할 때 필요한 스펙을 살펴보니, 앞에서 정의한 측정기준과 항목 외에 정렬 순서를 지정하는 SortOrder가 필요해 보입니다. tools.ts 파일에 간단히 추가해 줍시다.

// src/tools.ts

enum SortOrder {
  ASCENDING = "ASCENDING",
  DESCENDING = "DESCENDING",
}

...

리포트 생성 도구 추가하기

이제 본격적으로 리포트를 생성하는 두 가지 새로운 도구를 만들어 보겠습니다. 먼저 ToolName에 새로운 도구들을 추가해 줄까요?

// src/tools.ts

enum ToolName {
  GENERATE_NETWORK_REPORT = "generate_network_report", // 네트워크 리포트 생성 도구
  GENERATE_MEDIATION_REPORT = "generate_mediation_report", // 미디에이션 리포트 생성 도구
  GET_ACCOUNT = "get_account",
  LIST_AD_UNITS = "list_ad_units",
  LIST_APPS = "list_apps",
}

...

다음으로 각 도구의 스펙을 정의할 차례입니다. 지난번에 만든 도구들과 달리, 리포트 생성 기능은 조회 기간이나 원하는 지표처럼 여러 조건을 입력받아야 합니다. 따라서 AI 에이전트에게 “이 도구를 사용하려면 이런 파라미터들을 넘겨줘야 해!”라고 알려줄 상세한 스키마가 필요합니다.

두 리포트 도구의 스펙을 아래 표처럼 정리해 보았습니다. AdMob API의 복잡한 스펙을 최대한 단순화하면서도 핵심 기능은 모두 담을 수 있도록 꼭 필요한 옵션 위주로 구성했습니다.

항목 타입 설명
dateRangeStart string 리포트 조회 시작일 (YYYY-MM-DD 형식)
dateRangeEnd string 리포트 조회 종료일 (YYYY-MM-DD 형식)
dimensions string[] 리포트에서 사용할 측정 항목 (사용 가능한 값: NETWORK_REPORT_DIMENSIONS 또는 MEDIATION_REPORT_DIMENSIONS)
dimensionFilters { dimension: string; values: string[] }[] 측정 항목 필터 (dimension에 사용 가능한 값: NETWORK_REPORT_DIMENSIONS 또는 MEDIATION_REPORT_DIMENSIONS)
dimensionSortCondition { dimension: string; order: string } 측정 항목 정렬 기준 (dimension에 사용 가능한 값: NETWORK_REPORT_DIMENSIONS 또는 MEDIATION_REPORT_DIMENSIONS, order에 사용 가능한 값: SortOrder)
metrics string[] 리포트에서 사용할 측정 항목 (사용 가능한 값: NETWORK_REPORT_METRICS 또는 MEDIATION_REPORT_METRICS)
metricSortCondition { metric: string; order: string } 측정 항목 정렬 기준 (metric에 사용 가능한 값: NETWORK_REPORT_METRICS 또는 MEDIATION_REPORT_METRICS, order에 사용 가능한 값: SortOrder)

이제 위에서 정의한 스펙을 configureTools() 함수 안의 ListToolsRequestSchema 핸들러에 코드로 옮겨보겠습니다. 조회 기간과 측정 항목은 리포트의 필수 요소이므로 required 속성으로 지정하는 것도 잊지 마세요.

// src/tools.ts

export function configureTools(server: Server): void {
  server.setRequestHandler(ListToolsRequestSchema, async () => {
    return {
      tools: [
        {
          name: ToolName.GENERATE_NETWORK_REPORT,
          description:
            "Generates an AdMob Network report based on the provided report specification.",
          inputSchema: {
            type: "object",
            properties: {
              dateRangeStart: {
                type: "string",
                description: "The start date of the report. Format: YYYY-MM-DD",
              },
              dateRangeEnd: {
                type: "string",
                description: "The end date of the report. Format: YYYY-MM-DD",
              },
              dimensions: {
                type: "array",
                description:
                  "List of dimensions of the report. The value combination of these dimensions determines the row of the report. If no dimensions are specified, the report returns a single row of requested metrics for the entire account.",
                items: {
                  type: "string",
                  enum: NETWORK_REPORT_DIMENSIONS,
                },
              },
              dimensionFilters: {
                type: "array",
                description:
                  "Describes which report rows to match based on their dimension values.",
                items: {
                  type: "object",
                  properties: {
                    dimension: {
                      type: "string",
                      description: "Applies the filter criterion to the specified dimension.",
                      enum: NETWORK_REPORT_DIMENSIONS,
                    },
                    values: {
                      type: "array",
                      description:
                        "Matches a row if its value for the specified dimension is in one of the values specified in this condition.",
                      items: {
                        type: "string",
                      },
                    },
                  },
                  required: ["dimension", "values"],
                },
              },
              dimensionSortCondition: {
                type: "object",
                description: "Specifies the sorting condition for dimensions.",
                properties: {
                  dimension: {
                    type: "string",
                    description: "The dimension to sort by.",
                    enum: NETWORK_REPORT_DIMENSIONS,
                  },
                  order: {
                    type: "string",
                    enum: [SortOrder.ASCENDING, SortOrder.DESCENDING],
                  },
                },
                required: ["dimension", "order"],
              },
              metrics: {
                type: "array",
                description:
                  "List of metrics of the report. A report must specify at least one metric.",
                items: {
                  type: "string",
                  enum: NETWORK_REPORT_METRICS,
                },
              },
              metricSortCondition: {
                type: "object",
                description: "Specifies the sorting condition for metrics.",
                properties: {
                  metric: {
                    type: "string",
                    description: "The metric to sort by.",
                    enum: NETWORK_REPORT_METRICS,
                  },
                  order: {
                    type: "string",
                    enum: [SortOrder.ASCENDING, SortOrder.DESCENDING],
                  },
                },
                required: ["metric", "order"],
              },
            },
            required: ["dateRangeStart", "dateRangeEnd", "metrics"],
          },
        },
        {
          name: ToolName.GENERATE_MEDIATION_REPORT,
          description:
            "Generates an AdMob Mediation report based on the provided report specification.",
          inputSchema: {
            type: "object",
            properties: {
              dateRangeStart: {
                type: "string",
                description: "The start date of the report. Format: YYYY-MM-DD",
              },
              dateRangeEnd: {
                type: "string",
                description: "The end date of the report. Format: YYYY-MM-DD",
              },
              dimensions: {
                type: "array",
                description:
                  "List of dimensions of the report. The value combination of these dimensions determines the row of the report. If no dimensions are specified, the report returns a single row of requested metrics for the entire account.",
                items: {
                  type: "string",
                  enum: MEDIATION_REPORT_DIMENSIONS,
                },
              },
              dimensionFilters: {
                type: "array",
                description:
                  "Describes which report rows to match based on their dimension values.",
                items: {
                  type: "object",
                  properties: {
                    dimension: {
                      type: "string",
                      description: "Applies the filter criterion to the specified dimension.",
                      enum: MEDIATION_REPORT_DIMENSIONS,
                    },
                    values: {
                      type: "array",
                      description:
                        "Matches a row if its value for the specified dimension is in one of the values specified in this condition.",
                      items: {
                        type: "string",
                      },
                    },
                  },
                  required: ["dimension", "values"],
                },
              },
              dimensionSortCondition: {
                type: "object",
                description: "Specifies the sorting condition for dimensions.",
                properties: {
                  dimension: {
                    type: "string",
                    description: "The dimension to sort by.",
                    enum: MEDIATION_REPORT_DIMENSIONS,
                  },
                  order: {
                    type: "string",
                    enum: [SortOrder.ASCENDING, SortOrder.DESCENDING],
                  },
                },
                required: ["dimension", "order"],
              },
              metrics: {
                type: "array",
                description:
                  "List of metrics of the report. A report must specify at least one metric.",
                items: {
                  type: "string",
  
                  enum: MEDIATION_REPORT_METRICS,
                },
              },
              metricSortCondition: {
                type: "object",
                description: "Specifies the sorting condition for metrics.",
                properties: {
                  metric: {
                    type: "string",
                    description: "The metric to sort by.",
                    enum: MEDIATION_REPORT_METRICS,
                  },
                  order: {
                    type: "string",
                    enum: [SortOrder.ASCENDING, SortOrder.DESCENDING],
                  },
                },
                required: ["metric", "order"],
              },
            },
            required: ["dateRangeStart", "dateRangeEnd", "metrics"],
          },
        },
        ...
      ],
    };
  });
  ...
}

이제 AI가 도구를 호출했을 때, 실제로 AdMob API를 호출해서 리포트를 생성하는 로직을 구현할 차례입니다. CallToolRequestSchema 핸들러에 네트워크 리포트와 미디에이션 리포트 케이스를 추가해 줍시다.

AI 에이전트로부터 받은 파라미터를 AdMob API가 이해할 수 있는 네트워크 리포트 스펙미디에이션 리포트 스펙에 맞게 변환하여 전달하는 과정을 눈여겨보세요.

// src/tools.ts

export function configureTools(server: Server): void {
  server.setRequestHandler(CallToolRequestSchema, async request => {
    const auth = await loadSavedCredentialsIfExist();
    if (!auth) {
      return {
        content: [
          {
            type: "text",
            text: "Not Authenticated. Try running `npm run auth` to authenticate.",
          },
        ],
        isError: true,
      };
    }

    const publisherCode = process.env.PUBLISHER_CODE;
    if (!publisherCode) {
      return {
        content: [
          {
            type: "text",
            text: "PUBLISHER_CODE environment variable not set.",
          },
        ],
        isError: true,
      };
    }

    const { name } = request.params;
    const admob = google.admob({ version: "v1", auth });

    if (name === ToolName.GENERATE_NETWORK_REPORT || name === ToolName.GENERATE_MEDIATION_REPORT) {
      const args = request.params.arguments;
      if (!args) {
        return {
          content: [
            {
              type: "text",
              text: "No arguments provided.",
            },
          ],
          isError: true,
        };
      }

      // Required parameters
      const dateRangeStart = args.dateRangeStart as string;
      const dateRangeEnd = args.dateRangeEnd as string;
      const metrics = args.metrics as string[];

      // Optional parameters
      const dimensions = args.dimensions as string[];
      const dimensionFilters = args.dimensionFilters as {
        dimension: string;
        values: string[];
      }[];
      const dimensionSortCondition = args.dimensionSortCondition as {
        dimension: string;
        order: SortOrder;
      };
      const metricSortCondition = args.metricSortCondition as {
        metric: string;
        order: SortOrder;
      };

      const [sYear, sMonth, sDay] = dateRangeStart.split("-").map(Number);
      const [eYear, eMonth, eDay] = dateRangeEnd.split("-").map(Number);

      if (!dateRangeStart || !dateRangeEnd || !metrics) {
        return {
          content: [
            {
              type: "text",
              text: "Missing required parameters.",
            },
          ],
          isError: true,
        };
      }

      const reportSpec: { [key: string]: unknown } = {
        dateRange: {
          startDate: {
            year: sYear,
            month: sMonth,
            day: sDay,
          },
          endDate: {
            year: eYear,
            month: eMonth,
            day: eDay,
          },
        },
        metrics: metrics,
      };

      if (dimensions && dimensions.length > 0) {
        reportSpec.dimensions = dimensions;
      }

      if (dimensionFilters && Object.keys(dimensionFilters).length > 0) {
        reportSpec.dimensionFilters = dimensionFilters.map(filter => {
          return {
            dimension: filter.dimension,
            matchesAny: {
              values: filter.values,
            },
          };
        });
      }

      if (
        (dimensionSortCondition && Object.keys(dimensionSortCondition).length > 0) ||
        (metricSortCondition && Object.keys(metricSortCondition).length > 0)
      ) {
        const sortConditions: (
          | { metric: string; order: SortOrder }
          | { dimension: string; order: SortOrder }
        )[] = [];

        if (
          dimensionSortCondition &&
          dimensionSortCondition.dimension.length > 0 &&
          dimensionSortCondition.order.length > 0
        ) {
          sortConditions.push({
            dimension: dimensionSortCondition.dimension,
            order: dimensionSortCondition.order,
          });
        }

        if (
          metricSortCondition &&
          metricSortCondition.metric.length > 0 &&
          metricSortCondition.order.length > 0
        ) {
          sortConditions.push({
            metric: metricSortCondition.metric,
            order: metricSortCondition.order,
          });
        }

        if (sortConditions.length > 0) {
          reportSpec.sortConditions = sortConditions;
        }
      }

      const reportParams = {
        parent: `accounts/${publisherCode}`,
        requestBody: {
          reportSpec: reportSpec,
        },
      };

      const result =
        name === ToolName.GENERATE_NETWORK_REPORT
          ? await admob.accounts.networkReport.generate(reportParams)
          : await admob.accounts.mediationReport.generate(reportParams);

      // Check for a failed API request.
      if (!result.ok) {
        return {
          content: [
            {
              type: "text",
              text: `API request failed with status: ${result.status}`,
            },
          ],
          isError: true,
        };
      }

      const data = result.data;
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }

    ...
  });
}

Gemini CLI로 애드몹 실적 물어보기

자, 이제 모든 준비가 끝났습니다! 우리가 만든 기능이 정말 잘 작동하는지 확인할 시간이네요. 터미널에서 Ctrl + T를 눌러 서버 정보를 확인하면, 새로 추가한 도구들이 목록에 멋지게 나타나는 것을 볼 수 있습니다.

  🟢 AdMob - Ready (5 tools)
    Tools:
    - generate_mediation_report:
        Generates an AdMob Mediation report based on the provided
  report specification.
    - generate_network_report:
        Generates an AdMob Network report based on the provided report
  specification.
    - get_account:
        Gets information about the AdMob publisher account.
    - list_ad_units:
        List the ad units under the AdMob publisher account.
    - list_apps:
        List the apps under the AdMob publisher account.

그럼, 새로 만든 리포트 도구를 활용해야만 답할 수 있는 질문 몇 가지를 던져볼까요?

지난 7일간 애드몹 네트워크 실적 조회

  • 나: “Based on AdMob Network report, how much did I earn over the last 7 days?”
  • Gemini:
 ╭───────────────────────────────────────────────────────────────────────╮
 │ ✓  generate_network_report (AdMob MCP Server) {"metrics":["ESTIMATED… │
 │                                                                       │
 │    [                                                                  │
 │      {                                                                │
 │        "header": {                                                    │
 │          "dateRange": {                                               │
 │            "startDate": {                                             │
 │              "year": 2025,                                            │
 │              "month": 9,                                              │
 │              "day": 8                                                 │
 │            },                                                         │
 │            "endDate": {                                               │
 │              "year": 2025,                                            │
 │              "month": 9,                                              │
 │              "day": 15                                                │
 │            }                                                          │
 │          },                                                           │
 │          "localizationSettings": {                                    │
 │            "currencyCode": "USD"                                      │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "row": {                                                       │
 │          "metricValues": {                                            │
 │            "ESTIMATED_EARNINGS": {                                    │
 │              "microsValue": "xxxxxxx"                                 │
 │            }                                                          │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "footer": {                                                    │
 │          "matchingRowCount": "1"                                      │
 │        }                                                              │
 │      }                                                                │
 │    ]                                                                  │
 ╰───────────────────────────────────────────────────────────────────────╯
✦ You earned $X.XX over the last 7 days.

보세요! Gemini가 generate_network_report 도구를 정확히 호출해서 지난 7일간의 예상 수입을 깔끔하게 알려주네요.

가장 많은 수익을 올린 광고 네트워크 조회

  • 나: “Based on the mediation report, what’s the top 5 ad networks that I earned the most?”
  • Gemini:
 ╭───────────────────────────────────────────────────────────────────────╮
 │ ✓  generate_mediation_report (AdMob MCP Server) {"dateRangeStart":"2… │
 │                                                                       │
 │    ... first 27 lines hidden ...                                      │
 │          },                                                           │
 │          "metricValues": {                                            │
 │            "ESTIMATED_EARNINGS": {                                    │
 │              "microsValue": "XXXXXXXX"                                │
 │            }                                                          │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "row": {                                                       │
 │          "dimensionValues": {                                         │
 │            "AD_SOURCE": {                                             │
 │              "value": "3525379893916449117",                          │
 │              "displayLabel": "Pangle (bidding)"                       │
 │            }                                                          │
 │          },                                                           │
 │          "metricValues": {                                            │
 │            "ESTIMATED_EARNINGS": {                                    │
 │              "microsValue": "XXXXXXXX"                                │
 │            }                                                          │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "row": {                                                       │
 │          "dimensionValues": {                                         │
 │            "AD_SOURCE": {                                             │
 │              "value": "1328079684332308356",                          │
 │              "displayLabel": "AppLovin (bidding)"                     │
 │            }                                                          │
 │          },                                                           │
 │          "metricValues": {                                            │
 │            "ESTIMATED_EARNINGS": {                                    │
 │              "microsValue": "XXXXXXX"                                 │
 │            }                                                          │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "row": {                                                       │
 │          "dimensionValues": {                                         │
 │            "AD_SOURCE": {                                             │
 │              "value": "11198165126854996598",                         │
 │              "displayLabel": "Meta Audience Network                   │
 │    (bidding)"                                                         │
 │            }                                                          │
 │          },                                                           │
 │          "metricValues": {                                            │
 │            "ESTIMATED_EARNINGS": {                                    │
 │              "microsValue": "XXXXXXX"                                 │
 │            }                                                          │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "row": {                                                       │
 │          "dimensionValues": {                                         │
 │            "AD_SOURCE": {                                             │
 │              "value": "8419777862490735710",                          │
 │              "displayLabel": "Fluct (bidding)"                        │
 │            }                                                          │
 │          },                                                           │
 │          "metricValues": {                                            │
 │            "ESTIMATED_EARNINGS": {                                    │
 │              "microsValue": "XXXXXXXX"                                │
 │            }                                                          │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "row": {                                                       │
 │          "dimensionValues": {                                         │
 │            "AD_SOURCE": {                                             │
 │              "value": "4918705482605678398",                          │
 │              "displayLabel": "OpenX (bidding)"                        │
 │            }                                                          │
 │          },                                                           │
 │          "metricValues": {                                            │
 │            "ESTIMATED_EARNINGS": {                                    │
 │              "microsValue": "XXXXXXXX"                                │
 │            }                                                          │
 │          }                                                            │
 │        }                                                              │
 │      },                                                               │
 │      {                                                                │
 │        "footer": {                                                    │
 │          "matchingRowCount": "6"                                      │
 │        }                                                              │
 │      }                                                                │
 │    ]                                                                  │
 ╰───────────────────────────────────────────────────────────────────────╯
+ Based on the mediation report for the last 30 days, here are your top 5 ad networks by earnings:

   1. AdMob Network: $XX.XX
   2. Pangle (bidding): $XX.XX
   3. AppLovin (bidding): $XX.XX
   4. Meta Audience Network (bidding): $XX.XX
   5. Fluct (bidding): $XX.XX

이번에는 미디에이션 리포트를 활용해서 수익이 가장 높았던 광고 네트워크 순위도 훌륭하게 정리해 주는 것을 확인할 수 있습니다.

마무리하며

지금까지 애드몹 API를 활용하여 MCP 서버를 구축하고, Gemini CLI와 연동하여 자연어로 애드몹 실적 데이터를 조회하는 여정을 함께했습니다.

이 시리즈에서 사용한 전체 소스 코드는 GitHub 저장소에 공개해 두었으니, 여러분만의 AI 에이전트 서버를 구축하는 데 좋은 출발점이 되기를 바랍니다 :)

참조 링크

kunny

커니

안드로이드와 오픈소스, 코틀린(Kotlin)에 관심이 많습니다. 한국 GDG 안드로이드 운영자 및 GDE 안드로이드로 활동했으며, 현재 구글에서 애드몹 기술 지원을 담당하고 있습니다.

Read More