FAQ
Common questions and solutions for MateClaw.
Installation & Setup
Q: What Java version do I need?
Java 17 or higher. MateClaw uses features introduced in Java 17 (sealed classes, text blocks, records). Verify with:
java -versionQ: How do I get a DashScope API key?
- Go to the Alibaba Cloud DashScope console
- Sign up or log in
- Navigate to API Keys and create a new key
- After startup, go to Settings > Model Management, select DashScope, and enter the API key
Q: Can I use MateClaw without DashScope?
Yes. Configure Ollama for fully local operation with no cloud API:
spring:
ai:
ollama:
base-url: http://localhost:11434
chat:
options:
model: qwen2.5:7bMateClaw no longer requires setting DASHSCOPE_API_KEY as an environment variable to start. All model provider API keys can be configured after startup through the Settings > Model Management page.
Q: The backend fails to start with a port conflict
Another process is using port 18088. Either stop that process or change the port:
mvn spring-boot:run -Dspring-boot.run.arguments="--server.port=19090"Q: H2 database lock error on startup
This happens when a previous instance did not shut down cleanly. Delete the lock file:
rm -f data/mateclaw.mv.db.lock
# Or delete the entire data directory to start fresh:
rm -rf data/Authentication
Q: What are the default credentials?
Username: admin, Password: admin123
Q: My JWT token keeps expiring
MateClaw implements sliding-window renewal. If you are making API calls manually (e.g., with curl), check the X-New-Token response header and use the new token for subsequent requests.
Q: How do I change the admin password?
Through the Settings page in the UI, or directly in the database:
-- The password should be BCrypt-encoded
UPDATE mate_user SET password = '$2a$10$...' WHERE username = 'admin';Models
Q: How do I use GPT-4 with MateClaw?
Add OpenAI as a provider through the Settings page or application.yml:
spring:
ai:
openai:
api-key: ${OPENAI_API_KEY}
base-url: https://api.openai.comThen create a model config in the UI pointing to gpt-4o.
Q: Ollama models are slow
Local model performance depends on your hardware. Tips:
- Use smaller models (7B instead of 14B) on machines with less RAM
- Ensure Ollama has GPU access (check with
ollama ps) - Increase Ollama's memory limit if available
- Use
qwen2.5:7bas a good balance of speed and quality
Q: Can I use multiple model providers simultaneously?
Yes. Configure multiple providers and assign different model configs to different agents. Each agent can use a different model.
Search & Tools
Q: How do I switch the search provider (Serper/Tavily)?
Search provider configuration has been moved to the UI. Go to the System Settings page, find the search configuration section, select your preferred provider (Serper or Tavily), enter the corresponding API key, and save. No configuration files or environment variables need to be modified.
Q: How do I configure MCP servers?
Use the MCP Servers management page in the frontend. From there you can add, edit, and remove MCP server connections. Three transport modes are supported: stdio, streamable_http, and sse. Once configured, tools provided by the MCP server are automatically registered in the system. Changes to MCP configuration take effect without restarting the application -- the system reconnects automatically.
Q: How do I add a custom tool?
Create a Spring @Component with @Tool-annotated methods:
@Component
public class MyCustomTool {
@Tool(description = "Get weather information")
public String getWeather(String city) {
// Implementation
return "Sunny, 25C";
}
}The tool is automatically registered on startup. See Tool System for a full example.
Q: WebSearchTool returns empty results
Ensure you have set either SERPER_API_KEY or TAVILY_API_KEY:
export SERPER_API_KEY=your-serper-key
# OR
export TAVILY_API_KEY=your-tavily-keyYou can also configure the search API key through the System Settings page.
Q: ToolGuard keeps blocking my tool calls
If you want to disable approval for specific tools in a development environment:
mateclaw:
tool:
guard:
enabled: false # Disable entirely (not recommended for production)Or configure auto-approve patterns for safe commands. See Security.
Memory
Q: Memory is not working
Troubleshooting steps:
- Confirm that automatic memory extraction is enabled. Check that
mate.memory.autoSummarizeEnabledis set totrue - Verify that memory-related toggles are enabled on the System Settings page
- Check the logs for any memory extraction errors
- Ensure the model in use has sufficient context length for memory extraction
mate:
memory:
autoSummarizeEnabled: trueQ: Memory consolidation tasks are not running
Memory consolidation is driven by CronJob seed data and runs automatically at 2:00 AM daily. Check the mate_cron_job table for memory consolidation task records and verify their status is enabled.
Agents
Q: Agent stuck in RUNNING state
Possible causes and solutions:
- Tool call timeout: The agent is waiting for a tool to return results. Check whether the tool is functioning correctly
- Max iterations exceeded: The agent's ReAct loop has hit the
maxIterationslimit. Increase this value in the agent configuration - Awaiting approval: ToolGuard has paused execution pending user approval. Check the chat interface for pending approval requests
- Review logs: Enable DEBUG logging to diagnose where the agent is stuckbash
mvn spring-boot:run -Dspring-boot.run.arguments="--logging.level.vip.mate.agent=DEBUG" - If the agent is truly stuck, reset its state through the API
Channels
Q: DingTalk/Feishu webhook is not receiving messages
Common causes:
- Your server is not publicly accessible (IM platforms need to reach your webhook URL)
- HTTPS is required for most platforms -- use a reverse proxy with TLS
- The verification token is incorrect -- check your channel configuration
- The bot has not been added to the group or does not have message permissions
Q: Can I use multiple channels at the same time?
Yes. Each channel is independent and can be configured with a different agent. Messages from DingTalk and Telegram can be handled by different agents simultaneously.
Data Backup
Q: How do I backup data?
H2 database (development):
Copy the ./data/mateclaw.mv.db file directly. Stop the service first to avoid data inconsistency.
# Copy after stopping the service
cp ./data/mateclaw.mv.db ./backup/mateclaw-$(date +%Y%m%d).mv.dbMySQL database (production):
Use mysqldump:
mysqldump -u root -p mateclaw > mateclaw-backup-$(date +%Y%m%d).sqlDocker environment:
docker exec mateclaw-mysql mysqldump -u root -p${MYSQL_ROOT_PASSWORD} mateclaw > backup.sqlDesktop App
Q: Desktop app won't start
The installer bundles a JRE, so you typically do not need to install Java separately.
Troubleshooting steps:
- Review application logs:
- macOS:
~/Library/Logs/MateClaw/ - Windows:
%APPDATA%/MateClaw/logs/ - Linux:
~/.local/share/MateClaw/logs/
- macOS:
- Try launching from a terminal to see console output
- Confirm port 18088 is not in use by another process
- API keys can be configured after startup through Settings > Model Management -- no need to set environment variables in advance
See the troubleshooting section in Desktop Application for more details.
Q: How do I update the desktop app?
MateClaw desktop supports automatic updates. On startup, the app automatically checks GitHub Releases for a new version. When an update is found, a notification appears in the interface to download and install it. You can also manually download the latest version from the Releases page and install it over the existing version.
Docker
Q: Docker containers fail to start
Check the logs:
docker compose logs mateclaw-server
docker compose logs mateclaw-mysqlCommon issues:
- MySQL not ready yet -- the server may start before MySQL is fully initialized. It should retry automatically.
- Port conflicts -- ensure ports 18080 and 3306 are free
- Missing
.envfile -- copy.env.exampleto.envand fill in required values
Q: How do I access the database in Docker?
docker exec -it mateclaw-mysql mysql -u root -p mateclawDebugging
Q: How do I enable DEBUG logging?
logging:
level:
vip.mate: DEBUG
org.springframework.ai: DEBUGOr via command line:
mvn spring-boot:run -Dspring-boot.run.arguments="--logging.level.vip.mate=DEBUG"Q: How do I access the H2 console?
The H2 web console is enabled by default in development:
- Visit
http://localhost:18088/h2-console - JDBC URL:
jdbc:h2:file:./data/mateclaw - Username:
sa - Password: (empty)
Q: How do I inspect SSE streaming events?
Use the browser DevTools Network panel:
- Open DevTools (F12)
- Switch to the Network tab
- Filter by
EventStreamtype - Send a message and observe the SSE event stream
Or use curl:
curl -N -H "Authorization: Bearer <token>" \
"http://localhost:18088/api/v1/chat/1/stream?conversationId=1"Frontend
Q: The frontend shows a blank page after build
Ensure the build output is in the correct location:
cd mateclaw-ui
pnpm build
ls ../mateclaw-server/src/main/resources/static/
# Should contain index.html and asset filesQ: Dark mode is not persisting
The theme preference is stored in localStorage. If you are clearing browser data, the preference is lost. Check that your browser allows localStorage for the site.
Next Steps
- Quick Start -- Setup guide
- Configuration -- Full configuration reference
- Contributing -- Report bugs and request features
