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
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选