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

ugarapi-mcp-server

v1.1.0

Published

MCP server for UgarAPI - exposes AI services with Bitcoin Lightning payments

Readme

UgarAPI MCP Server

Model Context Protocol (MCP) server for UgarAPI - enables AI agents to discover and use UgarAPI services with Bitcoin Lightning payments.

What This Does

Exposes UgarAPI's services as MCP tools that AI systems (Claude, ChatGPT, etc.) can discover and use automatically:

  • extract_web_data - Extract structured data from websites using CSS selectors
  • timestamp_document - Create blockchain timestamp proofs for documents
  • aggregate_api_call - Route requests through external APIs with failover

All payments are handled automatically via Bitcoin Lightning micropayments.

Installation

For End Users (Claude Desktop, etc.)

  1. Install via npm:
npm install -g ugarapi-mcp-server
  1. Add to your MCP settings file:

Claude Desktop (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json

Claude Desktop (Windows): %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "ugarapi": {
      "command": "ugarapi-mcp",
      "env": {
        "UGARAPI_BASE_URL": "https://ugarapi.com"
      }
    }
  }
}
  1. Restart Claude Desktop

  2. Claude can now use UgarAPI services automatically!

For Developers

git clone https://github.com/yourusername/ugarapi-mcp-server
cd ugarapi-mcp-server
npm install
node ugarapi-mcp-server.js

Usage Examples

Once installed, AI agents can use your services naturally:

Example 1: Web Scraping

User: "Extract the title and price from https://example.com/product"

Claude: [calls extract_web_data tool]
- Creates Lightning invoice (1000 sats)
- Pays automatically
- Returns extracted data

Example 2: Document Timestamping

User: "Timestamp this document hash: abc123..."

Claude: [calls timestamp_document tool]
- Creates Lightning invoice (5000 sats)
- Pays automatically
- Returns blockchain proof

Example 3: API Aggregation

User: "What's the weather in Tokyo?"

Claude: [calls aggregate_api_call tool]
- Creates Lightning invoice (200 sats)
- Pays automatically
- Returns weather data

How Payments Work

  1. First Call: MCP server creates a Lightning invoice for the service
  2. Payment: Invoice is paid automatically (in production, you'd configure a Lightning wallet)
  3. Service Call: Once paid, the service executes
  4. Idempotency: Same requests won't be charged twice (cached for 24 hours)

Configuration

Environment variables:

  • UGARAPI_BASE_URL - UgarAPI API endpoint (default: https://ugarapi.com)

Payment Setup (Production)

For production use with real payments, you need:

  1. Lightning Wallet - Set up a wallet that can pay invoices programmatically
  2. Auto-Payment Logic - Configure the MCP server to pay invoices automatically
  3. Spending Limits - Set maximum spend per hour/day to prevent runaway costs

See docs/payment-setup.md for detailed instructions.

Features

Idempotency - Safe retries, no double charges ✅ Rate Limiting - Respects UgarAPI rate limits
Error Handling - Clear error messages for agents ✅ Receipts - Full transaction history ✅ Audit Trail - All calls are logged

Development

Run in development mode:

npm start

Test with MCP Inspector:

npx @modelcontextprotocol/inspector node ugarapi-mcp-server.js

Publishing to MCP Registry

Once tested:

  1. Publish to npm:
npm publish
  1. Submit to MCP registry:
# Follow instructions at https://github.com/modelcontextprotocol/servers
  1. AI systems can now discover UgarAPI automatically!

Roadmap

  • [ ] Automatic Lightning payment integration
  • [ ] Spending limit controls
  • [ ] Multi-agent usage tracking
  • [ ] Advanced caching strategies
  • [ ] Support for more UgarAPI services as they launch

Support

  • UgarAPI Docs: https://ugarapi.com/docs
  • Issues: https://github.com/yourusername/ugarapi-mcp-server/issues
  • Email: [email protected]

License

MIT License - see LICENSE file for details