# No agent interface (MCP) advertised in Next.js

> How to fix no agent interface (mcp) advertised in Next.js — with the exact fix and copy-paste code.

_Category: AI readiness · Detector `aeo` · Check `mcp-discovery-missing` · Severity: info_

Most AEO is about being read; this one is about being acted on. If your site exposes actions an agent could take — booking, search, checkout, an API — advertising a Model Context Protocol (MCP) interface lets assistants discover and use those tools instead of scraping. It’s optional and only relevant for app/API sites, but for those it’s how you become agent-usable rather than merely agent-readable.

## The fix for Next.js

Serve the discovery document from a Route Handler at `app/.well-known/mcp.json/route.ts`, returning `application/json`.

_app/.well-known/mcp.json/route.ts_

```ts
export function GET() {
  return Response.json({ name: 'acme', server: { url: 'https://acme.com/mcp' } })
}
```

### Steps

1. Decide whether agents should take actions on your site (skip if it’s content-only)
2. Build an MCP server exposing those actions as tools
3. Advertise it at `/.well-known/mcp.json` with an `application/json` content type

## How VibeCheck detects it

The `aeo` detector flags this live in the browser and reports it to the widget's Problems list — and to your coding agent over MCP.

- **Issue string:** `No agent interface (MCP) advertised`
- **Threshold:** /.well-known/mcp.json is not served as a 2xx JSON response

## FAQ

### Do content sites need this?

No. MCP discovery only matters if you want agents to take actions (search, book, buy, call an API). A blog or docs site can safely ignore it — that’s why VibeCheck reports it as info, not a warning.

### What is MCP?

The Model Context Protocol is an open standard for exposing tools and data to AI agents in a structured way. Advertising an MCP server lets assistants discover and use your actions rather than reverse-engineering your UI.

### How is an MCP server different from a REST API?

A REST API is a set of endpoints a developer wires up by hand; an MCP server describes those same actions as self-documenting tools an agent can discover and call without a bespoke integration. If you already have an API, an MCP server is usually a thin wrapper that makes it agent-usable.

See the general, framework-agnostic fix: https://vibecheck.wcgw.fun/fix/missing-mcp-discovery.md

---

Fix guide from VibeCheck — https://vibecheck.wcgw.fun/fix/missing-mcp-discovery. Full site index for LLMs: https://vibecheck.wcgw.fun/llms.txt
