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

ambient-mcp

v1.0.1

Published

Browser context for AI agents — captures browsing history, auth tokens, and page context via a Chrome extension and exposes them as MCP tools

Readme

ambient-mcp

Your browser becomes your AI's memory.

npm version MCP Node.js License: MIT

A Chrome extension + local MCP server that gives your AI agents real-time awareness of everything you're doing in the browser — pages visited, auth tokens captured, navigation history, entity detection (ICM, ADO, GitHub, Teams, Outlook, Azure).

You visit a page  →  Extension captures context  →  MCP server stores it
                                                           ↓
                                          AI agent calls get_recent_context()
                                          AI agent calls check_token_health()
                                          AI agent calls search_context("ICM")
                                               ↓
                                    Agent knows what you're working on
                                    Agent uses your live auth tokens
                                    Agent finds the incident you were viewing

Quick Start

1. Start the MCP server

npx ambient-mcp

2. Register with Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "browser-context": {
      "command": "npx",
      "args": ["ambient-mcp"]
    }
  }
}

3. Install the Chrome extension

Load from the GitHub repo or install from the Chrome Web Store.

Browse normally — within 15 seconds your first pages and tokens are available to your AI agent.


What It Captures

| Data | Details | |------|---------| | Pages | Title, URL, text snippet, headings, entity type & ID, extracted GUIDs/ticket numbers, related links | | Auth tokens | Bearer tokens from any request, decoded JWT (user, audience, scopes, expiry) | | Navigation history | Time spent per page, tab activity timeline |

Auto-detected entity types: icm_incident · ado_work_item · ado_pr · ado_build · github_pr · github_issue · teams_meeting · teams_channel · outlook_email · outlook_calendar · azure_portal · geneva_logs · sharepoint · onedrive · wiki_page


MCP Tools

| Tool | Description | |------|-------------| | get_recent_context(limit?) | Most recently visited pages with full context | | search_context(query) | Full-text search over browsing history | | get_auth_tokens(domain?) | All captured tokens with decoded JWT claims | | get_pages_by_entity(entity_type) | Filter pages by type (ICM, ADO, GitHub…) | | get_recent_visits(limit?) | Navigation timeline with time-spent per page | | get_token_for_domain(domain) | Full token entry for a specific domain | | check_token_health() | Breakdown of all tokens: fresh / expiring / expired | | check_token_for_domain(domain) | Validate one token before an API call |

Example: Agent checks token before an API call

Agent: check_token_for_domain("graph.microsoft.com")
→ { valid: true, reason: "fresh", minsLeft: 47,
    advice: "Token is valid (47 min remaining). Safe to use." }

Agent: get_recent_context()
→ [ { url: "https://portal.microsofticm.com/...", entityType: "icm_incident",
      entityId: "759120401", snippet: "Teams message delivery failure..." } ]

Recommended CLAUDE.md snippet

## Browser Context
Always call `check_token_health()` before making API calls on my behalf.
Call `get_recent_context()` at the start of any investigation.
Use `search_context(query)` to find pages related to a specific ticket or topic.
Use `get_token_for_domain(domain)` to get my auth token — never ask me to paste one.

HTTP API

The server also runs on http://localhost:3457 for the extension and your own scripts:

curl http://localhost:3457/health          # server stats
curl http://localhost:3457/tokens/health   # token validity summary
curl "http://localhost:3457/context/search?q=ICM"  # search your history

Data & Privacy

  • Local only — all data stays on localhost:3457, nothing leaves your machine
  • Persisted to ~/.claude/browser-context-mcp/store.json — shared across all Claude Code projects
  • 5-day retention — pages and visits auto-pruned after 5 days, expired tokens after 24h
  • No encryption at rest — treat store.json like a .env file

Architecture

browser-context-mcp/
├── extension/          Chrome MV3 extension (load from GitHub)
└── server/             ← this npm package
    ├── server.js       HTTP :3457 (ingest) + MCP stdio (agent tools)
    ├── store.js        In-memory store, JSON persistence, TTL pruning
    └── bin/
        └── ambient-mcp.js   npx entry point

Links


MIT License