@rashidazarang/airtable-mcp 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/airtable_simple_production.js +387 -5
- package/examples/claude_simple_config.json +0 -9
- package/package.json +10 -1
- package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -173
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/custom.md +0 -10
- package/.github/ISSUE_TEMPLATE/feature-request.yml +0 -209
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/ISSUE_TEMPLATE/security-report.yml +0 -216
- package/.github/pull_request_template.md +0 -245
- package/.github/workflows/ci-cd.yml +0 -408
- package/.github/workflows/security-audit.yml +0 -316
- package/API_DOCUMENTATION.md +0 -897
- package/CAPABILITY_REPORT.md +0 -118
- package/CLAUDE_INTEGRATION.md +0 -96
- package/CODE_OF_CONDUCT.md +0 -181
- package/CONTRIBUTING.md +0 -81
- package/DEVELOPMENT.md +0 -190
- package/Dockerfile +0 -39
- package/Dockerfile.node +0 -20
- package/Dockerfile.production +0 -127
- package/IMPROVEMENT_PROPOSAL.md +0 -371
- package/INSTALLATION.md +0 -183
- package/ISSUE_RESPONSES.md +0 -171
- package/MCP_REVIEW_SUMMARY.md +0 -142
- package/QUICK_START.md +0 -60
- package/RELEASE_NOTES_v1.2.0.md +0 -50
- package/RELEASE_NOTES_v1.2.1.md +0 -40
- package/RELEASE_NOTES_v1.2.2.md +0 -48
- package/RELEASE_NOTES_v1.2.3.md +0 -105
- package/RELEASE_NOTES_v1.2.4.md +0 -60
- package/RELEASE_NOTES_v1.4.0.md +0 -104
- package/RELEASE_NOTES_v1.5.0.md +0 -185
- package/RELEASE_NOTES_v1.6.0.md +0 -248
- package/SECURITY_NOTICE.md +0 -40
- package/airtable-clipper/CHANGELOG.md +0 -198
- package/airtable-clipper/CHROME_STORE_SUBMISSION.md +0 -343
- package/airtable-clipper/LAUNCH_STRATEGY.md +0 -495
- package/airtable-clipper/LICENSE +0 -21
- package/airtable-clipper/OAUTH_SETUP.md +0 -51
- package/airtable-clipper/PRIVACY_POLICY.md +0 -187
- package/airtable-clipper/README.md +0 -575
- package/airtable-clipper/SUBMIT_TO_CHROME_STORE.md +0 -273
- package/airtable-clipper/build.sh +0 -85
- package/airtable-clipper/docs/QUICK_START.md +0 -99
- package/airtable-clipper/docs/SETUP.md +0 -291
- package/airtable-clipper/extension/background.js +0 -337
- package/airtable-clipper/extension/base-setup.html +0 -324
- package/airtable-clipper/extension/base-setup.js +0 -471
- package/airtable-clipper/extension/content.js +0 -771
- package/airtable-clipper/extension/icons/README.md +0 -69
- package/airtable-clipper/extension/icons/icon-16.png +0 -3
- package/airtable-clipper/extension/manifest.json +0 -73
- package/airtable-clipper/extension/popup.html +0 -144
- package/airtable-clipper/extension/popup.js +0 -475
- package/airtable-clipper/extension/styles/content.css +0 -229
- package/airtable-clipper/extension/styles/popup.css +0 -477
- package/airtable-clipper/privacy-policy.md +0 -63
- package/airtable-clipper/releases/v1.0.0/background.js +0 -337
- package/airtable-clipper/releases/v1.0.0/base-setup.html +0 -324
- package/airtable-clipper/releases/v1.0.0/base-setup.js +0 -471
- package/airtable-clipper/releases/v1.0.0/content.js +0 -771
- package/airtable-clipper/releases/v1.0.0/icons/README.md +0 -69
- package/airtable-clipper/releases/v1.0.0/icons/icon-128.png +0 -2
- package/airtable-clipper/releases/v1.0.0/icons/icon-16.png +0 -3
- package/airtable-clipper/releases/v1.0.0/icons/icon-32.png +0 -2
- package/airtable-clipper/releases/v1.0.0/icons/icon-48.png +0 -2
- package/airtable-clipper/releases/v1.0.0/manifest.json +0 -73
- package/airtable-clipper/releases/v1.0.0/popup.html +0 -144
- package/airtable-clipper/releases/v1.0.0/popup.js +0 -475
- package/airtable-clipper/releases/v1.0.0/sidepanel.html +0 -25
- package/airtable-clipper/releases/v1.0.0/styles/content.css +0 -229
- package/airtable-clipper/releases/v1.0.0/styles/popup.css +0 -477
- package/airtable-clipper/releases/v1.0.1/background.js +0 -337
- package/airtable-clipper/releases/v1.0.1/base-setup.html +0 -324
- package/airtable-clipper/releases/v1.0.1/base-setup.js +0 -471
- package/airtable-clipper/releases/v1.0.1/content.js +0 -771
- package/airtable-clipper/releases/v1.0.1/icons/README.md +0 -69
- package/airtable-clipper/releases/v1.0.1/icons/icon-128.png +0 -2
- package/airtable-clipper/releases/v1.0.1/icons/icon-16.png +0 -3
- package/airtable-clipper/releases/v1.0.1/icons/icon-32.png +0 -2
- package/airtable-clipper/releases/v1.0.1/icons/icon-48.png +0 -2
- package/airtable-clipper/releases/v1.0.1/manifest.json +0 -70
- package/airtable-clipper/releases/v1.0.1/popup.html +0 -157
- package/airtable-clipper/releases/v1.0.1/popup.js +0 -562
- package/airtable-clipper/releases/v1.0.1/sidepanel.html +0 -25
- package/airtable-clipper/releases/v1.0.1/styles/content.css +0 -229
- package/airtable-clipper/releases/v1.0.1/styles/popup.css +0 -647
- package/airtable-clipper/releases/v1.0.2/background.js +0 -337
- package/airtable-clipper/releases/v1.0.2/base-setup.html +0 -324
- package/airtable-clipper/releases/v1.0.2/base-setup.js +0 -471
- package/airtable-clipper/releases/v1.0.2/content.js +0 -771
- package/airtable-clipper/releases/v1.0.2/icons/README.md +0 -69
- package/airtable-clipper/releases/v1.0.2/icons/icon-128.png +0 -2
- package/airtable-clipper/releases/v1.0.2/icons/icon-16.png +0 -3
- package/airtable-clipper/releases/v1.0.2/icons/icon-32.png +0 -2
- package/airtable-clipper/releases/v1.0.2/icons/icon-48.png +0 -2
- package/airtable-clipper/releases/v1.0.2/manifest.json +0 -62
- package/airtable-clipper/releases/v1.0.2/popup.html +0 -157
- package/airtable-clipper/releases/v1.0.2/popup.js +0 -567
- package/airtable-clipper/releases/v1.0.2/sidepanel.html +0 -25
- package/airtable-clipper/releases/v1.0.2/styles/content.css +0 -229
- package/airtable-clipper/releases/v1.0.2/styles/popup.css +0 -647
- package/airtable-clipper/terms-of-service.md +0 -124
- package/airtable-clipper/test-credentials.md +0 -61
- package/airtable-clipper/test-extension/background.js +0 -337
- package/airtable-clipper/test-extension/base-setup.html +0 -324
- package/airtable-clipper/test-extension/base-setup.js +0 -471
- package/airtable-clipper/test-extension/content.js +0 -873
- package/airtable-clipper/test-extension/icons/README.md +0 -69
- package/airtable-clipper/test-extension/icons/icon-128.png +0 -2
- package/airtable-clipper/test-extension/icons/icon-16.png +0 -3
- package/airtable-clipper/test-extension/icons/icon-32.png +0 -2
- package/airtable-clipper/test-extension/icons/icon-48.png +0 -2
- package/airtable-clipper/test-extension/manifest.json +0 -72
- package/airtable-clipper/test-extension/popup.html +0 -274
- package/airtable-clipper/test-extension/popup.js +0 -729
- package/airtable-clipper/test-extension/sidepanel.html +0 -25
- package/airtable-clipper/test-extension/styles/content.css +0 -229
- package/airtable-clipper/test-extension/styles/popup.css +0 -794
- package/airtable_mcp/__init__.py +0 -5
- package/airtable_mcp/src/server.py +0 -329
- package/airtable_mcp_v2.js +0 -1505
- package/airtable_mcp_v2_oauth.js +0 -1048
- package/airtable_mcp_v3_advanced.js +0 -1161
- package/cleanup.sh +0 -71
- package/docker-compose.production.yml +0 -366
- package/helm/airtable-mcp/Chart.yaml +0 -122
- package/helm/airtable-mcp/values.yaml +0 -538
- package/index.js +0 -179
- package/inspector.py +0 -148
- package/inspector_server.py +0 -337
- package/k8s/deployment.yaml +0 -402
- package/k8s/namespace.yaml +0 -108
- package/k8s/service.yaml +0 -194
- package/monitoring/alerts.yml +0 -289
- package/monitoring/prometheus.yml +0 -224
- package/publish-steps.txt +0 -27
- package/quick_test.sh +0 -30
- package/requirements.txt +0 -10
- package/setup.py +0 -29
- package/simple_airtable_server.py +0 -151
- package/smithery.yaml +0 -45
- package/test_all_features.sh +0 -146
- package/test_all_operations.sh +0 -120
- package/test_client.py +0 -70
- package/test_enhanced_features.js +0 -389
- package/test_mcp_comprehensive.js +0 -163
- package/test_mock_server.js +0 -180
- package/test_v1.4.0_final.sh +0 -131
- package/test_v1.5.0_comprehensive.sh +0 -96
- package/test_v1.5.0_final.sh +0 -224
- package/test_v1.6.0_comprehensive.sh +0 -187
- package/test_webhooks.sh +0 -105
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# COMPREHENSIVE TEST SUITE - Airtable MCP Server v1.6.0
|
|
4
|
-
# Testing ALL 33 tools including 10 new v1.6.0 features
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
SERVER_URL="http://localhost:8010/mcp"
|
|
8
|
-
PASSED=0
|
|
9
|
-
FAILED=0
|
|
10
|
-
BATCH_RECORD_IDS=()
|
|
11
|
-
|
|
12
|
-
echo "🚀 COMPREHENSIVE TEST SUITE - v1.6.0"
|
|
13
|
-
echo "===================================="
|
|
14
|
-
echo "Testing ALL 33 tools with real API calls"
|
|
15
|
-
echo "New in v1.6.0: Batch operations, attachments, advanced views, base management"
|
|
16
|
-
echo ""
|
|
17
|
-
|
|
18
|
-
# Function to make MCP calls
|
|
19
|
-
call_tool() {
|
|
20
|
-
local tool_name="$1"
|
|
21
|
-
local params="$2"
|
|
22
|
-
curl -s -X POST "$SERVER_URL" \
|
|
23
|
-
-H "Content-Type: application/json" \
|
|
24
|
-
-d "{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"tools/call\", \"params\": {\"name\": \"$tool_name\", \"arguments\": $params}}"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
# Enhanced test function
|
|
28
|
-
test_tool() {
|
|
29
|
-
local tool_name="$1"
|
|
30
|
-
local params="$2"
|
|
31
|
-
local description="$3"
|
|
32
|
-
local expect_fail="$4"
|
|
33
|
-
|
|
34
|
-
echo -n "🔧 $tool_name: $description... "
|
|
35
|
-
|
|
36
|
-
if result=$(call_tool "$tool_name" "$params" 2>&1); then
|
|
37
|
-
if echo "$result" | jq -e '.result.content[0].text' > /dev/null 2>&1; then
|
|
38
|
-
response_text=$(echo "$result" | jq -r '.result.content[0].text')
|
|
39
|
-
if [[ "$expect_fail" == "true" ]]; then
|
|
40
|
-
if echo "$response_text" | grep -q "error\|Error\|not found\|Unknown field"; then
|
|
41
|
-
echo "✅ PASS (Expected failure)"
|
|
42
|
-
((PASSED++))
|
|
43
|
-
else
|
|
44
|
-
echo "❌ FAIL (Should have failed)"
|
|
45
|
-
((FAILED++))
|
|
46
|
-
fi
|
|
47
|
-
else
|
|
48
|
-
echo "✅ PASS"
|
|
49
|
-
((PASSED++))
|
|
50
|
-
# Store batch record IDs for cleanup
|
|
51
|
-
if [[ "$tool_name" == "batch_create_records" ]]; then
|
|
52
|
-
while IFS= read -r line; do
|
|
53
|
-
if [[ $line =~ ID:\ (rec[a-zA-Z0-9]+) ]]; then
|
|
54
|
-
BATCH_RECORD_IDS+=(${BASH_REMATCH[1]})
|
|
55
|
-
fi
|
|
56
|
-
done <<< "$response_text"
|
|
57
|
-
fi
|
|
58
|
-
fi
|
|
59
|
-
else
|
|
60
|
-
if echo "$result" | jq -e '.error' > /dev/null 2>&1; then
|
|
61
|
-
error_msg=$(echo "$result" | jq -r '.error.message')
|
|
62
|
-
if [[ "$expect_fail" == "true" ]]; then
|
|
63
|
-
echo "✅ PASS (Expected error: $error_msg)"
|
|
64
|
-
((PASSED++))
|
|
65
|
-
else
|
|
66
|
-
echo "❌ FAIL (API Error: $error_msg)"
|
|
67
|
-
((FAILED++))
|
|
68
|
-
fi
|
|
69
|
-
else
|
|
70
|
-
echo "❌ FAIL (Invalid response)"
|
|
71
|
-
((FAILED++))
|
|
72
|
-
fi
|
|
73
|
-
fi
|
|
74
|
-
else
|
|
75
|
-
echo "❌ FAIL (Request failed)"
|
|
76
|
-
((FAILED++))
|
|
77
|
-
fi
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
echo "📊 PHASE 1: Original Data Operations (7 tools)"
|
|
81
|
-
echo "=============================================="
|
|
82
|
-
|
|
83
|
-
test_tool "list_tables" "{}" "List all tables"
|
|
84
|
-
test_tool "list_records" "{\"table\": \"Test Table CRUD\", \"maxRecords\": 2}" "List limited records"
|
|
85
|
-
test_tool "search_records" "{\"table\": \"Test Table CRUD\", \"searchTerm\": \"test\"}" "Search records"
|
|
86
|
-
|
|
87
|
-
echo ""
|
|
88
|
-
echo "🪝 PHASE 2: Webhook Management (5 tools)"
|
|
89
|
-
echo "========================================"
|
|
90
|
-
|
|
91
|
-
test_tool "list_webhooks" "{}" "List existing webhooks"
|
|
92
|
-
|
|
93
|
-
echo ""
|
|
94
|
-
echo "🏗️ PHASE 3: Schema Management (11 tools)"
|
|
95
|
-
echo "========================================"
|
|
96
|
-
|
|
97
|
-
test_tool "list_bases" "{}" "List accessible bases"
|
|
98
|
-
test_tool "get_base_schema" "{}" "Get complete base schema"
|
|
99
|
-
test_tool "describe_table" "{\"table\": \"Test Table CRUD\"}" "Describe table details"
|
|
100
|
-
test_tool "list_field_types" "{}" "List field types reference"
|
|
101
|
-
test_tool "get_table_views" "{\"table\": \"Test Table CRUD\"}" "Get table views"
|
|
102
|
-
|
|
103
|
-
echo ""
|
|
104
|
-
echo "🚀 PHASE 4: NEW v1.6.0 Batch Operations (4 tools)"
|
|
105
|
-
echo "================================================="
|
|
106
|
-
|
|
107
|
-
test_tool "batch_create_records" "{\"table\": \"Test Table CRUD\", \"records\": [{\"fields\": {\"Name\": \"Batch Test A\", \"Description\": \"Batch created\", \"Status\": \"Testing\"}}, {\"fields\": {\"Name\": \"Batch Test B\", \"Description\": \"Also batch created\", \"Status\": \"Testing\"}}]}" "Create multiple records at once"
|
|
108
|
-
|
|
109
|
-
# Test batch operations with the created records
|
|
110
|
-
if [ ${#BATCH_RECORD_IDS[@]} -ge 2 ]; then
|
|
111
|
-
test_tool "batch_update_records" "{\"table\": \"Test Table CRUD\", \"records\": [{\"id\": \"${BATCH_RECORD_IDS[0]}\", \"fields\": {\"Status\": \"Updated\"}}, {\"id\": \"${BATCH_RECORD_IDS[1]}\", \"fields\": {\"Status\": \"Updated\"}}]}" "Update multiple records at once"
|
|
112
|
-
test_tool "batch_delete_records" "{\"table\": \"Test Table CRUD\", \"recordIds\": [\"${BATCH_RECORD_IDS[0]}\", \"${BATCH_RECORD_IDS[1]}\"]}" "Delete multiple records at once"
|
|
113
|
-
else
|
|
114
|
-
echo "⚠️ Skipping batch update/delete tests (no record IDs)"
|
|
115
|
-
((FAILED += 2))
|
|
116
|
-
fi
|
|
117
|
-
|
|
118
|
-
# Test batch limits
|
|
119
|
-
test_tool "batch_create_records" "{\"table\": \"Test Table CRUD\", \"records\": []}" "Test with empty records array" "true"
|
|
120
|
-
|
|
121
|
-
echo ""
|
|
122
|
-
echo "📎 PHASE 5: NEW v1.6.0 Attachment Operations (1 tool)"
|
|
123
|
-
echo "===================================================="
|
|
124
|
-
|
|
125
|
-
# Test attachment with non-existent field (expected to fail)
|
|
126
|
-
test_tool "upload_attachment" "{\"table\": \"Test Table CRUD\", \"recordId\": \"recDummyID\", \"fieldName\": \"NonExistentField\", \"url\": \"https://via.placeholder.com/150.png\"}" "Test attachment to non-existent field" "true"
|
|
127
|
-
|
|
128
|
-
echo ""
|
|
129
|
-
echo "👁️ PHASE 6: NEW v1.6.0 Advanced Views (2 tools)"
|
|
130
|
-
echo "==============================================="
|
|
131
|
-
|
|
132
|
-
# Test view operations (some may fail if permissions don't allow)
|
|
133
|
-
test_tool "get_view_metadata" "{\"table\": \"Test Table CRUD\", \"viewId\": \"viw123InvalidID\"}" "Test view metadata with invalid ID" "true"
|
|
134
|
-
|
|
135
|
-
echo ""
|
|
136
|
-
echo "🏢 PHASE 7: NEW v1.6.0 Base Management (3 tools)"
|
|
137
|
-
echo "==============================================="
|
|
138
|
-
|
|
139
|
-
test_tool "list_collaborators" "{}" "List base collaborators"
|
|
140
|
-
test_tool "list_shares" "{}" "List shared views"
|
|
141
|
-
|
|
142
|
-
# Test create_base (may fail without workspace permissions)
|
|
143
|
-
test_tool "create_base" "{\"name\": \"Test Base\", \"tables\": [{\"name\": \"Test Table\", \"fields\": [{\"name\": \"Name\", \"type\": \"singleLineText\"}]}]}" "Test base creation (may fail due to permissions)" "true"
|
|
144
|
-
|
|
145
|
-
echo ""
|
|
146
|
-
echo "⚠️ PHASE 8: Error Handling & Edge Cases"
|
|
147
|
-
echo "======================================="
|
|
148
|
-
|
|
149
|
-
test_tool "batch_create_records" "{\"table\": \"NonExistentTable\", \"records\": [{\"fields\": {\"Name\": \"Test\"}}]}" "Test batch create with non-existent table" "true"
|
|
150
|
-
test_tool "get_view_metadata" "{\"table\": \"NonExistentTable\", \"viewId\": \"viwTest\"}" "Test view metadata with non-existent table" "true"
|
|
151
|
-
|
|
152
|
-
echo ""
|
|
153
|
-
echo "📈 FINAL TEST RESULTS - v1.6.0"
|
|
154
|
-
echo "==============================="
|
|
155
|
-
echo "✅ Passed: $PASSED"
|
|
156
|
-
echo "❌ Failed: $FAILED"
|
|
157
|
-
echo "📊 Total Tests: $((PASSED + FAILED))"
|
|
158
|
-
echo "📊 Success Rate: $(echo "scale=1; $PASSED * 100 / ($PASSED + $FAILED)" | bc -l)%"
|
|
159
|
-
|
|
160
|
-
if [ $FAILED -eq 0 ]; then
|
|
161
|
-
echo ""
|
|
162
|
-
echo "🎉 🎉 🎉 ALL TESTS PASSED! 🎉 🎉 🎉"
|
|
163
|
-
echo ""
|
|
164
|
-
echo "✅ v1.6.0 is READY FOR PRODUCTION!"
|
|
165
|
-
echo ""
|
|
166
|
-
echo "🚀 NEW v1.6.0 ACHIEVEMENTS:"
|
|
167
|
-
echo "• 33 total tools (+ 10 from v1.5.0)"
|
|
168
|
-
echo "• Batch operations (create/update/delete up to 10 records)"
|
|
169
|
-
echo "• Attachment management via URLs"
|
|
170
|
-
echo "• Advanced view metadata and creation"
|
|
171
|
-
echo "• Base management and collaboration tools"
|
|
172
|
-
echo "• Enhanced error handling and validation"
|
|
173
|
-
echo ""
|
|
174
|
-
echo "📦 Ready for GitHub and NPM release!"
|
|
175
|
-
exit 0
|
|
176
|
-
else
|
|
177
|
-
echo ""
|
|
178
|
-
echo "❌ SOME TESTS FAILED"
|
|
179
|
-
echo "Review failures above. Some failures may be expected (permissions, non-existent resources)."
|
|
180
|
-
echo ""
|
|
181
|
-
echo "🎯 v1.6.0 SUMMARY:"
|
|
182
|
-
echo "• Core functionality working"
|
|
183
|
-
echo "• New batch operations implemented"
|
|
184
|
-
echo "• Attachment support added"
|
|
185
|
-
echo "• Advanced features may need specific permissions"
|
|
186
|
-
exit 1
|
|
187
|
-
fi
|
package/test_webhooks.sh
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
echo "🪝 TESTING WEBHOOK FUNCTIONALITY"
|
|
4
|
-
echo "================================"
|
|
5
|
-
echo ""
|
|
6
|
-
|
|
7
|
-
# Test 1: List webhooks
|
|
8
|
-
echo "1️⃣ LIST WEBHOOKS"
|
|
9
|
-
echo "-----------------"
|
|
10
|
-
result=$(curl -s -X POST http://localhost:8010/mcp \
|
|
11
|
-
-H "Content-Type: application/json" \
|
|
12
|
-
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "list_webhooks"}}')
|
|
13
|
-
|
|
14
|
-
if echo "$result" | grep -q "webhook\\|No webhooks"; then
|
|
15
|
-
echo "✅ PASSED: list_webhooks working"
|
|
16
|
-
echo "$result" | python3 -c "import sys, json; print(json.load(sys.stdin)['result']['content'][0]['text'])"
|
|
17
|
-
else
|
|
18
|
-
echo "❌ FAILED: list_webhooks error"
|
|
19
|
-
echo "$result" | python3 -m json.tool
|
|
20
|
-
fi
|
|
21
|
-
echo ""
|
|
22
|
-
|
|
23
|
-
# Test 2: Create webhook
|
|
24
|
-
echo "2️⃣ CREATE WEBHOOK"
|
|
25
|
-
echo "------------------"
|
|
26
|
-
result=$(curl -s -X POST http://localhost:8010/mcp \
|
|
27
|
-
-H "Content-Type: application/json" \
|
|
28
|
-
-d '{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "create_webhook", "arguments": {"notificationUrl": "https://webhook.site/test-webhook"}}}')
|
|
29
|
-
|
|
30
|
-
if echo "$result" | grep -q "Successfully created webhook"; then
|
|
31
|
-
echo "✅ PASSED: create_webhook working"
|
|
32
|
-
# Extract webhook ID
|
|
33
|
-
WEBHOOK_ID=$(echo "$result" | grep -o 'ach[a-zA-Z0-9]*' | head -1)
|
|
34
|
-
echo "Created webhook ID: $WEBHOOK_ID"
|
|
35
|
-
echo "$result" | python3 -c "import sys, json; t=json.load(sys.stdin)['result']['content'][0]['text']; print(t[:300])"
|
|
36
|
-
else
|
|
37
|
-
echo "❌ FAILED: create_webhook error"
|
|
38
|
-
echo "$result" | python3 -m json.tool | head -20
|
|
39
|
-
fi
|
|
40
|
-
echo ""
|
|
41
|
-
|
|
42
|
-
# Test 3: List webhooks again
|
|
43
|
-
echo "3️⃣ VERIFY WEBHOOK CREATED"
|
|
44
|
-
echo "--------------------------"
|
|
45
|
-
result=$(curl -s -X POST http://localhost:8010/mcp \
|
|
46
|
-
-H "Content-Type: application/json" \
|
|
47
|
-
-d '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "list_webhooks"}}')
|
|
48
|
-
|
|
49
|
-
if echo "$result" | grep -q "Found.*webhook"; then
|
|
50
|
-
echo "✅ PASSED: Webhook appears in list"
|
|
51
|
-
count=$(echo "$result" | grep -o "ID: ach" | wc -l)
|
|
52
|
-
echo "Total webhooks: $count"
|
|
53
|
-
else
|
|
54
|
-
echo "⚠️ WARNING: No webhooks found"
|
|
55
|
-
fi
|
|
56
|
-
echo ""
|
|
57
|
-
|
|
58
|
-
# Test 4: Get webhook payloads (if webhook exists)
|
|
59
|
-
if [ ! -z "$WEBHOOK_ID" ]; then
|
|
60
|
-
echo "4️⃣ GET WEBHOOK PAYLOADS"
|
|
61
|
-
echo "------------------------"
|
|
62
|
-
result=$(curl -s -X POST http://localhost:8010/mcp \
|
|
63
|
-
-H "Content-Type: application/json" \
|
|
64
|
-
-d "{\"jsonrpc\": \"2.0\", \"id\": 4, \"method\": \"tools/call\", \"params\": {\"name\": \"get_webhook_payloads\", \"arguments\": {\"webhookId\": \"$WEBHOOK_ID\"}}}")
|
|
65
|
-
|
|
66
|
-
if echo "$result" | grep -q "payload\\|No payloads"; then
|
|
67
|
-
echo "✅ PASSED: get_webhook_payloads working"
|
|
68
|
-
else
|
|
69
|
-
echo "❌ FAILED: get_webhook_payloads error"
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
# Test 5: Refresh webhook
|
|
73
|
-
echo ""
|
|
74
|
-
echo "5️⃣ REFRESH WEBHOOK"
|
|
75
|
-
echo "-------------------"
|
|
76
|
-
result=$(curl -s -X POST http://localhost:8010/mcp \
|
|
77
|
-
-H "Content-Type: application/json" \
|
|
78
|
-
-d "{\"jsonrpc\": \"2.0\", \"id\": 5, \"method\": \"tools/call\", \"params\": {\"name\": \"refresh_webhook\", \"arguments\": {\"webhookId\": \"$WEBHOOK_ID\"}}}")
|
|
79
|
-
|
|
80
|
-
if echo "$result" | grep -q "Successfully refreshed"; then
|
|
81
|
-
echo "✅ PASSED: refresh_webhook working"
|
|
82
|
-
else
|
|
83
|
-
echo "❌ FAILED: refresh_webhook error"
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
# Test 6: Delete webhook
|
|
87
|
-
echo ""
|
|
88
|
-
echo "6️⃣ DELETE WEBHOOK"
|
|
89
|
-
echo "------------------"
|
|
90
|
-
result=$(curl -s -X POST http://localhost:8010/mcp \
|
|
91
|
-
-H "Content-Type: application/json" \
|
|
92
|
-
-d "{\"jsonrpc\": \"2.0\", \"id\": 6, \"method\": \"tools/call\", \"params\": {\"name\": \"delete_webhook\", \"arguments\": {\"webhookId\": \"$WEBHOOK_ID\"}}}")
|
|
93
|
-
|
|
94
|
-
if echo "$result" | grep -q "Successfully deleted"; then
|
|
95
|
-
echo "✅ PASSED: delete_webhook working"
|
|
96
|
-
else
|
|
97
|
-
echo "❌ FAILED: delete_webhook error"
|
|
98
|
-
echo "$result" | python3 -m json.tool | head -20
|
|
99
|
-
fi
|
|
100
|
-
fi
|
|
101
|
-
|
|
102
|
-
echo ""
|
|
103
|
-
echo "📊 WEBHOOK TEST SUMMARY"
|
|
104
|
-
echo "======================"
|
|
105
|
-
echo "Webhook operations tested with Airtable API"
|