A comprehensive Model Context Protocol (MCP) server for integrating Claude with FileMaker databases. This server enables Claude to interact with your FileMaker databases through the FileMaker Data API, providing seamless database operations, script execution, and metadata discovery.
- Multi-Database Support: Connect to multiple FileMaker databases simultaneously
- Dynamic Configuration: Configure databases via environment variables
- Intelligent Caching: Built-in caching for improved performance
- Self-Signed Certificate Support: Works with FileMaker Cloud and on-premise servers
- Comprehensive Error Handling: Robust error handling and recovery
- List Databases: Enumerate all configured databases
- Test Connections: Verify database connectivity
- Get Metadata: Retrieve database schemas and layout information
- Query Records: Advanced record querying with filtering and sorting
- Create Records: Insert new records into layouts
- Update Records: Modify existing records
- Delete Records: Remove records from the database
- Execute Scripts: Run FileMaker scripts with parameters
- Script Discovery: List available scripts
- Username/Password: Traditional FileMaker authentication
- API Key: OttoFMS and modern FileMaker authentication
The MCP-Claude-FileMaker server is built on a sophisticated multi-layered architecture designed for enterprise-grade FileMaker integration:
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
β Claude AI βββββΊβ MCP Protocol βββββΊβ FileMaker Server β
β β β (JSON-RPC) β β (Data API v1) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
β β β
β βββββββββββββββββββ β
βββββββββββββββΊβ MCP Server ββββββββββββββββ
β (Node.js) β
βββββββββββββββββββ
β
βββββββββββββββββββββββββββββββ
β Core Components β
βββββββββββββββββββββββββββββββ€
β β’ Database Discovery Engine β
β β’ Dual-Cache System β
β β’ Authentication Manager β
β β’ Script Execution Engine β
β β’ Query Processing Layer β
β β’ SSL Certificate Handler β
βββββββββββββββββββββββββββββββ
Automatically discovers and configures multiple FileMaker databases:
- Environment scanning: Detects
FM_SERVER_*,FM_DATABASE_*patterns - Dynamic configuration: Supports unlimited database connections
- Authentication flexibility: Mixed auth methods per database
- Validation: Ensures complete configuration before startup
Intelligent caching for optimal performance:
// Data Cache (14 minutes TTL)
- Database metadata and layouts
- Query results and record sets
- Script lists and definitions
// Session Cache (13 minutes TTL)
- Authentication tokens
- Connection state management
- Auto-refresh before expirationRobust authentication with automatic recovery:
- Token lifecycle management: Automatic refresh and retry
- Multi-method support: Username/password and API keys
- Session persistence: Cached tokens across requests
- Error recovery: 401 auto-retry with new authentication
Comprehensive FileMaker script automation:
- Script discovery:
/scriptsendpoint enumeration with caching - Parameter passing: URL-encoded parameter support
- Layout context: Script execution within specific layouts
- Response capture: Full script result and error handling
- Workflow automation: Chained script execution via Claude conversations
Advanced data query capabilities:
- Smart endpoint selection: GET vs POST based on query complexity
- Complex find requests: Multi-criteria, AND/OR logic support
- Sorting and pagination: Full FileMaker Data API feature coverage
- Record operations: Complete CRUD functionality
Production-ready security management:
- Self-signed certificate support: Development-friendly defaults
- Production hardening: Configurable SSL verification levels
- HTTPS Agent: Custom agent for certificate management
Claude Request β MCP Protocol β Tool Validation β Database Selection
β β
Authentication Check β Session Cache β Token Manager β Database Config
β β
FileMaker API Call β HTTPS Request β FileMaker Server β Data/Script Response
β β
Response Processing β Data Cache β Result Formatting β Raw API Response
β
Claude Response (JSON)
- Metadata caching: Database schemas cached for 14 minutes
- Session reuse: Authentication tokens cached for 13 minutes
- Query optimization: Repeated queries served from cache
- Cache invalidation: Manual cache clearing available
- Connection pooling: Reused HTTPS connections
- Automatic retry: 401 errors trigger re-authentication
- Timeout handling: Graceful handling of connection timeouts
- SSL optimization: Custom HTTPS agent for performance
- Batch operations: Multiple database operations in single requests
- Smart querying: Optimal endpoint selection based on query type
- Parameter encoding: Proper URL encoding for special characters
- Response streaming: Efficient handling of large result sets
- Credential isolation: Environment variable storage only
- Token rotation: Automatic token refresh prevents stale sessions
- Mixed authentication: Different methods per database
- Access control: Database-specific permission validation
- TLS configuration: Configurable SSL/TLS verification
- Certificate management: Self-signed and CA certificate support
- Firewall compatibility: Standard HTTPS ports (80/443)
- Request signing: FileMaker Data API token-based authentication
- No persistent storage: All data flows through, never stored
- Cache encryption: In-memory cache only, no disk persistence
- Audit trail: All operations logged for security monitoring
- Error sanitization: Sensitive data excluded from error messages
The script execution system provides full automation capabilities:
Claude: "Run monthly report script with parameter Q4-2024"
β
Script Discovery: fm_get_scripts β Cache Check β FileMaker /scripts API
β
Script Validation: Verify script exists and is accessible
β
Script Execution: fm_run_script β Layout Context β Parameter Encoding
β
FileMaker API: GET /layouts/{layout}/script/{script}?script.param={param}
β
Result Processing: Script response β Error handling β Claude response
- Natural language execution: "Run the backup script"
- Parameter support: Complex parameter passing
- Context awareness: Layout-specific script execution
- Error handling: Comprehensive script error reporting
- Batch execution: Multiple scripts via conversation flow
Supports enterprise environments with multiple FileMaker systems:
Environment Variables Pattern:
FM_SERVER_PROD=prod.company.com β Production Database
FM_SERVER_DEV=dev.company.com β Development Database
FM_SERVER_CRM=crm.company.com β CRM Database
FM_SERVER_INVENTORY=inv.company.com β Inventory Database
Each database can have:
- Different authentication methods
- Separate caching strategies
- Independent script libraries
- Unique security requirements
- Connection failures: Clear error messages with troubleshooting guidance
- Authentication errors: Automatic retry with fresh credentials
- Timeout handling: Configurable timeout with fallback responses
- API errors: FileMaker error code translation to human-readable messages
- Health checks: Built-in container health monitoring
- Debug logging: Comprehensive debug mode for troubleshooting
- Performance metrics: Cache hit rates and response times
- Error tracking: Detailed error logging with context
- Node.js 18+ installed
- FileMaker Server with Data API enabled
- Claude Desktop (for MCP integration)
-
Clone or Download
git clone https://github.com/datacraftdevelopment/MCP-Claude-FileMaker.git cd MCP-Claude-FileMaker -
Install Dependencies
npm install
-
Configure Environment
cp .env.example .env # Edit .env with your FileMaker database details -
Configure Claude Desktop Add to your Claude Desktop configuration:
{ "mcpServers": { "filemaker": { "command": "node", "args": ["/path/to/MCP-Claude-FileMaker/server.js"], "env": { "FM_PROTOCOL": "https", "FM_API_VERSION": "v1", "FM_SSL_VERIFY": "false", "NODE_TLS_REJECT_UNAUTHORIZED": "0", "FM_SERVER_MYDB": "your-filemaker-server.com", "FM_DATABASE_MYDB": "YourDatabase", "FM_ACCOUNT_MYDB": "your_username", "FM_PASSWORD_MYDB": "your_password" } } } } -
Restart Claude Desktop
The server uses environment variables for configuration. You can configure multiple databases using a simple naming pattern.
FM_PROTOCOL=https # http or https
FM_API_VERSION=v1 # FileMaker Data API version
FM_SSL_VERIFY=false # Set to true for production
NODE_TLS_REJECT_UNAUTHORIZED=0 # Set to 1 for production
CACHE_TTL=840 # Data cache TTL in seconds (14 minutes)
SESSION_TTL=780 # Session cache TTL in seconds (13 minutes)For Username/Password Authentication:
FM_SERVER_IDENTIFIER=your-server.com
FM_DATABASE_IDENTIFIER=YourDatabase
FM_ACCOUNT_IDENTIFIER=username
FM_PASSWORD_IDENTIFIER=passwordFor API Key Authentication:
FM_SERVER_IDENTIFIER=your-server.com
FM_DATABASE_IDENTIFIER=YourDatabase
FM_API_KEY_IDENTIFIER=your-api-key# Production Database
FM_SERVER_PROD=prod.filemaker-server.com
FM_DATABASE_PROD=MainDatabase
FM_ACCOUNT_PROD=api_user
FM_PASSWORD_PROD=secure_password
# Development Database
FM_SERVER_DEV=dev.filemaker-server.com
FM_DATABASE_DEV=TestDatabase
FM_API_KEY_DEV=dev-api-key-12345
# Customer Database
FM_SERVER_CUSTOMERS=customers.filemaker-server.com
FM_DATABASE_CUSTOMERS=CustomerDB
FM_ACCOUNT_CUSTOMERS=readonly
FM_PASSWORD_CUSTOMERS=readonly_pass{
"mcpServers": {
"filemaker": {
"command": "node",
"args": ["/absolute/path/to/MCP-Claude-FileMaker/server.js"],
"env": {
"FM_PROTOCOL": "https",
"FM_API_VERSION": "v1",
"FM_SSL_VERIFY": "false",
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
"FM_SERVER_MAIN": "your-server.com",
"FM_DATABASE_MAIN": "YourDatabase",
"FM_ACCOUNT_MAIN": "your_username",
"FM_PASSWORD_MAIN": "your_password"
}
}
}
}{
"mcpServers": {
"filemaker": {
"command": "node",
"args": ["/absolute/path/to/MCP-Claude-FileMaker/server.js"],
"env": {
"FM_PROTOCOL": "https",
"FM_API_VERSION": "v1",
"FM_SSL_VERIFY": "false",
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
"FM_SERVER_PROD": "prod.your-server.com",
"FM_DATABASE_PROD": "Production",
"FM_ACCOUNT_PROD": "api_user",
"FM_PASSWORD_PROD": "prod_password",
"FM_SERVER_DEV": "dev.your-server.com",
"FM_DATABASE_DEV": "Development",
"FM_API_KEY_DEV": "dev-api-key-123"
}
}
}
}List all configured databases.
No parameters required
Test connection to a specific database.
database: Database identifier to test
Get database metadata (layouts/tables).
database: Database identifier
Get detailed metadata for a specific layout.
database: Database identifier
layout: Layout name
Query records with advanced filtering and sorting.
database: Database identifier
layout: Layout name
query: (optional) Array of find requests
sort: (optional) Sort array
limit: (optional) Max records to return
offset: (optional) Records to skip
Create a new record.
database: Database identifier
layout: Layout name
fieldData: Object with field names and values
Update an existing record.
database: Database identifier
layout: Layout name
recordId: FileMaker record ID
fieldData: Object with field names and new values
Delete a record.
database: Database identifier
layout: Layout name
recordId: FileMaker record ID
Execute a FileMaker script with comprehensive parameter support.
database: Database identifier
layout: Layout context (script execution environment)
script: Script name (exact name as appears in FileMaker)
parameter: (optional) Script parameter (string, JSON, or complex data)
Script Execution Features:
- Layout Context: Scripts run within specified layout for proper context
- Parameter Encoding: Automatic URL encoding of parameters with special characters
- Response Capture: Full script execution results and return values
- Error Handling: Comprehensive error reporting for script failures
- Timeout Management: Graceful handling of long-running scripts
Parameter Examples:
// Simple string parameter
{ "parameter": "weekly-report" }
// Date range parameter
{ "parameter": "2024-01-01,2024-12-31" }
// JSON parameter for complex data
{ "parameter": "{\"type\": \"export\", \"format\": \"csv\", \"fields\": [\"name\", \"email\"]}" }
// Multi-value parameter
{ "parameter": "department=sales®ion=west&quarter=Q4" }Discover and list all available scripts in a database.
database: Database identifier
Script Discovery Features:
- Complete enumeration: Lists all scripts accessible to the API account
- Cached results: Script lists cached for performance (14-minute TTL)
- Permission awareness: Only shows scripts the account can execute
- Metadata included: Script names and availability status
Example Response:
{
"response": {
"scripts": [
{
"name": "Daily Backup",
"isFolder": false
},
{
"name": "Reports",
"isFolder": true
},
{
"name": "Customer Export",
"isFolder": false
}
]
}
}Clear cached data.
type: Type of cache to clear ("data", "session", "all")
-
List Available Databases
"List all my FileMaker databases" -
Explore Database Structure
"Show me the layouts in my PROD database" "Get the field definitions for the Customers layout" -
Query Data
"Find all customers with status 'Active' in the PROD database" "Show me the last 10 orders from the Orders layout" -
Create Records
"Create a new customer record with name 'John Doe' and email 'john@example.com'" -
Run Scripts
"Run the 'Calculate Totals' script on the Orders layout" "Execute the backup script with parameter 'weekly'" "List all available scripts in my PROD database" "Run the monthly report script with parameter Q4-2024"
User: "What scripts are available in my production database?"
Claude: Uses fm_get_scripts to list all scripts
User: "Run the customer report script"
Claude: Uses fm_run_script with discovered script name
User: "Generate the end-of-month reports with parameter December-2024"
Claude:
1. Discovers available scripts using fm_get_scripts
2. Identifies "End of Month Report" script
3. Executes script with parameter "December-2024"
4. Reports execution status and results
User: "Run the data validation scripts for the customer database"
Claude:
1. Lists scripts in customer database
2. Identifies validation-related scripts
3. Executes multiple scripts in sequence
4. Provides comprehensive execution summary
User: "Perform database maintenance on the inventory system"
Claude:
1. Connects to inventory database
2. Runs "Daily Cleanup" script
3. Executes "Reindex Database" script
4. Runs "Generate Summary Reports" script
5. Provides maintenance completion status
# Simple parameter passing
"Run the backup script with parameter 'full-backup'"
# Date-based parameters
"Execute the sales report script with parameter '2024-12-01,2024-12-31'"
# JSON parameter passing
"Run the data import script with parameter '{"source": "csv", "validate": true}'"
# Multiple parameter scenarios
"Execute the user notification script with parameters for email alerts"
User: "Run the data synchronization script"
Claude:
- Executes fm_run_script
- Captures script return values
- Reports success/failure status
- Provides error details if script fails
- Suggests troubleshooting steps
// Complex find request
{
"query": [
{
"FirstName": "John",
"Status": "Active"
},
{
"LastName": "Smith",
"omit": "true"
}
],
"sort": [
{
"fieldName": "LastName",
"sortOrder": "ascend"
}
],
"limit": 50
}- Set
FM_SSL_VERIFY=true - Set
NODE_TLS_REJECT_UNAUTHORIZED=1 - Use strong passwords or API keys
- Limit database privileges for API accounts
- Use HTTPS for all connections
- Keep the MCP server updated
- Create dedicated API accounts with minimal required privileges
- Use API keys when possible (OttoFMS)
- Regularly rotate passwords and API keys
- Monitor access logs
# Build the image
docker build -t mcp-claude-filemaker .
# Run with environment file
docker run -d --env-file .env --name mcp-filemaker mcp-claude-filemaker
# Run with inline environment variables
docker run -d \
-e FM_PROTOCOL=https \
-e FM_SERVER_MAIN=your-server.com \
-e FM_DATABASE_MAIN=YourDB \
-e FM_ACCOUNT_MAIN=username \
-e FM_PASSWORD_MAIN=password \
--name mcp-filemaker \
mcp-claude-filemakerIncluded in the connectors/ directory is filemaker-connector-v2.1.0.dxt - a powerful FileMaker extension that provides enhanced integration capabilities with Claude and the MCP server. This drag-and-drop extension simplifies the process of connecting your FileMaker databases to Claude.
The FileMaker Connector is a pre-built extension (.dxt file) that:
- Provides a user-friendly interface for configuring database connections
- Automatically generates the necessary server configuration
- Includes connection testing and validation tools
- Streamlines the setup process for non-technical users
- Works alongside the MCP server to provide seamless Claude integration
- Open Claude Desktop on your computer
- Locate the connector file:
connectors/filemaker-connector-v2.1.0.dxt - Drag and drop the
.dxtfile directly onto the Claude Desktop application window - Follow the installation prompts that appear
- Claude Desktop will automatically integrate the FileMaker connector
After installation, the connector will be integrated into Claude Desktop and available through:
- Claude's interface for FileMaker database configuration
- Automatic detection when you mention FileMaker operations
- Enhanced FileMaker integration capabilities within Claude conversations
- Open the connector from the Extensions menu
- Fill in your server details:
- Server Address: Your FileMaker Server URL (e.g.,
your-server.com) - Database Name: The FileMaker database filename (without .fmp12)
- Username/Password: FileMaker account credentials with API access
- Protocol: Usually
httpsfor production servers - API Version: Typically
v1(FileMaker Data API version)
- Server Address: Your FileMaker Server URL (e.g.,
- Test the connection using the built-in connection tester
- Generate MCP configuration - the connector will create the proper environment variables
- Copy the generated configuration to use in your Claude Desktop setup
After configuring the connector, it will generate environment variables in this format:
FM_PROTOCOL=https
FM_API_VERSION=v1
FM_SSL_VERIFY=false
FM_SERVER_YOURDB=your-server.com
FM_DATABASE_YOURDB=YourDatabase
FM_ACCOUNT_YOURDB=your_username
FM_PASSWORD_YOURDB=your_passwordYou can then use these in your Claude Desktop configuration or .env file.
- Multiple Database Support: Configure connections to multiple FileMaker databases
- Credential Validation: Test credentials before saving configuration
- SSL Certificate Handling: Automatic handling of self-signed certificates
- Connection Status Monitoring: Real-time connection health checks
- Auto-Generate Environment Variables: Creates properly formatted
.envfiles - Claude Desktop Config: Generates ready-to-use Claude Desktop JSON configuration
- Export/Import Settings: Save and share configuration templates
- Backup Configuration: Keep copies of working configurations
- Script Discovery: Browse available FileMaker scripts
- Layout Inspection: View database schema and field definitions
- Permission Testing: Verify account privileges and access levels
- Performance Monitoring: Check response times and server performance
Connector Won't Install
- Ensure you're using Claude Desktop latest version
- Check that Claude Desktop has permission to install extensions
- Try restarting Claude Desktop and installing again
- Verify the
.dxtfile is not corrupted
Connection Test Fails
- Verify server URL is correct and accessible
- Check that FileMaker Server Data API is enabled
- Confirm username/password are correct and account is active
- Test network connectivity to the FileMaker Server
Configuration Not Working
- Double-check generated environment variables
- Ensure MCP server can access the same network as FileMaker Server
- Verify Claude Desktop is using the correct configuration file path
If you prefer not to use the connector extension, you can manually configure the MCP server by:
- Setting up environment variables as shown in the Configuration section above
- Testing connections using the MCP server's built-in connection tools
- Configuring Claude Desktop manually with your database details
The connector simply automates this process and provides a user-friendly interface for configuration management.
The MCP server implements a sophisticated dual-cache strategy optimized for FileMaker Data API characteristics:
// Data Cache Configuration
const dataCache = new NodeCache({
stdTTL: parseInt(process.env.CACHE_TTL) || 840, // 14 minutes
checkperiod: 120 // Check every 2 minutes
});
// Session Cache Configuration
const sessionCache = new NodeCache({
stdTTL: parseInt(process.env.SESSION_TTL) || 780, // 13 minutes
checkperiod: 60 // Check every minute
});// Data cache keys (hierarchical)
`metadata_${database}` // Database layouts and schemas
`layout_${database}_${layout}` // Specific layout metadata
`scripts_${database}` // Available scripts list
`find_${database}_${layout}_${hash}` // Query results with hash
// Session cache keys
`session_${database}` // Authentication tokens per database- Metadata requests: 95%+ cache hit rate after initial loading
- Authentication: Eliminates ~75% of authentication API calls
- Script discovery: Instant script listing after first query
- Response time improvement: 60-90% faster response on cached operations
async function authenticateFileMaker(dbConfig) {
const cacheKey = `session_${dbConfig.database}`;
const cachedSession = sessionCache.get(cacheKey);
if (cachedSession) {
return cachedSession; // Use cached token
}
// Create new session with FileMaker Data API
const response = await axios.post(`${baseURL}/sessions`, {}, {
auth: { username: dbConfig.username, password: dbConfig.password },
httpsAgent
});
const token = response.data.response.token;
sessionCache.set(cacheKey, token); // Cache for 13 minutes
return token;
}// Auto-retry mechanism for expired tokens
try {
const response = await axios({ method, url: endpoint, headers: { 'Authorization': `Bearer ${token}` } });
return response.data;
} catch (error) {
if (error.response?.status === 401) {
sessionCache.del(`session_${dbConfig.database}`); // Clear expired token
const newToken = await authenticateFileMaker(dbConfig); // Get fresh token
// Retry request with new token
const retryResponse = await axios({ method, url: endpoint, headers: { 'Authorization': `Bearer ${newToken}` } });
return retryResponse.data;
}
throw error;
}// FileMaker API Error Handling
switch (error.response?.status) {
case 401:
// Authentication failure - retry with fresh token
return await retryWithNewAuthentication();
case 404:
// Resource not found (layout, script, record)
throw new Error(`Resource not found: ${error.response.data?.messages?.[0]?.message}`);
case 500:
// FileMaker Server error
throw new Error(`FileMaker Server error: ${error.response.data?.messages?.[0]?.message}`);
case 503:
// Service unavailable
throw new Error(`FileMaker Server temporarily unavailable`);
default:
// Generic error handling
throw new Error(`Request failed: ${error.response?.data?.messages?.[0]?.message || error.message}`);
}- Cache failures: Fall back to direct API calls
- Network timeouts: Return helpful error messages with retry suggestions
- Partial failures: Continue processing other operations when possible
- Configuration errors: Provide specific guidance for fixing issues
// HTTPS Agent with connection reuse
const httpsAgent = new https.Agent({
rejectUnauthorized: process.env.FM_SSL_VERIFY === 'true',
keepAlive: true, // Reuse connections
keepAliveMsecs: 1000, // Keep alive for 1 second
maxSockets: 10, // Max concurrent connections per host
maxFreeSockets: 5 // Max free connections to keep open
});// Endpoint selection based on query complexity
let endpoint = `/layouts/${encodeURIComponent(layout)}/records`;
let method = 'GET';
let requestData = null;
if (query && query.length > 0) {
// Complex query - use POST to _find endpoint
endpoint = `/layouts/${encodeURIComponent(layout)}/_find`;
method = 'POST';
requestData = { query, sort, limit, offset };
} else {
// Simple query - use GET with URL parameters
const params = new URLSearchParams();
if (limit) params.append('_limit', limit.toString());
if (offset) params.append('_offset', offset.toString());
if (params.toString()) endpoint += `?${params.toString()}`;
}- JSON streaming: Efficient handling of large result sets
- Memory management: Automatic garbage collection of large responses
- Compression: GZIP support for large data transfers
- Pagination: Smart handling of large record sets
// Environment variable isolation
const dbConfig = {
server: process.env[`FM_SERVER_${identifier}`],
database: process.env[`FM_DATABASE_${identifier}`],
username: process.env[`FM_ACCOUNT_${identifier}`] || '',
password: process.env[`FM_PASSWORD_${identifier}`] || '',
apiKey: process.env[`FM_API_KEY_${identifier}`]
};
// Never log sensitive information
console.error(`Connecting to database: ${dbConfig.database} at ${dbConfig.server}`);
// Credentials are never logged or exposed// Flexible SSL handling for different environments
const httpsAgent = new https.Agent({
rejectUnauthorized: process.env.FM_SSL_VERIFY === 'true' &&
process.env.NODE_TLS_REJECT_UNAUTHORIZED === '1',
secureProtocol: 'TLSv1_2_method', // Force TLS 1.2+
honorCipherOrder: true, // Use server cipher preference
ciphers: 'ECDHE+AESGCM:ECDHE+AES256:ECDHE+AES128:!aNULL:!MD5:!DSS' // Strong ciphers only
});// Dynamic database configuration discovery
const databases = {};
const envKeys = Object.keys(process.env);
const serverKeys = envKeys.filter(key => key.startsWith('FM_SERVER_'));
for (const serverKey of serverKeys) {
const identifier = serverKey.replace('FM_SERVER_', '');
const config = {
server: process.env[serverKey],
database: process.env[`FM_DATABASE_${identifier}`],
username: process.env[`FM_ACCOUNT_${identifier}`],
password: process.env[`FM_PASSWORD_${identifier}`],
apiKey: process.env[`FM_API_KEY_${identifier}`]
};
// Validate configuration completeness
if (config.server && config.database &&
((config.username && config.password) || config.apiKey)) {
databases[identifier] = config;
}
}- Parallel processing: Multiple database operations execute concurrently
- Connection isolation: Each database maintains separate connection state
- Cache separation: Database-specific cache namespacing
- Error isolation: Failures in one database don't affect others
// Robust parameter handling for FileMaker scripts
let endpoint = `/layouts/${encodeURIComponent(layout)}/script/${encodeURIComponent(scriptName)}`;
if (parameter) {
// Handle complex parameters (JSON, special characters, etc.)
const encodedParam = encodeURIComponent(parameter);
endpoint += `?script.param=${encodedParam}`;
}// Comprehensive script response handling
const result = await makeFileMakerRequest(dbConfig, 'GET', endpoint);
return {
content: [{
type: 'text',
text: JSON.stringify({
scriptResult: result.response?.scriptResult || null,
scriptError: result.response?.scriptError || '0',
success: result.response?.scriptError === '0',
messages: result.messages || [],
timestamp: new Date().toISOString()
}, null, 2)
}]
};// Built-in performance monitoring
const performanceMetrics = {
cacheHitRate: dataCache.getStats(),
sessionCacheHitRate: sessionCache.getStats(),
activeConnections: databases.length,
requestCount: requestCounter,
averageResponseTime: responseTimeTracker.getAverage()
};# Docker health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "console.log('Health check passed')" || exit 1# Install dependencies
npm install
# Build TypeScript (if using src/)
npm run build
# Start development server
npm run dev
# Run tests
npm testMCP-Claude-FileMaker/
βββ server.js # Main server file (production ready)
βββ src/ # TypeScript source files
β βββ index.ts # TypeScript entry point
β βββ filemaker-client.ts # FileMaker client class
βββ connectors/ # FileMaker extensions
β βββ filemaker-connector-v2.1.0.dxt
βββ package.json # Node.js package configuration
βββ tsconfig.json # TypeScript configuration
βββ Dockerfile # Docker container definition
βββ .env.example # Environment configuration template
βββ README.md # This file
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Clone your fork
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Connection Failed
- Verify FileMaker Server Data API is enabled
- Check server URL and credentials
- Ensure firewall allows connections on port 443/80
- Verify SSL certificate settings
Authentication Errors
- Check username/password or API key
- Verify account privileges in FileMaker
- Ensure account is not disabled
No Databases Found
- Check environment variable naming pattern
- Verify all required variables are set
- Check for typos in variable names
Cache Issues
- Use
fm_clear_cacheto clear cached data - Restart the server for persistent issues
Set environment variable DEBUG=1 for verbose logging:
DEBUG=1 node server.jsScript Not Found
- Use
fm_get_scriptsto list available scripts - Check script name spelling and case sensitivity
- Verify account has permission to access the script
- Ensure script is not in a folder (use full path if needed)
Script Execution Fails
- Check FileMaker script for errors using FileMaker Pro
- Verify script parameters are correctly formatted
- Ensure the layout context is appropriate for the script
- Check script privileges and account permissions
Script Timeout
- Long-running scripts may timeout at the server level
- Consider breaking complex scripts into smaller operations
- Use FileMaker Server timeout settings for script execution
- Implement progress reporting within scripts
Parameter Handling Issues
- Ensure parameters are properly URL encoded
- Use JSON format for complex parameter structures
- Verify parameter parsing within the FileMaker script
- Test parameters directly in FileMaker Pro first
Script Permission Errors
- Verify account has "Execute scripts" privilege
- Check extended privileges include
fmrestfor Data API access - Ensure scripts are not set to "no access" for the account
- Confirm script-level security settings in FileMaker
For support and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review FileMaker Data API documentation
- Test script execution directly in FileMaker Pro for debugging
Made with β€οΈ for the FileMaker and Claude communities