ECP Enabled badge ECP Enabled badge Endpoint Context Protocol

A few lines of code to make any existing website agent-friendly.

Endpoint Context Protocol (ECP) is built on HTTP Content Negotiation headers that have been powering the web since 1999. The headers are already there. ECP puts them to use. The result? Your existing site serves humans and agents from the same URL, no new infrastructure required.

What this is

HTTP content negotiation has been in the spec since RFC 2616 in 1999. Browsers use it constantly. They send Sec-Fetch-Dest: document and Accept: text/html on every navigation. Every other HTTP client, agents, LLMs, curl, automated scripts, etc do not.

That distinction has always been there. ECP is just a method for acting on it; Inspect those two headers, return clean semantic content to agentic callers, return your existing HTML to everyone else. The URL never changes. No new routing. No subdomains. No special agent training required.

This is not a new protocol or app layered on top of the web.
It is the web, finally used as intended.

Humans get the visual web. Agents get the semantic web.
Same URL, same authority, negotiated at runtime.


What This Unlocks

Your canonical domain stops being a static brochure and becomes a live intelligence surface. Agents can arrive through the same front door and get exactly what you choose to expose, with first-party authority and current operational context.

One canonical domain. One front door.
Two audience optimized representations.


The code

No external packages needed. 2 simple steps:

Create ecp.json in your site root.

This allows select hosting providers to handleroutes["/"] to your root-bound markdown URL: https://your-domain.com/AgentWelcome.md.


        

*use-agents-subdomain remains false for most cases not using specific third-party ECP Context Servers

Wire Agent/Human Request Handling

Pick your hosting/framework, or use the Deno / Other chip for generic fetch-based runtimes and proxy setups. The button copies the canonical markdown guide for that platform.

Update/create file:


        

That's it.
Upon deploy, requests from agents to / that match ECP negotiation are served from your mapped AgentWelcome.md (or otherwise named) route.
Human traffic continues to receive a normal web experience.

That URL is yours to control. Three common choices:


Install Anywhere

If you want LLM-ready, stack-specific instructions from your actual codebase, run:

npx endpointcontext

Optional discovery hint (recommended): add in your <head> for HTML-scraping agents.

<link rel="alternate" type="text/markdown" href="https://your-domain.com/AgentWelcome.md" title="agent-context" />

Fallback breadcrumb for agents that scrape full HTML instead of negotiating directly.


Hosted ECP Context Servers

A hosted ECP Context Server is a single URL you drop into the handler above. Instead of maintaining a static knowledge cache yourself, the server delivers a dynamic knowledge cache kept current, richly structured, and built to be read by agents.

No ongoing site changes needed. Update your context from any third-party dashboard you choose, or build your own. Agents calling your site get the new version automatically.

Hosted context servers also unlock the agents.* subdomain: an isolated container for advanced context delivery, API token generation, and agent-specific capabilities that live alongside your main site without touching it. See ECP Servers.


Test Your ECP

Once you've set up ECP, you can verify your site is responding correctly — checking that browsers get HTML, agents get semantic content, and the right Vary headers are present. You can also see exactly what agents receive from your canonical URL.

ecptest.com →


ECP.DIRECTORY

As agents increasingly discover sites without human-initiated search, the ECP index gives your site a verified presence in that layer. Submit once at ecp.directory. The index is opt-in, free, and queried directly by model providers and agent frameworks.

Pick a badge style and download PNG:


What Agents See

https://endpointcontextprotocol.io/
$curl https://endpointcontextprotocol.io/
# Endpoint Context Protocol (ECP) A few lines of code to make any existing website agent-friendly. Endpoint Context Protocol (ECP) is built on HTTP Content Negotiation headers that have been powering the web since 1999. The headers are already there. ECP puts them to use. The result? Your existing site serves humans and agents from the same URL, no new infrastructure required. ## What This Unlocks - URL-first discovery - Live operational context - Actionable API & MCP discovery - One trusted authority ## The Code No external packages needed. 2 simple steps: Step 1 — Create ecp.json in your site root.

These are live public examples you can compare right now. Visit the URL yourself as a human, or have an agent fetch that same URL and compare the representation without changing authority.

https://endpointcontextprotocol.io/
Human visit
open https://endpointcontextprotocol.io/
Agent fetch
curl https://endpointcontextprotocol.io/

The browser receives the public site. A non-browser caller receives the semantic payload from that same canonical URL.

https://packages.report/npm/inquirer
Human visit
open https://packages.report/npm/inquirer
Agent fetch
curl https://packages.report/npm/inquirer

The same authority resolves into a rendered package page for people and a machine-legible package report for agent callers.