The Agentic SEO Engine

The Agentic SEO Engine

A headless, API-first MCP server that transforms unstructured creative portfolios into validated, machine-readable llms.txt manifests for the agentic web.

Category
Visit Server

README

The Agentic SEO Engine

A headless, API-first MCP server that transforms unstructured creative portfolios into validated, machine-readable llms.txt manifests for the agentic web.

Live deployment: https://agentic-seo-engine-796932810904.us-central1.run.app/sse

Built for the Kaggle AI Agents: Intensive Vibe Coding Capstone — Agents for Business track.


The Problem

Traditional SEO is becoming obsolete in the agentic web. Autonomous agents — systems that crawl the web to procure talent, data, and services on behalf of enterprises — rely on clean, machine-readable specifications rather than visual layouts. Visual-heavy portfolios, experiential landing pages, and creative directories are fundamentally invisible to these programmatic crawlers, leaving human creators undiscoverable by the very systems increasingly responsible for sourcing them.

The Solution

The Agentic SEO Engine bridges this gap. Given any portfolio URL, it:

  1. Ingests the page deterministically, stripping layout noise and presentation styling
  2. Synthesizes the creator's implicit disciplines, tone, and structure using Gemini inside a strict instruction harness
  3. Validates the output against a rigid Pydantic V2 schema, guaranteeing standards-compliant, structured JSON every time

The result is a compiled llms.txt manifest — a foundational SEO artifact for the agentic internet, ensuring human creators remain discoverable by enterprise procurement agents.

Why Agents

A static scraper can extract text, but it cannot reason about implicit creative intent — the difference between a portfolio's literal content and its actual thematic identity. This task is fundamentally interpretive, which is why an LLM-driven synthesis step, not a fixed extraction template, sits at the core of the pipeline.

Architecture

[ Unstructured URL ] ➔ [ Deterministic Ingestion ] ➔ [ Gemini Inference ] ➔ [ Pydantic V2 Validation ] ➔ [ Verified llms.txt JSON ]

  • Ingestion layer: httpx + BeautifulSoup strip scripts, styles, nav, and footer noise, leaving core structural text.
  • Inference layer: The cleaned text is passed to gemini-2.5-flash-lite inside a disciplined system instruction that rejects conversational filler and assumption.
  • Validation layer: Pydantic V2 models (CreatorProfile, ProjectOrAsset, MetadataPair) enforce strict typing on the model's output, with a recursive schema-cleaning step that strips permissive additionalProperties markers before the request is even sent.
  • Interface layer: Exposed as a single tool, generate_llms_manifest, via a headless Model Context Protocol (MCP) server — no UI, pure machine-to-machine utility.

Security

  • No API keys or credentials are hardcoded anywhere in the codebase.
  • The Gemini API key is injected at the infrastructure level as a Cloud Run environment variable, never bundled into the container image.
  • All model inputs/outputs pass through strict Pydantic V2 schema validation, preventing malformed or injected data from reaching the final manifest.
  • Service access is scoped via GCP IAM policy bindings controlling which identities can build, push, and invoke the deployed container.

Tech Stack

  • MCP: Official MCP Python SDK (mcp.server.fastmcp.FastMCP)
  • LLM: Google Gemini (google-genai SDK, gemini-2.5-flash-lite)
  • Validation: Pydantic V2
  • Scraping: httpx, BeautifulSoup4
  • Deployment: Google Cloud Run (Docker, python:3.11-slim)

Setup & Local Development

Prerequisites

Installation

git clone https://github.com/<your-username>/agentic-seo-engine.git
cd agentic-seo-engine
pip install -r requirements.txt

Configuration

Create a .env file in the project root (this file is git-ignored and never committed): GEMINI_API_KEY=your_actual_key_here

Running Locally

python server.py

With no PORT environment variable set, the server runs in stdio transport — ideal for local testing with the MCP Inspector or Claude Desktop.

Deploying to Google Cloud Run

gcloud run deploy agentic-seo-engine \
  --source . \
  --region us-central1 \
  --allow-unauthenticated \
  --port 8080

gcloud run services update agentic-seo-engine \
  --region us-central1 \
  --update-env-vars GEMINI_API_KEY=your_actual_key_here

When PORT is present in the environment (as Cloud Run sets automatically), the server switches to sse transport and binds to 0.0.0.0 on the assigned port.

Usage

Connect any MCP-compatible client to the server's SSE endpoint and invoke the generate_llms_manifest tool with a target portfolio URL:

from mcp import ClientSession
from mcp.client.sse import sse_client

async with sse_client("https://agentic-seo-engine-796932810904.us-central1.run.app/sse") as (read, write):
    async with ClientSession(read, write) as session:
        await session.initialize()
        result = await session.call_tool(
            "generate_llms_manifest",
            {"portfolio_url": "https://example-creator-portfolio.com"}
        )
        print(result)

Example Output

{
  "profile": {
    "name": "Vibe Code",
    "role_title": "AI App Builder",
    "summary": "Builds apps and websites with AI, focusing on rapid development and user-friendly interfaces...",
    "disciplines": ["AI Application Development", "Web Development", "Product Prototyping"]
  },
  "featured_works": [
    {
      "title": "Maison",
      "description": "Editorial home goods storefront.",
      "tags": ["ecommerce", "storefront", "template"]
    }
  ]
}

Project Status

This project was built as a rapid capstone prototype. It is deployed live and functioning, and serves as the foundation for continued development in a subsequent, more extensive agentic build.

Author

Ralph Torres

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured