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

@curiositymcp/mcp-frontend-server

v0.2.0

Published

A frontend implementation of the Curiosity MCP server.

Readme

Curiosity MCP Frontend Server

A simple, embeddable chat UI component that connects to a streaming AI backend and supports frontend tools.

Public Beta Notice

This is a public beta release of the Curiosity MCP Frontend Server library. It is intended for testing and feedback purposes. While it should work in most cases, it may not be fully stable and could break in some instances. Please use with caution and report any issues you encounter.

Automate your users' journeys with a chat agent!

Demo

Curiosity MCP Frontend Demo

Installation

npm insatll @curiositymcp/mcp-frontend-server

Quick Start

  1. Create an HTML file with a container element for the chat UI.

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <title>Curiosity Example</title>
        <style>
          /* Give the container a defined size */
          #chat-container {
            width: 400px;
            height: 600px;
            border: 1px solid #ccc;
            border-radius: 8px;
          }
        </style>
      </head>
      <body>
        <div id="chat-container"></div>
        <script src="./node_modules/@curiositymcp/mcp-frontend-server/dist/index.umd.js"></script>
        <script src="./main.js"></script>
      </body>
    </html>
  2. Create a JavaScript file (main.js) to initialize the UI, register a backend, and add tools.

    // Get the container element
    const chatContainer = document.getElementById('chat-container');
    
    // 1. Initialize the Curiosity UI
    const curiosity = new CuriosityMCP.Curiosity(chatContainer);
    
    // 2. Create and register a mock AI backend
    const mockAIBackend = {
      async *streamMessage(messages) {
        const message = messages[messages.length - 1];
        // Check if the user is asking to use a tool
        if (message.toLowerCase().includes('change background')) {
          // AI decides to use a tool
          yield JSON.stringify({ toolUse: true, toolName: 'changeBackgroundColor', args: { color: 'lightblue' } });
          return;
        }
    
        // Otherwise, stream a simple response
        const response = `You said: "${message}". I am a mock AI.`;
        for (const char of response) {
          yield char;
          await new Promise((resolve) => setTimeout(resolve, 50)); // Simulate streaming delay
        }
      },
    };
    curiosity.registerAIBackend(mockAIBackend);
    
    // 3. Create and register a tool
    const changeColorTool = new CuriosityMCP.ActionTool({
      name: 'changeBackgroundColor',
      description: 'Changes the background color of the page body.',
      action: ({ color }) => {
        document.body.style.backgroundColor = color;
      },
    });
    curiosity.registerTool(changeColorTool);
    
    console.log('Curiosity UI initialized.');
  3. Open the HTML file in your browser. You should see the chat interface. Try typing "change background" to see the tool in action!