Skip to content

Commit 7e4aa05

Browse files
committed
Add comprehensive error handling, authentication improvements, and test scripts
1 parent 537ef66 commit 7e4aa05

18 files changed

Lines changed: 3215 additions & 4 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
.npmrc

PUBLISH.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Publishing FileMaker MCP Server to npm
2+
3+
## Prerequisites
4+
5+
1. **npm account**: Make sure you have an npm account
6+
2. **Login to npm**: Run `npm login` in your terminal
7+
3. **Unique package name**: The package name should be unique on npm
8+
9+
## Publishing Steps
10+
11+
### 1. Update package.json (if needed)
12+
```bash
13+
# Update the package name if needed (make sure it's unique)
14+
npm pkg set name="filemaker-mcp-server"
15+
16+
# Update author information
17+
npm pkg set author.name="Max Petrusenko"
18+
npm pkg set author.email="max.petrusenko@gmail.com"
19+
```
20+
21+
### 2. Build and Test
22+
```bash
23+
npm run build
24+
npm test
25+
```
26+
27+
### 3. Publish
28+
```bash
29+
npm publish
30+
```
31+
32+
### 4. Verify Publication
33+
```bash
34+
npm view filemaker-mcp-server
35+
```
36+
37+
## Alternative: Publish as Scoped Package
38+
39+
If the package name is taken, you can publish under your npm scope:
40+
41+
```bash
42+
# Update package name to include your scope
43+
npm pkg set name="@amxpetrusenko/filemaker-mcp-server"
44+
45+
# Publish
46+
npm publish --access public
47+
```
48+
49+
## After Publishing
50+
51+
Users can then install and use your package:
52+
53+
```bash
54+
npm install -g @maxpetrusenko/filemaker-mcp-server
55+
filemaker-mcp-server --help
56+
```
57+
58+
## Updating the Package
59+
60+
For future updates:
61+
62+
1. Update version in package.json
63+
2. Build and test
64+
3. Publish: `npm publish`
65+
66+
```bash
67+
npm version patch # or minor/major
68+
npm publish
69+
```

QUICKSTART.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# FileMaker MCP Server - Quick Start Guide
2+
3+
Get up and running with the FileMaker MCP server in minutes!
4+
5+
## 🚀 Quick Installation
6+
7+
```bash
8+
# Install globally
9+
npm install -g filemaker-mcp-server
10+
11+
# Or run directly with npx
12+
npx filemaker-mcp-server
13+
```
14+
15+
## ⚙️ Configuration
16+
17+
### Option 1: Environment Variables (Recommended)
18+
```bash
19+
export FILEMAKER_HOST="https://your-filemaker-server.com"
20+
export FILEMAKER_DATABASE="YourDatabase"
21+
export FILEMAKER_USERNAME="your-username"
22+
export FILEMAKER_PASSWORD="your-password"
23+
export FILEMAKER_GIT_REPO_PATH="/path/to/your/git/repo" # Optional
24+
```
25+
26+
### Option 2: Command Line Arguments
27+
```bash
28+
filemaker-mcp-server \
29+
--host "https://your-filemaker-server.com" \
30+
--database "YourDatabase" \
31+
--username "your-username" \
32+
--password "your-password" \
33+
--git-repo-path "/path/to/your/git/repo"
34+
```
35+
36+
## 🔧 Claude Integration
37+
38+
Add this to your Claude configuration:
39+
40+
```json
41+
{
42+
"mcpServers": {
43+
"filemaker": {
44+
"command": "npx",
45+
"args": ["filemaker-mcp-server"],
46+
"env": {
47+
"FILEMAKER_HOST": "https://your-filemaker-server.com",
48+
"FILEMAKER_DATABASE": "YourDatabase",
49+
"FILEMAKER_USERNAME": "your-username",
50+
"FILEMAKER_PASSWORD": "your-password",
51+
"FILEMAKER_GIT_REPO_PATH": "/path/to/your/git/repo"
52+
}
53+
}
54+
}
55+
}
56+
```
57+
58+
## 🎯 Quick Examples
59+
60+
### Basic Operations
61+
```
62+
"Find all contacts named John"
63+
"Create a new contact with name Jane Smith and email jane@example.com"
64+
"Update contact ID 123 with new phone number 555-9876"
65+
"Delete contact ID 456"
66+
```
67+
68+
### Git Integration
69+
```
70+
"Export the Contacts layout to Git"
71+
"Commit all changes with message 'Update contact management'"
72+
"Push changes to the main branch"
73+
"Show me the Git status"
74+
```
75+
76+
### Debugging
77+
```
78+
"Analyze this script for debugging issues: [paste script content]"
79+
"Suggest fixes for error 'Field not found: Email'"
80+
"Optimize this script for performance: [paste script content]"
81+
"Validate the Contacts layout structure"
82+
```
83+
84+
### Advanced Operations
85+
```
86+
"Import 1000 contacts from this CSV file"
87+
"Export all contacts to JSON format"
88+
"Sync data between Contacts and ContactsBackup layouts"
89+
"Monitor API performance for the last 5 minutes"
90+
```
91+
92+
## 🧪 Testing
93+
94+
Run the demo to see all features in action:
95+
96+
```bash
97+
# Set up environment variables first
98+
export FILEMAKER_HOST="https://your-filemaker-server.com"
99+
export FILEMAKER_DATABASE="YourDatabase"
100+
export FILEMAKER_USERNAME="your-username"
101+
export FILEMAKER_PASSWORD="your-password"
102+
103+
# Run the demo
104+
node examples/demo.js
105+
```
106+
107+
## 📋 Prerequisites
108+
109+
1. **FileMaker Server** with Data API enabled
110+
2. **Node.js** 18+ installed
111+
3. **Git** (optional, for version control features)
112+
4. **Valid FileMaker credentials** with appropriate permissions
113+
114+
## 🔍 Troubleshooting
115+
116+
### Common Issues
117+
118+
1. **Authentication Failed**
119+
- Verify FileMaker Server credentials
120+
- Check network connectivity
121+
- Ensure Data API is enabled on FileMaker Server
122+
123+
2. **Connection Timeout**
124+
- Verify FileMaker Server URL is correct
125+
- Check firewall settings
126+
- Ensure FileMaker Server is running
127+
128+
3. **Permission Denied**
129+
- Verify user has appropriate FileMaker permissions
130+
- Check layout access rights
131+
- Ensure script execution permissions
132+
133+
### Getting Help
134+
135+
- Check the full [README.md](README.md) for detailed documentation
136+
- Review the [examples](examples/) directory for usage patterns
137+
- Run `npm test` to verify your installation
138+
139+
## 🎉 What's Next?
140+
141+
Once you're up and running:
142+
143+
1. **Explore the features**: Try different operations and see what's possible
144+
2. **Set up Git integration**: Enable version control for your FileMaker components
145+
3. **Use debugging tools**: Analyze and optimize your FileMaker scripts
146+
4. **Scale up**: Use batch operations and performance monitoring for large datasets
147+
148+
Happy FileMaking! 🚀

README.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ A Model Context Protocol (MCP) server for FileMaker integration, enabling AI ass
2525
- **Complexity Analysis**: Assess script complexity and risk levels
2626
- **Performance Analysis**: Identify performance bottlenecks and optimization opportunities
2727

28+
### 🆕 API Enhancement & Scalability (v2.2)
29+
- **Batch Operations**: Process multiple records in batches to overcome 50-record limits
30+
- **Paginated Queries**: Retrieve large datasets efficiently with pagination
31+
- **Bulk Import/Export**: Import and export large datasets with field mapping
32+
- **Data Synchronization**: Sync data between layouts with conflict resolution
33+
- **Performance Monitoring**: Monitor API performance and identify bottlenecks
34+
- **Cache Management**: In-memory caching for improved response times
35+
- **Rate Limit Handling**: Intelligent rate limiting to prevent API throttling
36+
2837
## Installation
2938

3039
```bash
@@ -182,6 +191,117 @@ filemaker-mcp-server \
182191
}
183192
```
184193

194+
### 🆕 API Enhancement & Scalability Operations
195+
196+
#### Batch Operations
197+
```json
198+
{
199+
"name": "fm_api_batch_operations",
200+
"arguments": {
201+
"operation": "create",
202+
"records": [
203+
{ "layout": "Contacts", "fieldData": { "Name": "John Doe", "Email": "john@example.com" } },
204+
{ "layout": "Contacts", "fieldData": { "Name": "Jane Smith", "Email": "jane@example.com" } }
205+
],
206+
"batchSize": 50
207+
}
208+
}
209+
```
210+
211+
#### Paginated Query
212+
```json
213+
{
214+
"name": "fm_api_paginated_query",
215+
"arguments": {
216+
"query": { "layout": "Contacts", "filters": {} },
217+
"pageSize": 100,
218+
"maxPages": 10,
219+
"sortField": "_modificationTimestamp",
220+
"sortOrder": "desc"
221+
}
222+
}
223+
```
224+
225+
#### Bulk Import
226+
```json
227+
{
228+
"name": "fm_api_bulk_import",
229+
"arguments": {
230+
"data": [
231+
{ "Name": "John Doe", "Email": "john@example.com" },
232+
{ "Name": "Jane Smith", "Email": "jane@example.com" }
233+
],
234+
"layout": "Contacts",
235+
"importMode": "create",
236+
"fieldMapping": { "Name": "FullName", "Email": "EmailAddress" },
237+
"conflictResolution": "skip"
238+
}
239+
}
240+
```
241+
242+
#### Bulk Export
243+
```json
244+
{
245+
"name": "fm_api_bulk_export",
246+
"arguments": {
247+
"layout": "Contacts",
248+
"format": "json",
249+
"fields": ["Name", "Email", "Phone"],
250+
"includeMetadata": true
251+
}
252+
}
253+
```
254+
255+
#### Data Synchronization
256+
```json
257+
{
258+
"name": "fm_api_data_sync",
259+
"arguments": {
260+
"sourceLayout": "Contacts",
261+
"targetLayout": "ContactsBackup",
262+
"keyField": "Email",
263+
"syncMode": "incremental",
264+
"lastSyncTime": "2024-01-01T00:00:00Z"
265+
}
266+
}
267+
```
268+
269+
#### Performance Monitoring
270+
```json
271+
{
272+
"name": "fm_api_performance_monitor",
273+
"arguments": {
274+
"operation": "query_performance",
275+
"duration": 5000
276+
}
277+
}
278+
```
279+
280+
#### Cache Management
281+
```json
282+
{
283+
"name": "fm_api_cache_management",
284+
"arguments": {
285+
"action": "set",
286+
"key": "contacts_layout_metadata",
287+
"data": { "fields": ["Name", "Email", "Phone"] },
288+
"ttl": 3600
289+
}
290+
}
291+
```
292+
293+
#### Rate Limit Handling
294+
```json
295+
{
296+
"name": "fm_api_rate_limit_handler",
297+
"arguments": {
298+
"operation": "find_records",
299+
"requests": 10,
300+
"timeWindow": 60000
301+
}
302+
}
303+
```
304+
185305
### 🆕 Intelligent Debugging Operations
186306

187307
#### Analyze Script for Debugging Issues
@@ -432,6 +552,18 @@ MIT License - see LICENSE file for details.
432552

433553
## Version History
434554

555+
### v2.2.0
556+
- 🆕 Added API Enhancement & Scalability features
557+
- 🆕 Batch operations to overcome 50-record API limitations
558+
- 🆕 Paginated queries for large dataset retrieval
559+
- 🆕 Bulk import/export with field mapping and conflict resolution
560+
- 🆕 Data synchronization between layouts
561+
- 🆕 Performance monitoring and bottleneck identification
562+
- 🆕 In-memory cache management for improved response times
563+
- 🆕 Intelligent rate limiting to prevent API throttling
564+
- 🔧 Enhanced error handling and batch processing
565+
- 📚 Updated documentation with comprehensive API examples
566+
435567
### v2.1.0
436568
- 🆕 Added Intelligent Debugging features
437569
- 🆕 Script analysis for debugging issues and performance bottlenecks

0 commit comments

Comments
 (0)