adsense-mcp
AdSense MCP
AdSense Management API v2에서 임시 데이터를 추출하는 MCP 서버입니다. 제한 없는 보고서 인터페이스를 제공하므로, 지원되는 모든 AdSense 측정기준, 측정항목, 필터, 기간, 정렬 순서, 시간대, 언어, 통화, 한도를 accounts.reports.generate에 전달할 수 있습니다.
서버는 읽기 전용 https://www.googleapis.com/auth/adsense.readonly OAuth 범위를 사용합니다. AdSense 계정에 쓰기 작업을 수행하지 않습니다.
Install
게시된 후에는 npx -y @sirmacke/adsense-mcp로 MCP 클라이언트에서 실행하세요. ADSENSE_ACCESS_TOKEN을 구성하거나, ADSENSE_CLIENT_ID, ADSENSE_CLIENT_SECRET, ADSENSE_REFRESH_TOKEN 세 가지를 모두 구성하세요.
Related MCP server: google-ads-mcp
Security
OAuth 액세스 토큰, 리프레시 토큰, 클라이언트 시크릿은 자격 증명입니다. 이 저장소, 이슈 트래커, 셸 기록, 다른 사람과 공유되는 MCP 구성에 포함하지 마세요. 하나라도 노출된 경우 Google Cloud에서 즉시 취소하세요. SECURITY.md를 참조하세요.
Setup
Google Cloud에서 AdSense Management API를 사용 설정하고 OAuth 데스크톱 클라이언트를 만드세요.
https://www.googleapis.com/auth/adsense.readonly범위가 부여된 리프레시 토큰을 획득하세요. 비밀로 유지하세요..env.example을 안전한 환경 구성으로 복사하고ADSENSE_ACCESS_TOKEN또는 OAuth 클라이언트 ID, 시크릿, 리프레시 토큰을 입력하세요.설치 및 빌드:
npm install
npm run build일회성 OAuth 인증(gcloud 없이)
Google Cloud에서 OAuth 데스크톱 클라이언트 JSON을 다운로드한 후 실행하세요:
$env:ADSENSE_OAUTH_CLIENT_FILE = "C:\secure\adsense-client.json"
$env:ADSENSE_TOKEN_FILE = "C:\secure\adsense-oauth.json"
npm run authorize이 명령은 localhost 콜백에서 Google 동의 화면을 열고 클라이언트 ID, 클라이언트 시크릿, 리프레시 토큰을 개인 토큰 파일에만 저장합니다. 해당 값을 MCP 구성의 ADSENSE_CLIENT_ID, ADSENSE_CLIENT_SECRET, ADSENSE_REFRESH_TOKEN 필드에 복사하세요. 외부 사용자 동의 화면을 테스트 중 상태로 두지 마세요. 해당 리프레시 토큰은 7일 후 만료됩니다.
Claude Desktop
현재 Claude Desktop 빌드는 확장 프로그램을 사용합니다. npm run package를 실행한 다음 설정 → 확장 프로그램 → 고급 설정 → 확장 프로그램 설치에서 build/adsense-mcp.mcpb를 설치하세요. OAuth 값을 안전하게 입력하라는 메시지가 표시됩니다. 클래식 구성을 지원하는 설치에서는 대신 다음을 추가하세요:
{
"mcpServers": {
"adsense": {
"command": "node",
"args": ["/absolute/path/to/adsense-mcp/dist/index.js"],
"env": {
"ADSENSE_CLIENT_ID": "...",
"ADSENSE_CLIENT_SECRET": "...",
"ADSENSE_REFRESH_TOKEN": "..."
}
}
}
}Codex
Codex MCP 구성에 동일한 명령, 인수, 환경 변수를 사용하여 해당 서버 정의를 추가하세요. 이 서버는 표준 MCP stdio 전송을 사용하며 두 클라이언트 모두에서 작동합니다.
Tools
adsense_list_accountsadsense_get_accountadsense_generate_report
보고서 요청 예시: metrics: ["ESTIMATED_EARNINGS", "PAGE_VIEWS", "CLICKS"], dimensions: ["DATE", "COUNTRY_NAME"], dateRange: "LAST_7_DAYS", orderBy: ["-ESTIMATED_EARNINGS"].
Verify
npm test
npm run build실제 검증에는 위의 OAuth 값과 AdSense 계정도 필요합니다. API의 보고서 엔드포인트는 GET /v2/{account}/reports:generate이며, AdSense 또는 AdSense 읽기 전용 OAuth 범위가 필요합니다.
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceMCP server for Google AdSense management. Create ad units, generate framework-specific ad code, manage earnings reports, and automate ads.txt — all from your AI assistant.15MIT
- Alicense-qualityDmaintenanceMCP server for Google Ads campaign reporting and management via Claude, enabling GAQL queries, performance metrics, and campaign modifications.28MIT
- Alicense-qualityBmaintenanceMCP server for querying Google Analytics accounts, properties, reports, and realtime data using the Data API and Admin API.Apache 2.0
- Alicense-qualityFmaintenanceMCP server that provides tools to interact with Google Analytics APIs, enabling account and property retrieval, report running, and custom dimension/metrics access.Apache 2.0
Related MCP Connectors
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SirMacke/adsense-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server