Common Issues
spawn uvx ENOENT
spawn uvx ENOENT
Error:Cause: The MCP client cannot find the
uvx command in your system PATH.Solution: Specify the full path to uvx in your configuration.-
Find the full path to
uvx:Example output:/usr/local/bin/uvxor/Users/username/.local/bin/uvx -
Update your MCP configuration with the full path:
uv if not already installed:File Locked / Database is Locked
File Locked / Database is Locked
Error:Cause: Another process has a write lock on the database file, or ephemeral connections are disabled.Solution 1: Enable ephemeral connections (default for read-only):Solution 2: Check if you’re in read-write mode:Solution 3: Close other connections to the database:
- Check for other MCP servers connected to the same file
- Close any DuckDB CLI sessions
- Close applications with open connections to the file
MotherDuck Token Issues
MotherDuck Token Issues
Error:Cause: MotherDuck token is not configured.Solution: Set the token in your MCP configuration:Alternative: Set as system environment variable:
The server checks for both
motherduck_token and MOTHERDUCK_TOKEN environment variables (case-insensitive).Read-Scaling Token Required
Read-Scaling Token Required
Error:Cause: You’re using a regular MotherDuck token in read-only mode, which requires a read-scaling token.Solution 1: Use read-write mode with your regular token:Solution 2: Create and use a read-scaling token:
- Create a read-scaling token in MotherDuck:
- Visit MotherDuck Console
- Go to Settings → Tokens
- Create a new read-scaling token
- Use the read-scaling token:
In-Memory Database Requires --read-write
In-Memory Database Requires --read-write
Error:Cause: DuckDB doesn’t support read-only mode for in-memory databases (
:memory:).Solution: Add the --read-write flag:In-memory databases are temporary by nature, so write access doesn’t pose the same risks as persistent databases.
S3 Connection Issues
S3 Connection Issues
Error:Cause: Missing AWS credentials or incorrect S3 configuration.Solution: Provide AWS credentials in environment variables:For IAM roles/session tokens:Troubleshooting checklist:
- Verify S3 bucket exists and is accessible
- Check AWS credentials are correct
- Ensure IAM permissions allow S3 access
- Verify S3 bucket region matches
AWS_DEFAULT_REGION - Check S3 path is correct:
s3://bucket-name/path/to/file.duckdb
Query Timeout
Query Timeout
Error:Cause: Query exceeded the configured timeout limit.Solution 1: Increase the timeout:Solution 2: Disable timeout (use with caution):Solution 3: Optimize the query:
- Add indexes to frequently queried columns
- Use LIMIT clause to reduce result set size
- Filter data earlier in the query
- Check query execution plan with EXPLAIN
Results Truncated
Results Truncated
Warning:Cause: Query results exceed configured limits.Solution: Adjust result limits:Alternative: Use SQL LIMIT in your query:
Cannot Switch Databases
Cannot Switch Databases
Error:Cause: Database switching is disabled by default.Solution: Enable the
--allow-switch-databases flag:Init SQL Execution Failed
Init SQL Execution Failed
Error:Cause: The SQL provided in Solution 2: Check file path (if using file):Solution 3: Use inline SQL string:
--init-sql contains syntax errors or invalid commands.Solution 1: Verify SQL syntax:Migration Issues (v0.x to v1.0+)
Read-Only by Default
Old behavior (v0.x): Write access by defaultNew behavior (v1.0+): Read-only by default Migration:
Default Database Changed
Old behavior (v0.x): Default--db-path was md:New behavior (v1.0+): Default
--db-path is :memory:
Migration:
MotherDuck Read-Only Requires Read-Scaling Token
New requirement: MotherDuck connections in read-only mode require a read-scaling token. Migration: Either:- Use
--read-writewith regular token - Create a read-scaling token for read-only access
Getting Help
If you’re still experiencing issues:- Check the logs: Look for detailed error messages in your MCP client logs
- Verify configuration: Ensure your JSON configuration is valid
- Test connection: Try connecting with a simple in-memory database first
- GitHub Issues: Search existing issues or create a new one at github.com/motherduckdb/mcp-server-motherduck