{"_id":"@bdmarvin/mcp-server-gsc","_rev":"2-ff37e88dc41af7cb2e6003e6f63e3fcc","name":"@bdmarvin/mcp-server-gsc","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@bdmarvin/mcp-server-gsc","version":"0.2.0","keywords":["mcp","google search console","gsc","api","typingmind","oauth","oauth2","model context protocol"],"author":{"url":"Original Author","name":"Yuexun Jiang","email":"yuexunjiang@gmail.com"},"license":"MIT","_id":"@bdmarvin/mcp-server-gsc@0.2.0","maintainers":[{"name":"bdmarvin","email":"azrlmaster@gmail.com"}],"homepage":"https://github.com/Bdmarvin1/mcp-server-gsc#readme","bugs":{"url":"https://github.com/Bdmarvin1/mcp-server-gsc/issues"},"bin":{"mcp-server-gsc":"dist/index.js"},"dist":{"shasum":"905af96f23cae514f722a3ab58b7662cbf870134","tarball":"https://registry.npmjs.org/@bdmarvin/mcp-server-gsc/-/mcp-server-gsc-0.2.0.tgz","fileCount":5,"integrity":"sha512-nAZpngSiM06UoQz3JVQB3/9CEpjKzavnpd8vmQRIQbRLfr7xgh1Uu9T9kFKpZSeYoQfSjuaRa/rYuON8/nWMqA==","signatures":[{"sig":"MEQCIFM0fIg3d+CB22FuK0LkZkJtvee33u5M70s3hRdR1QWWAiAkAeYhL0K3LhJvcY7EUefFgPeLsCNJvf29Q90fNcrXMQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21686},"type":"module","gitHead":"ff5a3d8b568b00dee8d9447a0019c8e77240d2b7","scripts":{"build":"tsc && shx chmod +x dist/*.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"bdmarvin","email":"azrlmaster@gmail.com"},"repository":{"url":"git+https://github.com/Bdmarvin1/mcp-server-gsc.git","type":"git"},"_npmVersion":"10.9.2","description":"A Model Context Protocol (MCP) server providing access to Google Search Console using OAuth2 tokens.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"zod":"^3.23.8","googleapis":"^144.0.0","zod-to-json-schema":"^3.23.5","google-auth-library":"^9.15.0","@google-cloud/local-auth":"^3.0.1","@modelcontextprotocol/sdk":"^1.0.1"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.10.0+sha512.73a29afa36a0d092ece5271de5177ecbf8318d454ecd701343131b8ebc0c1a91c487da46ab77c8e596d6acf1461e3594ced4becedf8921b074fbd8653ed7051c","devDependencies":{"shx":"^0.3.4","tsx":"^4.19.2","typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-gsc_0.2.0_1748214426227_0.5422388164620535","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bdmarvin/mcp-server-gsc","version":"0.2.1","description":"A Model Context Protocol (MCP) server providing access to Google Search Console using OAuth2 tokens.","author":{"name":"Yuexun Jiang","email":"yuexunjiang@gmail.com","url":"Original Author"},"license":"MIT","type":"module","bin":{"mcp-server-gsc":"dist/index.js"},"scripts":{"build":"tsc && shx chmod +x dist/*.js","prepare":"npm run build","watch":"tsc --watch"},"repository":{"type":"git","url":"git+https://github.com/Bdmarvin1/mcp-server-gsc.git"},"keywords":["mcp","google search console","gsc","api","typingmind","oauth","oauth2","model context protocol"],"packageManager":"pnpm@9.10.0+sha512.73a29afa36a0d092ece5271de5177ecbf8318d454ecd701343131b8ebc0c1a91c487da46ab77c8e596d6acf1461e3594ced4becedf8921b074fbd8653ed7051c","dependencies":{"@google-cloud/local-auth":"^3.0.1","@modelcontextprotocol/sdk":"^1.0.1","google-auth-library":"^9.15.0","googleapis":"^144.0.0","zod":"^3.23.8","zod-to-json-schema":"^3.23.5"},"devDependencies":{"@types/node":"^22.10.1","shx":"^0.3.4","tsx":"^4.19.2","typescript":"^5.7.2"},"_id":"@bdmarvin/mcp-server-gsc@0.2.1","gitHead":"0b30341d7643848c933af311723222e83e35cf22","bugs":{"url":"https://github.com/Bdmarvin1/mcp-server-gsc/issues"},"homepage":"https://github.com/Bdmarvin1/mcp-server-gsc#readme","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-8kZ1yED2CWMJBHQJ1BAwG6eTWFsHoIcObBKU5y6G24ipMg33kzSsbImfENIpYpEV2vdsN1wyczJuD0ZbRaNk2A==","shasum":"1a18e9c5949dd2d08a5ac22be7b12888917e29cf","tarball":"https://registry.npmjs.org/@bdmarvin/mcp-server-gsc/-/mcp-server-gsc-0.2.1.tgz","fileCount":5,"unpackedSize":20676,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDlEL19umlhLgS6ju58CjyQlY5OUpkZmp8M/qLuXZ996AiANHyb8d2Xs5FnXBZKFTZ1yrBtEAOwKww9/dBy2Qmk+uA=="}]},"_npmUser":{"name":"bdmarvin","email":"azrlmaster@gmail.com"},"directories":{},"maintainers":[{"name":"bdmarvin","email":"azrlmaster@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server-gsc_0.2.1_1748215492476_0.21714342108392137"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-25T23:07:06.156Z","modified":"2025-05-25T23:24:52.859Z","0.2.0":"2025-05-25T23:07:06.454Z","0.2.1":"2025-05-25T23:24:52.662Z"},"bugs":{"url":"https://github.com/Bdmarvin1/mcp-server-gsc/issues"},"author":{"name":"Yuexun Jiang","email":"yuexunjiang@gmail.com","url":"Original Author"},"license":"MIT","homepage":"https://github.com/Bdmarvin1/mcp-server-gsc#readme","keywords":["mcp","google search console","gsc","api","typingmind","oauth","oauth2","model context protocol"],"repository":{"type":"git","url":"git+https://github.com/Bdmarvin1/mcp-server-gsc.git"},"description":"A Model Context Protocol (MCP) server providing access to Google Search Console using OAuth2 tokens.","maintainers":[{"name":"bdmarvin","email":"azrlmaster@gmail.com"}],"readme":"# Google Search Console MCP Server\r\n[![smithery badge](https://smithery.ai/badge/mcp-server-gsc)](https://smithery.ai/server/mcp-server-gsc)\r\n\r\nA Model Context Protocol (MCP) server providing access to Google Search Console. This version has been modified to use OAuth 2.0 access tokens for authentication.\r\n\r\n## Features\r\n\r\n- Search analytics data retrieval with dimensions support\r\n- Rich data analysis with customizable reporting periods\r\n- Site and sitemap management capabilities\r\n- URL inspection\r\n\r\n## Prerequisites\r\n\r\n- Node.js 18 or later\r\n- Access to a Google Account that has permissions for the desired Google Search Console properties.\r\n- An \"MCP OAuth Controller\" server (like `typingmind-mcp` or a similar custom implementation) that handles the Google OAuth 2.0 flow and injects access tokens.\r\n\r\n## Installation\r\n\r\n### Installing via Smithery\r\n\r\n(Note: Smithery installation might need to be updated to reflect the new authentication mechanism if it relied on service account environment variables.)\r\n\r\nTo install Google Search Console for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-server-gsc):\r\n\r\n```bash\r\nnpx -y @smithery/cli install mcp-server-gsc --client claude\r\n```\r\n\r\n### Manual Installation\r\n```bash\r\nnpm install mcp-server-gsc \r\n# or if you are working with the forked repository:\r\n# git clone https://github.com/Bdmarvin1/mcp-server-gsc.git\r\n# cd mcp-server-gsc\r\n# pnpm install # (or npm install / yarn install based on your setup)\r\n# pnpm run build \r\n```\r\n\r\n## Authentication Setup (OAuth 2.0 via MCP OAuth Controller)\r\n\r\nThis server no longer uses Google Service Account keys directly. Instead, it relies on an external MCP OAuth Controller to perform the Google OAuth 2.0 authentication flow and provide a Google Access Token with each tool call.\r\n\r\nThe MCP OAuth Controller is responsible for:\r\n1.  Handling the Google OAuth 2.0 flow with the end-user.\r\n2.  Securely storing Google refresh tokens.\r\n3.  Injecting a fresh Google Access Token (`__google_access_token__`) and optionally Google User ID (`__google_user_id__`) and email (`__google_user_email__`) into the `arguments` object passed to this server's tools.\r\n\r\n**This GSC MCP Server expects the `__google_access_token__` to be present in the `arguments` of each tool request.**\r\n\r\n## Usage\r\n\r\nThis server is intended to be called by an MCP OAuth Controller. The controller will manage starting this server and invoking its tools.\r\n\r\n### Example: How the MCP OAuth Controller interacts (Conceptual)\r\n\r\nWhen a client (e.g., TypingMind UI) needs to use a tool from this GSC server:\r\n1. Client makes a request to the MCP OAuth Controller's `/clients/:id/call_tools` endpoint.\r\n2. The MCP OAuth Controller:\r\n    a. Authenticates the client and the user context.\r\n    b. Retrieves/refreshes the Google Access Token for the user.\r\n    c. Constructs the arguments for the GSC tool, injecting `__google_access_token__`.\r\n    d. Calls the appropriate tool on this `mcp-server-gsc` instance (e.g., via StdioClientTransport), passing the augmented arguments.\r\n\r\n**No `GOOGLE_APPLICATION_CREDENTIALS` environment variable is needed or used by this server anymore.**\r\n\r\n## Available Tools\r\n\r\n(Tool parameters remain the same, but authentication is handled via the injected access token.)\r\n\r\n### `list_sites`\r\nList all sites the authenticated Google Account has access to in Google Search Console.\r\n- Input: (No specific parameters beyond the injected `__google_access_token__`)\r\n\r\n### `search_analytics`\r\nGet search performance data from Google Search Console.\r\n- **Required Parameters (in `arguments` object):**\r\n    - `siteUrl`: Site URL (format: `http://www.example.com/` or `sc-domain:example.com`)\r\n    - `startDate`: Start date (YYYY-MM-DD)\r\n    - `endDate`: End date (YYYY-MM-DD)\r\n- **Optional Parameters (in `arguments` object):**\r\n    - `dimensions`: Comma-separated list (`query,page,country,device,searchAppearance`)\r\n    - `type`: Search type (`web`, `image`, `video`, `news`)\r\n    - `aggregationType`: Aggregation method (`auto`, `byNewsShowcasePanel`, `byProperty`, `byPage`)\r\n    - `rowLimit`: Maximum rows to return (default: 1000)\r\n\r\nExample `arguments` for `search_analytics` (as prepared by the MCP OAuth Controller):\r\n```json\r\n{\r\n  \"__google_access_token__\": \"ya29.a0AfH6SMB...\", \r\n  \"__google_user_id__\": \"109...\",\r\n  \"__google_user_email__\": \"user@example.com\",\r\n  \"siteUrl\": \"https://example.com\",\r\n  \"startDate\": \"2024-01-01\",\r\n  \"endDate\": \"2024-01-31\",\r\n  \"dimensions\": \"query,country\",\r\n  \"type\": \"web\",\r\n  \"rowLimit\": 500\r\n}\r\n```\r\n\r\n### `index_inspect`\r\nInspect a URL to see if it is indexed or can be indexed.\r\n- **Required Parameters (in `arguments` object):**\r\n    - `siteUrl`: The URL of the Search Console property that includes the page to inspect.\r\n    - `inspectionUrl`: The exact URL of the page to inspect (must be within `siteUrl`).\r\n- **Optional Parameters (in `arguments` object):**\r\n    - `languageCode`: Language code for the inspection (e.g., \"en-US\").\r\n\r\n### `list_sitemaps`\r\nList sitemaps for a site in Google Search Console.\r\n- **Required Parameters (in `arguments` object):**\r\n    - `siteUrl`: The site's URL.\r\n- **Optional Parameters (in `arguments` object):**\r\n    - `sitemapIndex`: URL of a sitemap index. If specified, lists sitemaps in the index.\r\n\r\n### `get_sitemap`\r\nGet a sitemap for a site in Google Search Console.\r\n- **Required Parameters (in `arguments` object):**\r\n    - `siteUrl`: The site's URL.\r\n    - `feedpath`: The URL of the sitemap (e.g., `https://www.example.com/sitemap.xml`).\r\n\r\n### `submit_sitemap`\r\nSubmit a sitemap for a site in Google Search Console.\r\n- **Required Parameters (in `arguments` object):**\r\n    - `siteUrl`: The site's URL.\r\n    - `feedpath`: The URL of the sitemap to submit.\r\n\r\n## License\r\n\r\nMIT\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please read our contributing guidelines before submitting pull requests.\r\n","readmeFilename":"README.md"}