feat: MCP Server plugin (Task 5.16) - expose LeoCRM tools to external AI clients

- New plugin app/plugins/builtins/mcp_server/ with 9 MCP tools
- Tools: search_contacts, get_contact, create_contact, list_calendar_entries,
  create_calendar_entry, list_emails, send_email, list_files, upload_file
- Routes: GET /api/v1/mcp/tools, POST /api/v1/mcp/tools/{name}/execute, GET /api/v1/mcp/config
- API-token auth via session + RBAC (mcp:read, mcp:write)
- Frontend: mcp.ts API client with React Query hooks
- Frontend: SettingsMcp.tsx settings page with tool listing and execution
- i18n: de.json and en.json updated with MCP entries
- Tests: 7 tests covering tool listing, config, execution, auth, schema validation
This commit is contained in:
Agent Zero
2026-07-23 23:01:59 +02:00
parent f4beb78f91
commit 9d4f701a25
14 changed files with 1313 additions and 6 deletions
+52 -3
View File
@@ -16,7 +16,8 @@
"users": "Users",
"auditLog": "Audit Log",
"settings": "Settings",
"aiAssistant": "AI Assistant"
"aiAssistant": "AI Assistant",
"mcpSettings": "MCP Settings"
},
"auth": {
"login": "Sign In",
@@ -284,7 +285,8 @@
"livePreview": "Live Preview",
"livePreviewDescription": "This is how the app looks with the current theme",
"resetTheme": "Reset",
"saveTheme": "Save theme"
"saveTheme": "Save theme",
"mcp": "MCP"
},
"auditLog": {
"title": "Audit Log",
@@ -918,5 +920,52 @@
"tab": "Switch tab",
"settings": "Change settings"
}
},
"mcp": {
"title": "MCP Server & Client",
"server": {
"title": "MCP Server",
"description": "LeoCRM as MCP Server for external AI clients",
"tools": "Available Tools",
"toolCount": "Tool Count",
"toolName": "Tool",
"toolDescription": "Description",
"toolCategory": "Category",
"toolPermission": "Permission",
"execute": "Execute",
"executeTool": "Execute Tool",
"arguments": "Arguments (JSON)",
"result": "Result",
"error": "Error",
"success": "Success",
"config": "Server Configuration",
"serverName": "Server Name",
"serverVersion": "Version",
"protocolVersion": "Protocol Version",
"authMethod": "Authentication",
"availableTools": "Available Tools",
"noTools": "No tools available"
},
"client": {
"title": "MCP Client",
"description": "Description",
"servers": "Server Configurations",
"addServer": "Add Server",
"editServer": "Edit Server",
"deleteServer": "Delete Server",
"serverName": "Name",
"serverUrl": "URL",
"apiToken": "API Token",
"enabled": "Enabled",
"lastConnected": "Last Connected",
"noServers": "No servers configured",
"deleteConfirm": "Are you sure you want to delete this server?",
"serverCreated": "Server created successfully.",
"serverUpdated": "Server updated successfully.",
"serverDeleted": "Server deleted successfully.",
"viewTools": "View Tools",
"tools": "Tools",
"noTools": "No tools available"
}
}
}
}