v0.1.0-alpha.10 — 已发布至 npm

Next.js 的 AI 基础设施层

让你的网站被 AI 搜索引擎收录、被 AI Agent 调用。一个配置文件,UI 零改动。

开始使用
pnpm add next-ai-ready

AI 从你的站点获取一切所需

现有 Next.js 应用自动获得完整的 AI 接口 —— 发现、检索、工具调用。

AI 搜索收录

你的内容出现在 ChatGPT、Perplexity、Google AI Overviews 中。结构化的 llms.txt 和逐页 Markdown 让 AI 可引用你。

Agent 工具调用

使用类型安全的 Schema 定义 Action,自动生成 OpenAPI 端点和 MCP 工具,任何 Agent 均可调用。

语义图谱

MDX 页面编译为丰富的知识图谱,AI 系统获取摘要、主题、问答对和语义关系。

MCP 协议

一等公民的 MCP 服务器支持。Claude Desktop、Cursor 及任何 MCP 客户端可直连你的站点。

零锁定

仅使用开放标准 —— OpenAPI、JSON-LD、llms.txt、MCP。兼容任何 AI 提供商。MIT 许可。

开发者体验

init、build、doctor CLI。类型安全配置。CI 友好检查。开发时热更新。适用于任何 Next.js 应用。

知识平面

AI 可以阅读你的内容

MDX 页面编译为语义图谱,AI 搜索引擎通过 llms.txt、Markdown 和 JSON-LD 获取结构化、可引用的内容。

# Acme Documentation

> The complete toolkit for building
> modern web applications.

## Docs

- [Getting Started](/docs/start)
  Install and configure in 60 seconds.
- [Authentication](/docs/auth)
  Secure your app with built-in auth.
- [Deployment](/docs/deploy)
  Deploy anywhere with one command.
/llms.txt
能力平面

AI 可以调用你的功能

使用 Zod Schema 定义 Action,自动生成 OpenAPI 端点、MCP 工具和 tools.json —— 一次定义,多处暴露。

import { defineAction } from "next-ai-ready"
import { z } from "zod"

defineAction({
  name: "search_docs",
  description: "Search documentation.",
  input: z.object({
    query: z.string(),
    limit: z.number().default(5),
  }),
  public: true,
  handler: async ({ query, limit }) => {
    return await searchIndex(query, limit)
  },
})
actions/search.mjs

自动生成的产出物

/llms.txtLLM 站点索引
/openapi.jsonOpenAPI 3.1 规范
/api/mcpMCP 服务器
/<page>.md逐页 Markdown
/tools.json工具清单
JSON-LD结构化数据

准备让你的站点 AI-Ready?

60 秒内即可开始。

阅读文档