npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

endpointcontext

v0.1.3

Published

The official CLI for the Endpoint Context Protocol (ECP). This package checks your configuration, and builds the appropriate instructions for your LLM to activate ECP on your behalf.

Downloads

26

Readme

Endpoint Context Protocol (ECP)

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

This package provides the official CLI scaffolding tool for the Endpoint Context Protocol. It allows you to implement ECP in your project in seconds, without installing heavy runtime dependencies into your production bundle.

What is ECP?

Right now, when an AI agent (like Claude, ChatGPT, Cursor, or an automated script) visits your website, it receives a wall of HTML, CSS, and JavaScript noise. The agent has to guess your site's structure, wasting tokens and scraping fragile layouts.

In 1999, HTTP content negotiation infrastructure became standard, however for years with the onslaught of SPAs and specialty frameworks, it fell into the shadows. It's simple request routing; Browsers identify themselves by requesting text/html. Agents, through the baked-in tools most harnesses provide (built on fetch, cURL, etc), do not.

ECP is a simple method for acting on this distinction. It intercepts requests at the network edge:

  • Browsers get your existing site, completely unchanged.
  • Agents get clean, structured Markdown built specifically for them.

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

Why Make Your Site ECP Enabled?

  • Give agents everything they need, nothing they don't: When agents read your raw HTML, they get confused by navigation links and footers and other syntax in the way. ECP lets you hand them a deterministic, structured map of your site's capabilities.
  • Zero New Infrastructure: No subdomains required. No special agent training required. It uses the URL you already have. One canonical destination. No intermediaries. You control the content agents see from your own site.
  • Coexists with MCP: The Model Context Protocol (MCP) is for tool actions. ECP is for world navigation and discovery. ECP makes your main URL legible before an agent even knows your tools exist. You can provide your MCP server data inside your AgentWelcome.md, making the only address you need your own root URL.

The Universal Schema (ecp.json)

At the heart of the protocol is the ecp.json configuration file. This universal manifesto lives in the root of your repository. It explicitly maps how AI traffic should be routed, allowing modern frameworks, AI scrapers, and automated builders to understand your site natively.

{
  "$schema": "https://endpointcontextprotocol.io/schema/v1.json",
  "version": "1.0",
  "instructions": [
    "- Welcome to Endpoint Context Protocol (ECP).",
    "- This file tells AI agents where to find your site's Markdown context.",
    "- Routes explicitly map a URL path to a Markdown file or external URL.",
    "- Because ECP is strictly opt-in, unlisted routes are automatically safe."
  ],
  "routes": {
    "/": "https://your-domain.com/AgentWelcome.md"
  }
}

The Zero-Dependency Architecture

This tool does not install extra runtime dependencies into your package.json. It acts purely as a protocol scaffolder.

When you run the CLI, it analyzes your tech stack and generates a stack-specific handoff for your coding assistant. Your assistant then adds the native request-handling code for that environment, such as Next.js Middleware, Cloudflare Pages _worker.js, Vercel Routing Middleware, or Netlify Edge Functions. The generated guide tells the assistant to preserve normal browser behavior and fail open if AgentWelcome.md is unavailable.

Quick Start

Run the CLI in the root directory of your project:

npx endpointcontext

How It Works

  • Auto-Detection: The CLI scans your project to detect your hosting platform or framework (Next.js, Vercel, Cloudflare, Netlify, Firebase, Apache/cPanel, or static/proxy).
  • Confirmation: You confirm the detected architecture or override it.
  • Artifact Generation: The CLI drops two files into your workspace:
    • ecp.json: The protocol manifest that maps your public route to AgentWelcome.md for providers, frameworks, AI scrapers, and automated builders.
    • ECP_Install_Guide.md: A platform-specific implementation handoff for your coding agent.
  • AI Handoff: Copy the contents of the guide and paste it into Cursor, Copilot, Claude, Codex, etc. The AI will implement the correct routing logic.

Non-Interactive Mode

For use in automated workflows, boilerplate generators, or CI pipelines, you can bypass the interactive prompts by providing arguments directly:

npx endpointcontext@latest --domain example.com --agent-url https://example.com/AgentWelcome.md

Documentation & Specification

To learn more about the protocol, view the exact routing specifications, or see reference architectures for all major frameworks, visit the official site: endpointcontextprotocol.io