Code linting and formatting tool used in the development workflow for maintaining code quality
Environment variable configuration management for secure API key and URL storage
Source code repository hosting and version control for the MCP server project
JavaScript runtime environment required for running the MCP server
Package manager for installing dependencies and distributing the MCP server
Programming language used for building the MCP server with type safety
TypeScript schema validation library used for input validation and API response parsing
HUDU MCP Server
A Model Context Protocol (MCP) server that integrates with HUDU for technical documentation and customer information management. This server allows Large Language Models (LLMs) to interact with HUDU's API to retrieve customer account information, knowledge base articles, assets, and more.
Features
- Company/Customer Management: Retrieve company information with advanced filtering
- Knowledge Base Access: Search and retrieve technical documentation articles with enhanced filters
- Asset Management: Access asset information with comprehensive search capabilities
- User Management: Retrieve user information and details
- Network Management: Access network configurations and details
- Procedure Management: Retrieve documented procedures and workflows
- Activity Logging: Access detailed activity logs with filtering
- Asset Layouts: Retrieve asset layout definitions and schemas
- Folder Management: Access organizational folder structures
- Password Management: Secure access to credential information
- Advanced Search: Enhanced filtering across all resource types
- Secure Authentication: API key-based authentication with HUDU
- Type Safety: Built with TypeScript and Zod validation
- Error Handling: Comprehensive error handling and logging
Prerequisites
- Node.js 18.0.0 or higher
- A HUDU instance with API access
- HUDU API key (obtainable from your HUDU admin panel)
Installation
From NPM (Recommended)
From Source
Configuration
The server requires two environment variables:
HUDU_API_KEY
: Your HUDU API key (found in HUDU under Admin > API Keys)HUDU_BASE_URL
: Your HUDU instance base URL (domain only, do not include/api/v1
)
Setting up Environment Variables
- Copy the example environment file:
- Edit the
.env
file with your actual values:
Important: The HUDU_BASE_URL
should only contain your domain (e.g., https://your-company.huducloud.com
). Do NOT include /api/v1
in the URL as this is automatically appended by the client.
- Make sure your
.env
file is not committed to version control (it's already in.gitignore
)
Usage
Running the Server
Development mode:
Production mode:
Startup Validation
The MCP server automatically validates your API connection during startup by calling the /api_info
endpoint. This ensures:
- Your
HUDU_API_KEY
is valid and active - Your
HUDU_BASE_URL
is correct and accessible - Your API key has the necessary permissions
If validation fails, you'll see a clear error message indicating the issue:
- 401 errors: Invalid or expired API key
- 403 errors: API key lacks sufficient permissions
- 404/connection errors: Incorrect base URL or network issues
- Token limit exceeded: Large responses may be truncated automatically (see Response Size Management below)
This validation helps catch configuration issues early, before you start using the MCP tools.
Response Size Management
The MCP server automatically handles large responses to prevent token limit issues:
- Automatic Truncation: Responses larger than ~3MB are automatically truncated
- Truncation Indicators: Truncated responses include
_truncation_info
with details - Pagination Recommended: Use
page
andpage_size
parameters to get smaller chunks - Array Limits: Large arrays are truncated with information about remaining items
- Text Field Limits: Long text fields (>10KB) are truncated with "[truncated]" indicator
Best Practices for Large Datasets
- Use Pagination: Always use
page_size
parameter (max 100) to limit results - Filter Results: Use search and filter parameters to narrow down results
- Incremental Queries: For large datasets, make multiple smaller queries
- Monitor Truncation: Check for
_truncation_info
in responses to detect truncated data
Example of paginated query:
Available Tools
The MCP server provides the following tools for LLM interaction:
Company/Customer Tools
get_companies
- Retrieve a list of companies/customers with advanced filtering
- Parameters:
name
(optional): Filter companies by namephone_number
(optional): Filter companies by phone numberwebsite
(optional): Filter companies by websitecity
(optional): Filter companies by cityid_number
(optional): Filter companies by ID numberstate
(optional): Filter companies by stateslug
(optional): Filter companies by URL slugsearch
(optional): Filter companies using a search queryid_in_integration
(optional): Filter companies by ID/identifier in PSA/RMM/outside integrationupdated_at
(optional): Filter companies updated within a range or at an exact timepage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_company_details
- Get detailed information about a specific company
- Parameters:
id
(required): Company ID
Knowledge Base Tools
search_articles
- Search knowledge base articles with enhanced filtering
- Parameters:
search
(optional): Search query for articlescompany_id
(optional): Filter articles by company IDname
(optional): Filter articles by nameslug
(optional): Filter articles by URL slugdraft
(optional): Set to true to display only draft articlesenable_sharing
(optional): Filter articles by sharing statusupdated_at
(optional): Filter articles updated within a range or at an exact timepage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_article
- Get detailed content of a specific article
- Parameters:
id
(required): Article ID
Asset Management Tools
get_assets
- Retrieve assets with advanced filtering options
- Parameters:
company_id
(optional): Company ID to filter assetsasset_layout_id
(optional): Filter by asset layout IDid
(optional): Filter assets by their IDname
(optional): Filter assets by their nameprimary_serial
(optional): Filter assets by their primary serial numberarchived
(optional): Set to true to display only archived assetsslug
(optional): Filter assets by their URL slugsearch
(optional): Filter assets using a search queryupdated_at
(optional): Filter assets updated within a range or at an exact timepage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_asset_passwords
- Retrieve password assets (credentials) for a company
- Parameters:
company_id
(optional): Company ID to filter passwordsname
(optional): Filter by password namepage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_asset_layouts
- Retrieve asset layout definitions
- Parameters:
name
(optional): Filter layouts by namepage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_asset_layout
- Get detailed information about a specific asset layout
- Parameters:
id
(required): Asset layout ID
Note: Passwords are masked in list responses for security. Individual password retrieval would require additional implementation.
User Management Tools
get_users
- Retrieve a list of users
- Parameters:
search
(optional): Filter users using a search querypage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_user
- Get detailed information about a specific user
- Parameters:
id
(required): User ID
Network Management Tools
get_networks
- Retrieve a list of networks
- Parameters:
search
(optional): Filter networks using a search querypage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_network
- Get detailed information about a specific network
- Parameters:
id
(required): Network ID
Procedure Management Tools
get_procedures
- Retrieve a list of procedures
- Parameters:
search
(optional): Filter procedures using a search querypage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_procedure
- Get detailed information about a specific procedure
- Parameters:
id
(required): Procedure ID
Activity Logging Tools
get_activity_logs
- Retrieve activity logs with advanced filtering
- Parameters:
user_id
(optional): Filter logs by user IDuser_email
(optional): Filter logs by user emailresource_id
(optional): Filter logs by resource IDresource_type
(optional): Filter logs by resource typeaction_message
(optional): Filter logs by action messagestart_date
(optional): Filter logs from a specific start datesearch
(optional): Filter logs using a search querypage
(optional): Page number for paginationpage_size
(optional): Number of results per page
Folder Management Tools
get_folders
- Retrieve a list of folders
- Parameters:
search
(optional): Filter folders using a search querypage
(optional): Page number for paginationpage_size
(optional): Number of results per page
get_folder
- Get detailed information about a specific folder
- Parameters:
id
(required): Folder ID
Example Usage with Claude Desktop
- Add the server to your Claude Desktop configuration:
- Restart Claude Desktop
- You can now ask Claude to:
Company Management:
- "Show me all companies in our HUDU instance"
- "Find companies in New York with phone numbers containing '555'"
- "Search for companies with website containing 'tech.com'"
- "Get company details for Acme Corp"
Knowledge Base:
- "Search for articles about 'network configuration'"
- "Find draft articles updated in the last week"
- "Show me shared articles for company ID 123"
- "Get the article with ID 456"
Asset Management:
- "Show me all assets for company ID 789"
- "Find assets with serial number containing 'ABC123'"
- "Search for archived network equipment assets"
- "Get asset layout definitions for servers"
User & Activity Management:
- "Show me all active users in the system"
- "Find activity logs for user john@company.com from last month"
- "Search for login activities in the past week"
Network & Procedures:
- "List all documented network configurations"
- "Find procedures related to backup processes"
- "Show me folder structure for IT documentation"
API Integration
This MCP server integrates with the HUDU API v1. The following endpoints are supported:
/api/v1/companies
- Company management/api/v1/articles
- Knowledge base articles/api/v1/assets
- Asset management/api/v1/asset_passwords
- Password/credential management/api/v1/asset_layouts
- Asset layout definitions/api/v1/activity_logs
- Activity logging/api/v1/api_info
- API information
Development
Project Structure
Available Scripts
npm run build
- Build the TypeScript projectnpm run dev
- Run in development mode with hot reloadnpm run start
- Run the built servernpm run watch
- Watch for changes and rebuildnpm run clean
- Clean the dist directory
Adding New Tools
- Define the tool schema and handler in the appropriate tools file
- Add the tool name to the routing logic in
tools/index.ts
- Update the tool list in
index.ts
- Add corresponding API methods to
hudu-client.ts
if needed
Security Considerations
- API keys are passed via environment variables
- Passwords are masked in list responses
- All API requests include proper authentication headers
- Input validation using Zod schemas
- Comprehensive error handling to prevent information leakage
Troubleshooting
Common Issues
"Configuration validation failed"
- Ensure
HUDU_API_KEY
andHUDU_BASE_URL
are set in your environment - Verify the API key is valid and has appropriate permissions
"HUDU API Error (401)"
- Check that your API key is correct
- Verify the API key has not expired
- Ensure your HUDU user has API access permissions
"HUDU API Error (404)"
- Verify the HUDU_BASE_URL is correct
- Check that the HUDU instance is accessible
Connection timeouts
- Check network connectivity to your HUDU instance
- Verify firewall settings allow outbound HTTPS connections
Debugging
Enable debug logging by setting the environment variable:
Troubleshooting
Common Issues
"Invalid URL" Error
- Ensure your
HUDU_BASE_URL
contains only the domain (e.g.,https://your-company.huducloud.com
) - Do NOT include
/api/v1
in the base URL - this is automatically appended - Make sure the URL starts with
https://
orhttp://
"Configuration validation failed" Error
- Check that both
HUDU_API_KEY
andHUDU_BASE_URL
are set in your.env
file - Verify there are no extra spaces or quotes around the values
- Ensure the
.env
file is in the correct directory (project root)
"403 Forbidden" or Authentication Errors
- Verify your API key is correct and active in HUDU (Admin > API Keys)
- Check that your API key has the necessary permissions
- Ensure your HUDU instance URL is correct
"401 Unauthorized" for Password Access
- This occurs when your API key doesn't have permission to access password data
- HUDU allows administrators to restrict password access per API key for security
- The MCP server now handles this gracefully with an informative message
- Contact your HUDU administrator to enable password access if needed
- You can still use other asset management tools that don't require password permissions
"page_size must be less than or equal to 100" Error
- The HUDU API limits page_size to a maximum of 100 results per request
- Use pagination with multiple requests for larger datasets
Testing Your Configuration
To test if your configuration is working:
- Set up your
.env
file with correct values - Run the server:
npm start
- If using with Claude Desktop, check the MCP server logs
- Try a simple query like getting companies with a small page_size (e.g., 10)
Contributing
We welcome contributions to the HUDU MCP Server! Here's how you can help:
Getting Started
- Fork the repository on GitHub
- Clone your fork:
- Install dependencies:
- Create a feature branch:
Development Guidelines
- Follow the existing code style (enforced by Biome)
- Add appropriate error handling
- Update documentation for new features
- Test your changes thoroughly
- Run the linter and formatter:
Submitting Changes
- Commit your changes with clear, descriptive messages
- Push to your fork:
- Create a Pull Request on GitHub
- Describe your changes and their purpose
- Link any related issues
Code of Conduct
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License Summary
You are free to:
- ✅ Use this software for any purpose
- ✅ Modify and distribute the software
- ✅ Include it in commercial projects
- ✅ Sublicense the software
Requirements:
- 📄 Include the original copyright notice
- 📄 Include the license text
The software is provided "as is" without warranty.
Support
For issues related to:
- HUDU API: Consult the HUDU documentation or contact HUDU support
- MCP Protocol: See the Model Context Protocol documentation
- This Server: Create an issue in this repository
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with HUDU technical documentation and customer management platform through API integration. Supports retrieving company information, searching knowledge base articles, and managing assets and credentials.
Related MCP Servers
- -securityFlicense-qualityEnables interaction with GitHub through the GitHub API, supporting file operations, repository management, advanced search, and issue tracking with comprehensive error handling and automatic branch creation.Last updated -92531TypeScript
- -securityFlicense-qualityProvides curated documentation access via the Gemini API, enabling users to query and interact with technical docs effectively by overcoming context and search limitations.Last updated -13TypeScript
- -securityAlicense-qualityEnables interaction with GitHub repositories through the GitHub API, allowing file operations, repository management, issue tracking, and code search through natural language commands.Last updated -52TypeScriptMIT License
- AsecurityAlicenseAqualityProvides tools to interact with the Dash documentation browser API, allowing users to list installed docsets, search across documentation, and enable full-text search.Last updated -38PythonMIT License