@impart-security/impart-mcp
v0.2.1
Published
Model Context Protocol (MCP) implementation for interacting with Impart's API
Readme
Impart MCP Tools
A Model Context Protocol (MCP) implementation for interacting with Impart's API. This package provides a set of tools for managing and interacting with Impart's security features through MCP.
Features
- Rules Script Management
- Rule Recipe Management
- API Bindings Management
- Endpoint Inventory
- Tag Management
- Observed Hosts Monitoring
- Specification Management
- List Management
- Inspector Management
Prerequisites
You'll need to set up the following environment variables:
IMPART_AUTH_TOKEN- Your Impart authentication token
Available Tools
This MCP server provides 26 tools for managing Impart Security through the Model Context Protocol. All tools are automatically suffixed with your organization ID (e.g., list_inspectors_d3ce).
Inspectors
list_inspectors- Get a list of inspectors for the organization
Rules Scripts
list_rules_scripts- Get a list of rules scripts with filtering options (type, labels, disabled status)get_rules_script- Get details of a specific rules script including source code and revisions
Rule Recipes (AI-Powered)
list_rule_recipes- Get a list of rule recipes with search filteringget_rule_recipe- Get complete details of a specific rule recipe including componentsgenerate_rule_recipe✨ - Generate rule recipe configurations using Impart's AI (Sparkle)create_rule_recipe- Create a new rule recipe from a configuration (typically from generate_rule_recipe)
API Specs & Endpoints
list_specs- Get a list of API specifications with search filteringget_spec- Get details of a specific API spec including revision historylist_endpoints- Get inventory of API endpoints with extensive filtering (deprecated status, source, tags, methods, labels)
API Bindings
list_api_bindings- Get a list of API bindings with filtering by spec or collectioncreate_api_binding- Create new API bindings for connecting specs to infrastructure
Tags & Metrics
list_tags- Get a list of tags with label filteringget_tag_metrics- Get timeseries metrics for tags (HTTP requests, attacks, blocks, etc.) with flexible time ranges and rollup options
Observed Hosts
list_observed_hosts- Get a list of observed hosts in your infrastructureget_observed_host- Get detailed information about a specific observed host
Lists (Allow/Block Lists)
list_lists- Get a list of lists with filtering by kind (ip, string, uuid, country, path, asn), subkind, and labelsget_list_items- Get items from a specific list with paginationcreate_list- Create new lists for IP addresses, strings, UUIDs, countries, paths, or ASNsupdate_list_items- Update items in an existing list
Labels
list_labels- Get a list of labels with search filteringcreate_label- Create new labels with customizable colors and display names
Test Cases
list_test_cases- Get a list of rules test cases for validating rule behaviorget_test_case- Get detailed information about a specific test case
HTTP Requests (Traffic Analysis)
get_requests- Get HTTP requests captured by Impart with extensive filtering options:- Time ranges (relative like
-1d,-24hor absolute timestamps) - Status codes, tags, IPs, external request IDs, rule IDs
- API specs, collections, endpoints
- Pagination with up to 1000 results per request
- Sort order (ascending/descending)
- Data source selection (PostgreSQL or ClickHouse)
- Time ranges (relative like
get_request_details- Get complete details of a specific HTTP request including headers, body, and processing information
Connecting to MCP Clients
Claude Desktop
To use Impart MCP with Claude Desktop, you'll need to configure the MCP server in Claude's configuration file. Here's how:
- Open or create your Claude Desktop configuration file:
# MacOS
vim ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Windows
# %AppData%\Claude\claude_desktop_config.json- Add the Impart MCP server configuration:
{
"mcpServers": {
"impart": {
"command": "npx",
"args": [
"@impart-security/impart-mcp"
],
"env": {
"IMPART_AUTH_TOKEN": "your_auth_token"
}
}
}
}Make sure to update the environment variables with your Impart credentials.
- Restart Claude Desktop for the changes to take effect.
The Impart MCP tools will now be available in your Claude Desktop conversations. You can use them to manage rules scripts, API bindings, endpoints, and more directly from Claude.
Cursor
To use Impart MCP with Cursor, create or edit the mcp.json file in your Cursor configuration directory:
# MacOS
vim ~/Library/Application\ Support/Cursor/mcp.json
# Windows
# %AppData%\Cursor\mcp.jsonAdd the Impart MCP server configuration:
{
"mcpServers": {
"impart": {
"command": "npx",
"args": ["@impart-security/impart-mcp"],
"env": {
"IMPART_AUTH_TOKEN": "your_auth_token"
}
}
}
}Make sure to update the environment variables with your Impart credentials.
Testing
Comprehensive test suite with regression tests for all critical fixes.
# Run all tests
npm run build
cd testing
./test-all.shFor complete testing documentation, see testing/TESTING.md
Quick links:
- Testing Guide - Complete guide with all fixes documented
- Claude Desktop Setup - Integration guide
- Sample Outputs - Real API examples
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
When contributing:
- Run
npm run buildto compile - Run
cd testing && ./test-all.shto verify tests pass - Add tests for new features or bug fixes
- Update documentation
License
ISC
Support
For support, please contact Impart support or open an issue on GitHub.
