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 |
jdbc-options | object | No | {} | JDBC connection options passed to the mapepire driver (libraries, naming, date format, etc.) |
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 |
jdbc-options | object | {} | JDBC connection options forwarded to the mapepire driver |
- 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.
JDBC Options
Forward any mapepire JDBC option to the underlying driver. Thejdbc-options field accepts any property supported by the IBM i JDBC driver — library list, SQL naming convention, date format, time format, and many more.
Common Options
| Option | Purpose | Example |
|---|---|---|
libraries | Library list for unqualified name resolution | [MYLIB, DEVDATA, QGPL] |
naming | SQL naming convention | sql or system |
date format | Date literal format | iso, usa, eur, jis, mdy, dmy, ymd, julian |
time format | Time literal format | hms, usa, iso, eur, jis |
date separator | Date component separator | /, -, ., ,, b |
- Library List
- Date Format
- SQL Naming
- Combined
libraries also accepts a comma-separated string: libraries: "MYLIB, DEVDATA, QGPL" — the server splits and trims it into an array.Full Property List
The field accepts any property from the mapepireJDBCOptions interface — over 60 settings covering SQL behavior, date/time formatting, locale, tracing, and more. Refer to the IBM i JDBC properties reference for the complete catalog.
Passthrough validation: Unknown keys pass through the schema validator without error and are forwarded to the driver as-is. This is intentional — it avoids coupling the schema to the driver’s exact property surface. The tradeoff is that typos (e.g.,
librarys instead of libraries) are silently accepted at config load time and only surface when the driver rejects them at connection time.Environment Variable Override
TheDB2i_JDBC_OPTIONS environment variable overrides jdbc-options set in YAML — operators can enforce a fleet-wide JDBC configuration without editing per-deployment YAML. Env values are shallow-merged over YAML values (env wins on each key).
Security: Credential Logging
The server logs only thelibraries field of jdbc-options at pool initialization. All other JDBC fields — including potentially sensitive ones like key ring password, proxy server, and trace — are intentionally excluded from logs to prevent credential leakage.
If you need to verify other JDBC options took effect, query the JDBC driver’s runtime metadata (for example, execute
SELECT CURRENT_DATE and inspect the format) rather than relying on log inspection.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.