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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kya-os/init-xmcp-i

v0.1.11

Published

Initialize xmcp-i apps with identity features in one command

Readme

init-xmcp-i

Initialize xmcp-i with identity features in your existing Node.js project.

🚀 Quick Start

npx init-xmcp-i@latest

📋 What it does

init-xmcp-i sets up xmcp-i in your existing Node.js project with:

  • DID-based identity generation - Automatic cryptographic identity creation
  • Identity-enabled tools - Pre-configured tools with signing capabilities
  • Framework detection - Automatic setup for Next.js or Express
  • TypeScript support - Full TypeScript configuration
  • Security best practices - Proper .gitignore for sensitive files
  • Registry integration - Optional agent registration support

🛠️ Features

Identity Tools Created

  • identity-info.ts - Get server identity information
  • sign-message.ts - Sign messages with server identity
  • verify-signature.ts - Verify signatures against DIDs
  • challenge-response.ts - Handle authentication challenges
  • mcp-capabilities.ts - Display MCP server capabilities

Identity Utilities

  • generate-identity.ts - Generate new DID identity
  • ensure-identity.ts - Ensure identity exists before running
  • identity-utils.ts - Helper functions for identity operations
  • register-agent.ts - Register with agent registry
  • handshake.ts - Identity handshake implementation

Scripts Added

  • npm run generate-identity - Generate a new identity
  • npm run ensure-identity - Ensure identity exists
  • npm run register-agent - Register with a registry
  • npm run check-registration - Check registration status
  • npm run dev - Start development with identity

📦 Requirements

  • Node.js 20.0.0 or higher
  • TypeScript project
  • npm, yarn, or pnpm

🎯 Usage

Basic Usage

npx init-xmcp-i

With Options

# Skip prompts and use defaults
npx init-xmcp-i --yes

# Specify package manager
npx init-xmcp-i --package-manager pnpm

# Custom paths
npx init-xmcp-i --tools-path src/mcp-tools --identity-path src/identity

# Skip identity generation
npx init-xmcp-i --skip-identity

# Specify registry URL
npx init-xmcp-i --registry https://registry.knowthat.com

🔧 CLI Options

  • -y, --yes - Skip confirmation prompts
  • --package-manager <manager> - Specify package manager (npm, yarn, pnpm)
  • --tools-path <path> - Custom tools directory path
  • --route-path <path> - Custom Next.js route path
  • --identity-path <path> - Custom identity files path
  • --skip-tools - Skip tool creation
  • --skip-route - Skip route creation
  • --skip-identity - Skip identity generation
  • --registry <url> - Registry URL for agent registration
  • -v, --version - Show version
  • -h, --help - Show help

🏗️ What Gets Modified

Files Created

  • xmcp.config.ts - xmcp-i configuration with identity enabled
  • src/tools/*.ts - Identity-enabled MCP tools
  • src/*.ts - Identity utility files (or custom path)
  • src/app/mcp/route.ts - Next.js route handler (if applicable)

Files Updated

  • package.json - Added scripts and dependencies
  • tsconfig.json - Updated for xmcp-i compatibility
  • .gitignore - Added identity file exclusions

🔐 Security

Identity files contain private keys and are automatically:

  • Excluded from git via .gitignore
  • Generated locally on first run
  • Never shared or transmitted

📚 After Initialization

  1. Generate your identity:

    npm run generate-identity
  2. Start development:

    npm run dev
  3. (Optional) Register your agent:

    npm run register-agent

🤝 Integration

Express

import { xmcpHandler } from '@xmcp/adapter';

app.post("/mcp", xmcpHandler);
app.get("/mcp", xmcpHandler);

Next.js

Automatically configured at /mcp route in App Router.

📄 License

MIT © XMCP-I Team

🔗 Links