# SEO with AI: Connect Your Website to Claude Code

> Learn how to connect your site to Claude Code, Search Console, Analytics and Bing, then run Lighthouse and a weekly SEO routine, step by step.

By Jonathan Ben Haim. Updated 2026-11-29. Source: https://jonathanai.io/blog/seo-with-ai-claude-code-website

A small business owner builds a website she is proud of. The design is clean, the photos are professional, and she spent weeks on the text. Three months later, almost no traffic comes from Google, and every time she starts reading about SEO she runs into dozens of terms like Sitemap, Canonical, Core Web Vitals, and pixels.

This happens to many people, and it usually comes down to three things: no time, no clear idea of how to start, and SEO never reaching the top of the priority list.

**In short:** For AI to do real SEO work, it needs access to your site's code and to data from Google Search Console, Google Analytics, and Bing Webmaster Tools. Open the site folder in [Claude Code](/blog/claude-code-pricing), connect your data (the easiest way is Composio), run Lighthouse, install any missing pixels and measurement tools, and build a weekly routine of check, plan, approval, and fix.

## Key takeaways

- AI needs two things to help with SEO: access to the site itself (code and files) and access to data that shows how the site performs in search engines.
- The recommended order is: connect AI to the site folder, connect Google Analytics and Google Search Console, connect Bing Webmaster Tools, run a Lighthouse audit, install missing pixels and measurement tools, then build a weekly plan and routine.
- Google Analytics has an official Google MCP server, which is mainly for reading data, but it does not cover Search Console.
- Bing Webmaster Tools connects with [an API key](/blog/connect-claude-to-public-apis) from Bing Webmaster Tools.
- IndexNow works with Bing, Yandex, and other engines, but not with Google.
- Run one fix at a time, measure weekly, and expect results to take several weeks.

## What does the overall setup look like?

The setup works when AI can read your site and see real search data at the same time. With both in place, it can diagnose problems, make fixes, and check the results in one loop.

The order that works well:

1. Connect AI to the site folder.
2. Connect Google Analytics and Google Search Console.
3. Connect Bing Webmaster Tools.
4. Run a Lighthouse audit.
5. Install missing pixels and measurement tools.
6. Build a plan and a weekly routine.

## How do you connect AI to your website?

Open your site folder in Claude Code. If your site is a code project (a folder with files), Claude Code can then see every page, the HTML tags, the robots file, the Sitemap, and the internal link structure, and it can edit them directly.

If your site is built on a visual platform that exports code or connects to GitHub, you can work with the site's repo instead. The more direct the connection, the more control the AI has. It can edit every detail, and you review everything before you publish.

Start with this prompt:

```
Scan the whole site and give me a snapshot: which pages exist, what the titles and descriptions look like, whether there is a Sitemap and robots file, and what is missing for SEO. Do not change anything yet.
```

## How do you connect Google Analytics and Google Search Console?

This is the step that makes the biggest difference. Without real data, AI is guessing. With data, it can see what is actually happening: which queries bring impressions, which pages get clicks, and where rankings are falling.

A few important points about the connection:

- The easiest route is Composio (see the next section). If you prefer a direct connection, Google Analytics has an official Google MCP server, [Google Analytics MCP server](https://developers.google.com/analytics/devguides/MCP). It is mainly designed for reading data, and it does not cover Search Console. For that reason, people use [community MCP servers](/blog/turn-any-api-into-mcp-server) that cover both.
- One community server, [search-console-mcp](https://github.com/saurabhsharma2u/search-console-mcp), combines Search Console, Analytics 4, and Bing Webmaster Tools in one interface. According to the project's documentation, you first run `npx search-console-mcp setup` to connect your accounts, then add it to Claude Code with a command like `claude mcp add search-console -- npx -y search-console-mcp`.
- Choose a connection with read-only permissions. Check what the server does before you give it access to customer data. A community server is code from an individual, not from Google.
- After setup, confirm the connection is active. In the terminal, run `claude mcp list`. Inside Claude Code, run `/mcp`.

Once the connection exists, you can ask for things like:

- Which queries are close to the first page of Google (rankings 8 to 20) and have a lot of impressions
- Which pages lost traffic in the last month
- Which pages compete with each other for the same keyword
- A URL inspection of your important pages, to find out which ones are not indexed and why

When you combine this with Analytics, you can also see what happens after the click: whether visitors stay, and which pages they leave from.

## Is there an easier way? How does Composio work?

Yes. Composio puts all your SEO tools in one place. You connect each tool once and talk to them in plain language.

Here is what is available there:

- **Google Search Console:** Pull clicks, impressions, CTR, and average position, broken down by query, page, device, and country. You can also run URL inspection for indexing problems, list Sitemaps, and submit a Sitemap. The toolkit page is [Composio: Google Search Console tools](https://docs.composio.dev/toolkits/google_search_console).
- **Google Analytics:** Run GA4 reports with the dimensions and metrics you choose, and check that the dimensions and metrics are compatible before you run a report. The toolkit page is [Composio: Google Analytics tools](https://docs.composio.dev/toolkits/google_analytics).
- **Bing Webmaster Tools:** Search performance (a daily summary, top queries, and top pages), performance for single pages and queries, crawl diagnostics, URL inspection, submitting up to 500 URLs in one request for indexing, and checking your submission quotas. You connect to Bing with an API key from Bing Webmaster Tools. The toolkit page is [Composio: Bing Webmaster Tools tools](https://docs.composio.dev/toolkits/bing_webmaster_tools).

You can also connect to Analytics directly, without Composio. What Composio adds is that all the tools sit in the same place, and Claude can move between them. For example, it can compare what Google sees with what Bing sees, and check those numbers against real traffic from Analytics.

Example requests:

```
Pull the 50 queries with the most impressions in the last 28 days from Search Console, and compare them to the period before that.
```

```
Check which pages get impressions in Bing, and submit the pages updated this week for indexing.
```

## Can Claude Cowork install pixels and a tag manager for you?

Yes. Claude Cowork can [use your computer](/blog/5-ai-agents-that-control-your-computer) to install pixels and a Tag Manager for you. This is useful because the setup is tedious manual work: logging into accounts, creating pixels, copying codes, and pasting them in the right place. When Claude has no ready connector for a service, it goes to the browser and, if needed, clicks and types on the screen the way you would.

This ability is in beta. It is available on [Pro, Max, and Ultra plans](/blog/claude-pro-vs-max) in the Claude Desktop app for Mac and Windows. Claude asks for your approval before it enters a new app.

Things you can ask it to do:

- Create the Google Analytics 4 tag and confirm it loads on the site
- Install a Tag Manager and set up the tags in it
- Install the Facebook and X (Twitter) pixels
- Verify site ownership in Search Console and Bing
- Check at the end that every tag actually fires

Be careful here. This means Claude is entering your accounts. Anthropic itself recommends starting with apps you trust and not working with sensitive information. Sit with Claude the first time, approve each sensitive action, and check at the end that everything loads correctly. You can read more in [Let Claude use your computer in Cowork](https://support.claude.com/en/articles/14128542-let-claude-use-your-computer-in-cowork) and [Use Claude Cowork safely](https://support.claude.com/en/articles/13364135-use-claude-cowork-safely).

## How do you connect Bing Webmaster Tools?

Connect Bing Webmaster Tools, because many people skip Bing and that is a mistake. Bing is a traffic source on its own. It also feeds other services, such as the search in Microsoft Copilot. The connection gives you information about crawl problems, broken pages, redirect chains, and search performance.

There is also a protocol called IndexNow, launched by Microsoft Bing and Yandex. You notify search engines as soon as a page is new, updated, or deleted, instead of waiting for them to find the change on their own. Note that IndexNow serves Bing, Yandex, and other engines, but not Google. For Google, you use Search Console and a valid Sitemap.

How to set it up:

1. Generate an IndexNow key on the IndexNow website or through Bing Webmaster Tools. The key must be between 8 and 128 characters.
2. Place a text file at the root of your domain. The file name is the key, and the content of the file is the key.
3. Ask AI to send a notification every time a page is published or changed. One request can send up to 10,000 URLs.

The official documentation is at [IndexNow documentation](https://www.indexnow.org/documentation).

## How do you run a Lighthouse audit?

Run Lighthouse on each important page. Lighthouse is a Google tool that checks a page and returns scores in four areas: performance, accessibility, best practices, and SEO. It is built into Chrome DevTools, and it also has a command-line version and a Node interface for running it automatically.

Chrome also published a way to work with Lighthouse [from an AI agent](/blog/ai-coding-agent-tools-repos), through Chrome DevTools for agents. In this version, the audit focuses on accessibility, SEO, and best practices. It also covers a newer area: how well AI assistants can understand the site and act on it. The example prompt Chrome suggests is to run a full audit on mobile and desktop and propose fixes. When the agent has access to your code, it can propose fixes directly, such as missing Meta tags, alt text for images, and accessibility issues.

A useful prompt:

```
Run Lighthouse on the home page and on the three most important pages, on mobile and on desktop. Give me a table of the scores and a ranked list of fixes by biggest impact. Do not fix anything until I approve.
```

More on Lighthouse is in the [Lighthouse documentation](https://developer.chrome.com/docs/lighthouse). For the AI agent version, see [Automate Lighthouse audits with AI agents](https://developer.chrome.com/docs/devtools/agents/use-cases/lighthouse-audit).

## Which pixels and measurement tools should you install?

Install the measurement tools your site is missing. Many sites lose data because pixels are not set up. Without measurement, you
