Skip to content

About

Node.js CrowdSec client, HTTP middleware, detection scenarios and MCP server

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

361 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-crowdsec

CI OpenSSF Scorecard OpenSSF Best Practices codecov Known Vulnerabilities Donate GitHub stars

Dependencies update - renovate

This repository hosts several packages, listed below with examples.

Documentation

Features

  • Full CrowdSec client : watcher & bouncer clients for the CrowdSec LAPI (alerts, decisions, stream, watcher registration/self-delete...).
  • High-performance bouncer : decisions are streamed from the LAPI and indexed locally by CIDR (numeric prefix lookup). Checking an IP costs ~µs with a negligible event loop impact, even with hundreds of thousands of decisions.
  • Live mode (optional) : unknown IPs are checked against the LAPI in the background, closing the freshness gap of the stream poll. A malicious unknown IP passes at most once.
  • Configurable trust scope : subnetLevel lets you choose how far up the prefix hierarchy to consider as malicious (resident / company / country), so a whole country block is never banned by accident.
  • Watcher scenarios : bundled scenarios (user-agent, ip-extraction...) to detect and alert on malicious requests, with a pluggable scenario system.
  • MCP server : expose decisions, alerts and allowlists to an LLM through the Model Context Protocol, read-only by default.

Packages

NPM version Downloads License Package Quality

NPM

NPM version Downloads License Package Quality

NPM

An alpha HTTP middleware that allows you to use CrowdSec to protect your HTTP server.

AI agent setup guide: docs/agent-setup-guide.md.

NPM version Downloads License Package Quality

NPM

Optional scenarios to use with the middleware.

NPM version Downloads License Package Quality Docker pulls

NPM

A Model Context Protocol server for CrowdSec: exposes decisions, alerts and allowlists to an LLM, with read-only mode by default.

Examples

This repository provides a Node.js client for the CrowdSec REST API, an HTTP middleware, detection scenarios and an MCP server. Node.js >= 24 is required.

Security

Report vulnerabilities privately: see SECURITY.md.

Contributing

See CONTRIBUTING.md.

Code of Conduct

This project follows the Contributor Covenant.

License

MIT

Thanks to

About

Node.js CrowdSec client, HTTP middleware, detection scenarios and MCP server

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages