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

@hera-al/atn-proxy

v1.0.2

Published

Anthropic Tool Name Proxy — translates tool names > 64 chars for OpenAI-compatible endpoints

Readme

@hera-al/atn-proxy

Part of Hera Artificial Life — an opinionated AI assistant platform that runs locally on your machine. This package provides the tool name translation proxy used by Hera agents to communicate with OpenAI-compatible endpoints. It can also be used independently in any Node.js project.

Anthropic Tool Name Proxy — sits between the Claude Agent SDK and OpenAI-compatible endpoints (e.g. OpenRouter), resolving the 64-character tool name limit.

Agent SDK  -->  ATN-Proxy (:4181)  -->  OpenRouter  -->  Model

What it does

| Direction | Action | |-----------|--------| | Request | Truncates tools[].name to 64 chars using a deterministic hash suffix | | Request | Rewrites ?beta=true query param into the anthropic-beta header | | Request | Truncates tool_use.name in conversation history to match | | Response | Remaps truncated tool names back to originals (stream + non-stream) | | Response | Normalizes usage{} to Anthropic format (missing fields default to 0) | | Response | Wraps non-JSON responses (HTML 404) into Anthropic-compatible errors | | Response | Handles /count_tokens locally with a token estimate |

Install

npm install -g @hera-al/atn-proxy

Or run from source:

git clone https://github.com/hera-artificial-life/hera-al.git
cd hera-al/atn-proxy
npm install
npm run build

Usage

# Start with defaults (port 4181, target openrouter.ai)
atn-proxy

# Custom port and verbose logging
atn-proxy --port 8080 --verbose

# Show all options
atn-proxy --help

Options

| Flag | Default | Description | |------|---------|-------------| | --port <n> | 4181 (env: PORT) | Listen port | | --target <url> | https://openrouter.ai | Upstream endpoint | | --prefix <path> | /api | Target path prefix | | --max-name <n> | 64 | Max tool name length | | --logs <dir> | ./logs | Log directory | | --verbose | off (env: VERBOSE=1) | Debug logging |

Connect the Agent SDK

ANTHROPIC_BASE_URL=http://localhost:4181 \
ANTHROPIC_AUTH_TOKEN=sk-or-v1-xxx \
ANTHROPIC_API_KEY="" \
node your-agent.mjs

Logging

Logs are written to ./logs/atn-proxy.log with automatic rotation:

  • Max file size: 10 MB
  • Rotated files: up to 9 (atn-proxy.1.log ... atn-proxy.9.log)

How tool name truncation works

When a tool name exceeds the max length, ATN-Proxy generates a deterministic short name by keeping a readable prefix and appending an 8-char SHA-256 hash:

mcp__very-long-server-name__very_long_tool_name
  --> mcp__very-long-server-name__very_long_t_a1b2c3d4

The mapping is maintained in memory for the proxy session. Response tool names are automatically restored to the originals before reaching the SDK.

License

MIT