Official Schema: See the JSON Schema definition for the authoritative source configuration specification.
Quick Reference
All source configuration fields:| Field | Type | Required | Default | Description |
|---|---|---|---|---|
host | string | ✅ Yes | - | IBM i hostname or IP address |
user | string | ✅ Yes | - | IBM i user profile |
password | string | ✅ Yes | - | User profile password |
port | integer | No | 8076 | Mapepire daemon port |
ignore-unauthorized | boolean | No | false | Accept self-signed SSL certs |
Basic Source Configuration
Every YAML file starts with asources section that defines one or more database connections:
Source Naming: Choose descriptive source names like
ibmi-production, ibmi-dev, or ibmi-system. Tools reference these names in their source field to specify which connection to use.Source Fields Reference
Required Fields
All sources must include these three fields:| Field | Type | Description | Example |
|---|---|---|---|
host | string | Hostname or IP address of IBM i system running Mapepire daemon | ${DB2i_HOST} |
user | string | IBM i user profile for database authentication | ${DB2i_USER} |
password | string | Password for the IBM i user profile | ${DB2i_PASS} |
- Environment Variables (Recommended)
- Direct Values (Development Only)
- IP Address
- Object authority to tables, views, and procedures accessed by tools
- Special authorities for system services (e.g.,
*AUDITfor security tools) - IBM i object-level security applies to all SQL queries
Optional Fields
These fields have sensible defaults and can be omitted for most configurations:| Field | Type | Default | Description |
|---|---|---|---|
port | integer | 8076 | Port number where Mapepire daemon listens |
ignore-unauthorized | boolean | false | Accept self-signed SSL certificates |
- Port Configuration
- SSL Configuration
Default port (8076):Custom port:Environment variable with default:
The default port 8076 is the standard port for the Mapepire daemon on IBM i systems.
Environment Variables
Use environment variables to externalize sensitive configuration and support multiple environments:Basic Pattern
Default Values
Provide fallback values for optional settings:Syntax:
${VARIABLE_NAME:default_value} - Use : to specify default values that apply when the environment variable is not set.Multiple Sources
Define multiple sources for different environments, systems, or use cases:Multi-Environment Setup
Multi-System Setup
Connect to multiple IBM i systems in a single configuration:Complete Configuration Examples
Development Configuration
Production Configuration
Custom Port Configuration
Security Best Practices
Environment Variables
Environment Variables
Always use environment variables for:
- Hostnames
- User profiles
- Passwords
- Ports (if non-standard)
Credential Rotation
Credential Rotation
Regular rotation strategy:
- Update .env file with new credentials
- Restart MCP server to apply changes
- Test connection with simple tool
- Update production after successful testing
- Use secrets management systems (Vault, AWS Secrets Manager)
- Configure automatic credential refresh
- Monitor for rotation failures
SSL/TLS Configuration
SSL/TLS Configuration
Production requirements:
- Valid SSL certificates from trusted CA
ignore-unauthorized: falseenforced- Regular certificate renewal
- Strong cipher suites
- Self-signed certificates allowed
ignore-unauthorized: truefor testing only- Never deploy to production with this setting
File Permissions
File Permissions
Protect YAML configuration files:
Troubleshooting
Connection Refused
Connection Refused
Symptom:
ECONNREFUSED or “Connection refused” errorsSolutions:- Verify Mapepire daemon is running on IBM i:
- Check firewall rules allow connections
- Verify hostname resolves correctly:
- Test port connectivity:
Authentication Failures
Authentication Failures
Symptom: “Invalid credentials” or “User not authorized” errorsSolutions:
- Verify environment variables are set:
- Test credentials directly on IBM i
- Check user profile status (not disabled/expired)
- Verify user has database authorities
Timeout Errors
Timeout Errors
Symptom: “Request timeout” or “Connection timeout” errorsSolutions:
- Increase
requestTimeoutfor long-running queries - Increase
connectionTimeoutfor slow networks - Optimize SQL queries to run faster
- Check network latency between server and IBM i
SSL Certificate Errors
SSL Certificate Errors
Symptom: “Certificate verification failed” or “Self-signed certificate” errorsSolutions:
- Development: Set
ignore-unauthorized: true - Production: Install valid SSL certificates on IBM i
- Update certificate trust store if needed
- Verify certificate has not expired
Next Steps
Tools Reference
Learn about tool definitions and configuration
Toolsets Reference
Organize tools into logical groups
Building SQL Tools
Step-by-step guide to creating custom tools
Configuration Guide
Complete server configuration reference
Source Design Philosophy: Sources represent database connections, not business logic. Keep source configurations simple, secure, and environment-specific. Use environment variables for all sensitive data and support multiple environments with distinct source names.