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

assetpanda-mcp-calculator

v1.0.25

Published

MCP client wrapper for Asset Panda calculator

Downloads

2,031

Readme

Asset Panda MCP Calculator Wrapper

This is a real MCP server that wraps your calculator Lambda function and makes it available to Claude Desktop via the Model Context Protocol.

What This Does

Claude Desktop (MCP Protocol)
        ↓
MCP Calculator Wrapper (this package)
        ↓ HTTP
Calculator Lambda (AWS Lambda Function URL)
        ↓
Calculator Operations (add, subtract, multiply, divide, power, sqrt)

Setup for Claude Desktop (Windows)

Option 1: NPM Package (Recommended)

Your Claude Desktop config at C:\Users\reymondko\AppData\Roaming\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "assetpanda-calculator": {
      "command": "npx",
      "args": ["-y", "[email protected]"]
    }
  }
}

Steps:

  1. Update your Claude Desktop config with the above
  2. Restart Claude Desktop
  3. Ask Claude: "What's 25 times 4?"

Option 2: Local Development

For testing local changes before publishing:

{
  "mcpServers": {
    "assetpanda-calculator": {
      "command": "node",
      "args": ["\\\\wsl.localhost\\Ubuntu\\home\\reymondko\\pioneer\\packages\\mcp-calculator-wrapper\\index.js"]
    }
  }
}

Steps:

  1. Make changes to index.js
  2. Update config to point to local file
  3. Restart Claude Desktop

How It Works

1. MCP Protocol (stdio communication)

Claude Desktop talks to this wrapper using the MCP protocol over standard input/output.

2. Tool Registration

The wrapper registers six calculator tools:

  • add: Add two numbers

    • Parameters: a (first number), b (second number)
    • Returns: Sum of a and b
  • subtract: Subtract one number from another

    • Parameters: a (number to subtract from), b (number to subtract)
    • Returns: Difference of a minus b
  • multiply: Multiply two numbers

    • Parameters: a (first number), b (second number)
    • Returns: Product of a and b
  • divide: Divide one number by another

    • Parameters: a (dividend), b (divisor)
    • Returns: Quotient of a divided by b
  • power: Raise a number to a power

    • Parameters: base (base number), exponent (exponent)
    • Returns: Base raised to the exponent
  • sqrt: Calculate square root

    • Parameters: a (number to calculate square root of)
    • Returns: Square root of a

3. HTTP API Calls

When Claude calls a calculator tool, the wrapper:

  1. Receives MCP request from Claude Desktop
  2. Converts it to HTTP POST request
  3. Calls your Lambda at https://fwigg2gvf2sbsinmddyrwga2tq0zdthi.lambda-url.us-east-1.on.aws/mcp
  4. Converts Zod schemas from Lambda to JSON Schema (for Claude compatibility)
  5. Returns results back to Claude via MCP protocol

4. Schema Conversion

The wrapper automatically converts Zod schemas returned by the Lambda to proper JSON Schema format that Claude Desktop can understand. This happens in the tools/list handler:

// Convert Zod schemas to JSON Schema for all calculator tools
if (result.result?.tools) {
  result.result.tools = result.result.tools.map(tool => {
    const schemas = {
      'add': {
        type: 'object',
        properties: {
          a: { type: 'number', description: 'First number' },
          b: { type: 'number', description: 'Second number' }
        },
        required: ['a', 'b']
      },
      // ... other tools
    };
    return {
      name: tool.name,
      description: tool.description,
      inputSchema: schemas[toolName] || defaultSchema
    };
  });
}

Files

  • index.js - Main MCP server implementation with schema conversion
  • package.json - NPM configuration
  • mcp.log - Runtime logs (created automatically)

Development

# Install dependencies (if any added)
npm install

# Test locally
node index.js

This starts the MCP server. It communicates via stdio, so you'll need an MCP client (like Claude Desktop) to interact with it.

Testing Locally

Test the wrapper directly:

node /home/reymondko/pioneer/packages/mcp-calculator-wrapper/index.js

Then in another terminal, send MCP messages:

# Initialize
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}},"id":1}' | node index.js

# List tools
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node index.js

# Call add tool
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"add","arguments":{"a":5,"b":3}},"id":1}' | node index.js

Publishing to NPM

# Update version in package.json
npm version patch  # or minor, or major

# Publish (requires NPM account and login)
npm publish --access public

After publishing, anyone can use:

npx assetpanda-mcp-calculator@latest

Important: When updating the package, use specific version numbers in Claude Desktop config to avoid NPM cache issues:

{
  "mcpServers": {
    "assetpanda-calculator": {
      "command": "npx",
      "args": ["-y", "[email protected]"]
    }
  }
}

Change @1.0.22 to @1.0.23 after publishing a new version to force cache refresh.

Environment Variables

  • MCP_API_URL: Your Lambda function URL (default: https://fwigg2gvf2sbsinmddyrwga2tq0zdthi.lambda-url.us-east-1.on.aws)

You can override this in Claude Desktop config:

{
  "mcpServers": {
    "assetpanda-calculator": {
      "command": "npx",
      "args": ["-y", "[email protected]"],
      "env": {
        "MCP_API_URL": "https://your-custom-lambda-url.amazonaws.com"
      }
    }
  }
}

Usage Examples

In Claude Desktop

Just ask natural language questions:

  • "What's 25 times 4?"
  • "Calculate the square root of 144"
  • "What's 2 to the power of 8?"
  • "Divide 100 by 5"
  • "Add 42 and 58"

Claude will automatically use the MCP calculator tools.

Troubleshooting

Schema Validation Errors

If you see errors like Unrecognized key(s) in object: 'error' or ZodError in Claude Desktop logs:

Cause: The Lambda is returning Zod schemas instead of JSON Schema.

Fix: This wrapper automatically converts Zod schemas to JSON Schema. Make sure you're using version 1.0.22 or later:

# Clear NPM cache
rm -rf /mnt/c/Users/reymondko/AppData/Local/npm-cache/_npx

# Update Claude Desktop config to specific version
# Change: "assetpanda-mcp-calculator@latest"
# To: "[email protected]"

# Restart Claude Desktop

NPM Cache Issues

If Claude Desktop keeps using an old version after publishing updates:

Cause: npx caches packages based on the package spec hash.

Fix:

  1. Use specific version numbers instead of @latest in config
  2. Delete NPM cache: rm -rf /mnt/c/Users/reymondko/AppData/Local/npm-cache/_npx
  3. Restart Claude Desktop

Global Package Interference

If you installed the package globally and it's not working:

Cause: Global installations can interfere with npx.

Fix:

# Uninstall global package
npm uninstall -g assetpanda-mcp-calculator

# Clear cache
rm -rf /mnt/c/Users/reymondko/AppData/Local/npm-cache/_npx

# Restart Claude Desktop

"Cannot find module" error

Make sure Node.js is accessible from Windows:

# In PowerShell, verify Node.js is installed
node --version

# Should output: v18.0.0 or higher

API Connection Errors

Check that the Lambda URL is correct and accessible:

curl -X POST "https://fwigg2gvf2sbsinmddyrwga2tq0zdthi.lambda-url.us-east-1.on.aws/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

Should return a list of calculator tools.

Claude Desktop Doesn't See Tools

  1. Check Claude Desktop logs: Help → View Logs
  2. Look for mcp-server-assetpanda-calculator.log
  3. Verify the config file path is correct
  4. Make sure you restarted Claude Desktop after changing config
  5. Check that the wrapper is starting: look for === MCP Server starting === in logs

Check Logs

The wrapper creates a log file at:

/home/reymondko/pioneer/packages/mcp-calculator-wrapper/mcp.log

Check this file for detailed request/response logging:

tail -f /home/reymondko/pioneer/packages/mcp-calculator-wrapper/mcp.log

Look for:

  • === MCP Server starting === - Server initialized
  • >>> Making Lambda request - Calling Lambda
  • <<< Lambda response - Got Lambda response
  • ERROR - Any errors

Lambda Function URL

Your current Lambda function URL is:

https://fwigg2gvf2sbsinmddyrwga2tq0zdthi.lambda-url.us-east-1.on.aws/mcp

This Lambda implements the calculator operations and returns results to the wrapper.

Architecture

┌─────────────────────┐
│  Claude Desktop     │
│  (User asks math)   │
└──────────┬──────────┘
           │ MCP Protocol (stdio)
           │ {"jsonrpc":"2.0","method":"tools/call",...}
           ↓
┌─────────────────────┐
│  MCP Wrapper        │
│  (this package)     │
│  - Converts MCP     │
│  - Schema transform │
│  - Logging          │
└──────────┬──────────┘
           │ HTTPS POST
           │ {"jsonrpc":"2.0","method":"tools/call",...}
           ↓
┌─────────────────────┐
│  Lambda Function    │
│  (Calculator)       │
│  - add, subtract    │
│  - multiply, divide │
│  - power, sqrt      │
└─────────────────────┘

Version History

  • 1.0.22 - Fixed schema conversion (Zod → JSON Schema)
  • 1.0.7 - Initial release with basic calculator operations

Related Packages

  • assetpanda-mcp-kb - Knowledge Base search MCP wrapper
  • @assetpanda/mcp-client - Asset Panda MCP client wrapper

License

ISC