🤖 Criage MCP Server
Documentation for the MCP server for integrating Criage with AI tools via the Model Context Protocol.
Overview
Criage MCP Server provides full package manager functionality via the MCP (Model Context Protocol) for integration with AI tools.
What is MCP Server?
MCP Server allows AI assistants to directly interact with Criage for:
- 🔍 Package search and installation - AI can find suitable packages and install them
- 📦 Dependency management - automatic conflict resolution and updates
- 🆕 Creating new packages - structure generation and manifest setup
- 🔨 Building and publishing packages - automating the release process
- 📊 Information retrieval - analyzing package and repository status
Benefits of AI Integration
🎯 Intelligent Search
AI understands your needs and finds suitable packages even from vague descriptions.
⚡ Automation of Routine
Automatic execution of common operations: installation, updates, project creation.
🔧 Smart Configuration
AI helps with configuration and solving compatibility issues.
Installation
Requirements
- Go 1.21 or higher
- Installed Criage
- Claude Desktop or other MCP client
Building the Server
# Navigate to mcp-server directory cd mcp-server # Install dependencies go mod tidy # Build the server go build -o criage-mcp-server.exe .
.exe
extension, on
Linux/macOS you can omit the extension.
Integration with Claude Desktop
Configuration Setup
Add the MCP Server to Claude Desktop configuration:
Windows
Edit the file %APPDATA%\Claude\config.json
:
{ "mcpServers": { "criage": { "command": "C:\\path\\to\\criage-mcp-server.exe", "args": [], "env": {} } } }
Linux/macOS
Edit the file ~/.config/claude-desktop/config.json
:
{ "mcpServers": { "criage": { "command": "/path/to/criage-mcp-server", "args": [], "env": {} } } }
Verifying Integration
- Restart Claude Desktop
- Criage tools should appear in a new chat
- Try the query: "Show me available Criage tools"
list_packages
tool and show the
result.
Available Tools
📦 Package Management
install_package
- Install package from repositoryuninstall_package
- Remove installed packageupdate_package
- Update package to latest versionlist_packages
- List all installed packages
🔍 Search and Exploration
search_packages
- Search packages by keywordspackage_info
- Detailed package informationrepository_info
- Repository information
🛠️ Development
create_package
- Create new packagebuild_package
- Build packagepublish_package
- Publish package to repository
Tool Parameters
Each tool accepts various parameters for precise operation configuration:
install_package
{ "name": "package-name", // Required: package name "version": "1.2.3", // Optional: specific version "global": false, // Optional: global installation "force": false, // Optional: force reinstallation "arch": "amd64", // Optional: target architecture "os": "windows" // Optional: target OS }
search_packages
{ "query": "web framework", // Required: search query "limit": 10, // Optional: maximum results "category": "web" // Optional: filter by category }
Usage Examples
Search and Install Package
AI actions:
1. Uses
search_packages
with query "JSON"2. Analyzes results and selects suitable package
3. Uses
install_package
for installation4. Confirms successful installation
Creating New Project
AI actions:
1. Uses
create_package
with appropriate parameters2. Configures manifest with description and dependencies
3. Suggests installing necessary packages for development
4. Explains the structure of the created project
Dependency Management
AI actions:
1. Uses
list_packages
with outdated filter2. For each outdated package uses
update_package
3. Shows update results
4. Warns about possible conflicts
Repository Analysis
AI actions:
1. Uses
repository_info
to get statistics2. Analyzes data about package count and authors
3. Shows top popular packages
4. Provides usage recommendations
Configuration
Automatic Configuration
MCP Server uses standard Criage configuration from ~/.criage/config.json
. On first run, default configuration is
automatically created:
{ "repositories": [ { "name": "default", "url": "http://localhost:8080", "priority": 1, "enabled": true } ], "global_path": "~/.criage/packages", "local_path": "./criage_modules", "cache_path": "~/.criage/cache", "temp_path": "~/.criage/temp", "timeout": 30, "max_concurrency": 4, "compression_level": 3, "force_https": false }
Environment Variables
You can use environment variables to configure server behavior:
# Enable verbose logging set CRIAGE_DEBUG=1 # Override config path set CRIAGE_CONFIG_PATH=C:\custom\config.json # Disable colors in output set NO_COLOR=1
Repository Configuration
If you're using a custom Criage repository, update the configuration:
{ "repositories": [ { "name": "production", "url": "https://packages.mycompany.com", "priority": 10, "enabled": true, "token": "your-access-token" }, { "name": "development", "url": "https://dev-packages.mycompany.com", "priority": 5, "enabled": true } ] }
Troubleshooting
Server Won't Start
Solutions:
- Ensure Go is installed correctly:
go version
- Check executable file permissions
- Ensure
~/.criage
directory is writable - Check the path in Claude Desktop configuration is correct
Tools Not Showing in Claude
Solutions:
- Check JSON syntax in
config.json
- Restart Claude Desktop
- Ensure server path is specified correctly
- Check Claude Desktop logs for errors
Package Operation Errors
Solutions:
- Check Criage repository availability
- Ensure repository configuration is correct
- Check access permissions to installation directories
- Enable debug mode:
set CRIAGE_DEBUG=1
Debugging and Logging
Enable verbose logging for problem diagnosis:
# Windows set CRIAGE_DEBUG=1 criage-mcp-server.exe # Linux/macOS export CRIAGE_DEBUG=1 ./criage-mcp-server
Compatibility Check
Ensure version compatibility:
- ✅ Windows 10/11 - full support
- ✅ Ubuntu 20.04+ - full support
- ✅ macOS 10.15+ - full support
- ✅ Claude Desktop - primary client
- ⚠️ Other MCP clients - basic support