@stacksjs/ai weekly downloads statistics
By stacksjs · npm · MCP servers
Stacks Artificial Intelligence.
@stacksjs/ai has 25,197 recorded weekly downloads on npm, a decrease of 17.0% over the past 30 days, ranking #965 of 3,247 tracked listings.
About @stacksjs/ai
Stacks AI
This package contains a set of tools to help you build AI-powered applications.
-
Request model access from AWS: https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/modelaccess
☘️ Features
- Chatbots
- Image Generation
- Text Generation & Summaries
- git Diff Interpreter
- GitHub PR integration
- UI Generator
- Zero-config
TODO
- Driver: Bedrock
🤖 Usage
bun install -d @stacksjs/ai
You may now use:
import { useAI } from '@stacksjs/ai'
const client = useAI()
// client...
Realtime usage receipts
The server Realtime adapter reports provider token usage by response ID. A usage
event includes inputAudioEndMs when the adapter matched a server VAD speech end
to a committed audio item before that response was created. The boundary stays
with its response as later audio arrives. pendingUsageResponses counts provider
responses that have started and have no usage receipt. Consumers reconciling
costs can keep their holds when input coverage or usage evidence is incomplete.
Generate an MCP server from your API
Register one MCP endpoint in routes/api.ts to expose your router API, including
selected model useApi CRUD routes:
import { mountRouterMCPServer } from '@stacksjs/ai/router-mcp'
mountRouterMCPServer({
name: 'my-app', version: '1.0.0',
authenticate: request => authenticateIntegrationToken(request),
})
Supply your application's integration-token check, returning a principal or a
401/403 Response. This mounts /api/mcp; calls retain the API's middleware,
validation and authorization. Only Authorization is forwarded by default.
Customize route selection with prefix and filter, tools with configureTool,
API credentials with requestHeaders, and add custom tools, resources or
prompts. No AI provider is needed. See the
MCP API guide
for a model example, client discovery and calls, option defaults and limitations.
Compact project context
Stacks conventions reduce the amount of application-owned code a coding model
must generate. A model can describe domain shape once, use known Model-View-Action
locations, and rely on framework traits and generators for migrations, validation,
routes, API artifacts, and types where those paths are supported. Installed
dependencies still exist, but their node_modules implementation is package-manager
state, not application context an LLM should ingest or reproduce.
Generate a deterministic context payload for any coding model or agent:
buddy ai:context
buddy ai:context --json
buddy ai:context --json --output .stacks/ai-context.json
buddy ai:context --max-chars 4000 --model claude-sonnet-4
The versioned JSON contract identifies canonical source roles, instruction files, available application surfaces, safe package metadata, and representative source paths. It excludes dependency, build, cache, lock, environment, credential, key, and secret paths by default. Existing Buddy AI calls consume the same compact text representation.
Output metrics include the enforced character budget and a heuristic token estimate. They also compare the payload with the previous unstructured context shape. This is evidence about prompt size only. It is not evidence that a particular model will write correct code, and exact billing tokens require the selected provider's tokenizer.
Learn more in the docs.
🧪 Testing
bun test
📈 Changelog
Please see our releases page for more information on what has changed recently.
🚜 Contributing
Please review the Contributing Guide for details.
🏝 Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
For casual chit-chat with others using this package:
Join the Stacks Discord Server
📄 License
The MIT License (MIT). Please see LICENSE for more information.
Made with 💙
Verified local speech models
Install the pinned multilingual Whisper base model before starting a private CPU speech server:
import { ensureLocalSpeechModel } from '@stacksjs/ai/local-speech-model'
const modelPath = await ensureLocalSpeechModel({ directory: 'storage/speech/models' })
The installer checks the exact byte length and SHA-256, reuses a verified file,
and publishes new bytes atomically. Interrupted downloads resume through a
validated HTTP Range response. An origin that ignores Range starts a clean
response instead. Four attempts, each with a three-minute transfer timeout, are
the defaults; attempts, timeoutMs and an abort signal are configurable.
A failed install preserves the previous target and removes only its own partial
file. Custom trusted model metadata can be passed through model.
Description from the npm listing.
- ai
- anthropic
- openai
- ollama
- embeddings
- rag
- mcp
- vision
- artificial intelligence
- api
- stacks
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm MCP servers plugins
All 20 @stacksjs/ai alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@stacksjs/ai. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.