gbp-mcp
gbp-mcp
Servidor MCP independiente para Google Business Profile. Expone cuentas, ubicaciones, reseñas, publicaciones, medios, preguntas y respuestas, estadísticas y algunas acciones de escritura como herramientas JSON para Cursor, Claude Desktop y Claude Code.
Este repositorio no es la aplicación Streamlit GMB-Management-System. No hay interfaz web, exportación a PDF, gráficos Plotly, panel i18n ni redacción de respuestas Gemini. Las llamadas a la API de Google residen en este repositorio (data_fetcher.py, drive_helper.py). No es necesario clonar ni ejecutar el proyecto Streamlit.
Tools
Lectura:
list_accountslist_locationsget_daily_metricsget_search_keywordslist_reviewslist_postslist_medialist_questionsprofile_health_check
Escritura:
create_local_postupload_image_to_drivereply_to_review
Ayudantes de autenticación:
start_oauthcomplete_oauth
Cada herramienta devuelve solo JSON (sin objetos DataFrame, PDF ni gráficos).
Los IDs de ubicación aceptan accounts/{accountId}/locations/{locationId}, locations/{locationId} o un id simple. Las llamadas v4 (reseñas, publicaciones, medios) pasan por resolve_location_parent. Las fechas tienen formato YYYY-MM-DD. Las subidas a Drive toman bytes de imagen en base64 (file_base64) y pueden devolver una URL pública para publicaciones de GBP.
Related MCP server: google-ads-mcp
Requirements
Python 3.10+
Un cliente de OAuth de usuario de Google Cloud (Escritorio o Web). No se admiten cuentas de servicio.
Estos ámbitos de OAuth:
https://www.googleapis.com/auth/business.managehttps://www.googleapis.com/auth/drive.filehttps://www.googleapis.com/auth/drive.metadata.readonly
Habilita las API de Google que llamarán tus herramientas, normalmente:
My Business Account Management API
My Business Business Information API
My Business Q&A API
Business Profile Performance API
Google Drive API
Google My Business API (v4 discovery, used for reviews / posts / media)
Install
git clone https://github.com/marcusbtc/gbp-mcp.git
cd gbp-mcp
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtCopia .env.example y exporta los valores, o colócalos en el bloque env de tu cliente MCP. No subas .env, client_secret.json ni archivos de token.
cp .env.example .envAuthenticate (user OAuth only)
Nunca pongas tokens, tokens de actualización ni client_secret.json en git.
Necesitas un ID de cliente y secreto de OAuth de Google Cloud (GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET). Opcional: coloca un client_secret.json local en la raíz del repositorio (ignorado por git).
Añade esta URI de redirección en el cliente OAuth (a menos que la sobrescribas):
http://localhost:8753/Luego elige una de las siguientes:
Token por llamada — pasa
access_tokenen cualquier herramienta.Token de entorno — establece
GOOGLE_ACCESS_TOKEN. Actualización opcional:GOOGLE_REFRESH_TOKENmás id/secreto de cliente.Ayudante local (abre un navegador, escribe un archivo de token ignorado por git, por defecto
.gmb-mcp-token.json):
python mcp_server.py --oauthHerramientas MCP — llama a
start_oauth, aprueba el acceso, luegocomplete_oauthcon el parámetro de consultacodede la URL de redirección.
complete_oauth y --oauth nunca imprimen tokens. Sobrescribe la ruta del token con GMB_MCP_TOKEN_PATH. Sobrescribe la redirección con GOOGLE_REDIRECT_URI.
Run
stdio (predeterminado — Cursor, Claude Desktop, Claude Code):
python mcp_server.py
# or: python -m src.gmb_mcpHTTP transmisible opcional:
python mcp_server.py --http --host 127.0.0.1 --port 8765Endpoint: http://127.0.0.1:8765/mcp
Connect from Cursor
Añade a la configuración de MCP (.cursor/mcp.json del proyecto o configuración de MCP del usuario). Usa una ruta absoluta. No pongas tokens en un archivo subido.
{
"mcpServers": {
"google-business-profile": {
"command": "python",
"args": ["mcp_server.py"],
"cwd": "/absolute/path/to/gbp-mcp",
"env": {
"GOOGLE_CLIENT_ID": "<your-oauth-client-id>",
"GOOGLE_CLIENT_SECRET": "<your-oauth-client-secret>"
}
}
}
}Si ya tienes un token de acceso de usuario y prefieres no ejecutar --oauth:
{
"mcpServers": {
"google-business-profile": {
"command": "python",
"args": ["mcp_server.py"],
"cwd": "/absolute/path/to/gbp-mcp",
"env": {
"GOOGLE_ACCESS_TOKEN": "<your-oauth-access-token>"
}
}
}
}Apunta command al intérprete del venv si no quieres activarlo primero, por ejemplo /absolute/path/to/gbp-mcp/.venv/bin/python.
HTTP en lugar de stdio (inicia el servidor tú mismo primero):
{
"mcpServers": {
"google-business-profile": {
"url": "http://127.0.0.1:8765/mcp"
}
}
}Connect from Claude Desktop / Claude Code
Claude Desktop (claude_desktop_config.json) y Claude Code usan la misma forma stdio:
{
"mcpServers": {
"google-business-profile": {
"command": "/absolute/path/to/gbp-mcp/.venv/bin/python",
"args": ["/absolute/path/to/gbp-mcp/mcp_server.py"],
"env": {
"GOOGLE_CLIENT_ID": "<your-oauth-client-id>",
"GOOGLE_CLIENT_SECRET": "<your-oauth-client-secret>"
}
}
}
}Ejecuta python mcp_server.py --oauth una vez en ese directorio de trabajo para que exista .gmb-mcp-token.json, o establece GOOGLE_ACCESS_TOKEN.
Security
Nunca subas
client_secret.json,.envni.gmb-mcp-token.json.Nunca pegues tokens de acceso en chats, issues o capturas de pantalla.
Las herramientas y ayudantes de OAuth no devuelven tokens.
Las subidas a Drive con
make_public=truecrean una URL de archivo legible por todo el mundo. Úsala solo cuando tengas la intención de adjuntar la imagen a una publicación pública de GBP.
Development
pip install -r requirements-dev.txt
ruff check src tests mcp_server.py
pytest
python -m py_compile mcp_server.py data_fetcher.py drive_helper.py health_check.py
python mcp_server.py --helpLicense
MIT (consulta LICENSE).
This server cannot be installed
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
- Flicense-qualityDmaintenanceAn MCP server that enables interaction with Google's My Business Account Management API, allowing users to perform account management operations through natural language interactions.

google-ads-mcpofficial
Alicense-qualityBmaintenanceMCP server that provides tools and resources for interacting with Google Ads API, enabling search, metadata retrieval, and account management through natural language.865Apache 2.0- Alicense-qualityCmaintenanceMCP server to read, write, create, and format Google Sheets via OAuth2 authentication, providing tools for spreadsheet management.425MIT
- Alicense-qualityCmaintenanceAn MCP server that provides 40 tools for managing Google Business Profiles, including accounts, locations, verifications, reviews, and performance analytics, enabling AI agents to interact with GBP via REST APIs.MIT
Related MCP Connectors
Live Google Maps business search, review, and photo data for AI agents over MCP.
MCP server for Google search results via SERP API
MCP server for interacting with the Supabase platform
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/marcusbtc/gbp-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server