sahad0/lazy-AgentX
If you are the rightful owner of lazy-AgentX and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Premium LangGraph + MCP SDK Architecture is a production-ready Model Context Protocol (MCP) server designed for intelligent Jira integration using LangGraph agents and a n8n-style workflow engine.
AgentLazyX1 - Multi-Agent MCP Server
A production-ready Model Context Protocol (MCP) server that provides intelligent automation through specialized agents: Jira, Android Release, and Google Drive integration with LangGraph agents and n8n-style workflow engine.
šļø Premium Architecture
This project implements enterprise-grade patterns following LangGraph and MCP SDK best practices:
src/
āāā agents/ # LangGraph agents (core intelligence)
ā āāā jira/ # Jira integration agent
ā ā āāā JiraAgent.ts
ā āāā android/ # Android release automation agent
ā ā āāā AndroidAgent.ts
ā āāā google/ # Google Drive integration agent
ā āāā GoogleDriveAgent.ts
āāā mcp/ # MCP server implementation
ā āāā AgentLazyX1MCPServer.ts # Exposes all agents as MCP tools
āāā nodes/ # Workflow node implementations
ā āāā BaseNode.ts # Base class for all nodes
ā āāā jira/ # Jira-specific nodes
ā ā āāā JiraNode.ts
ā āāā android/ # Android-specific nodes
ā ā āāā AndroidNode.ts
ā āāā google/ # Google Drive-specific nodes
ā āāā GoogleDriveNode.ts
āāā engine/ # Workflow execution engine
ā āāā WorkflowEngine.ts
āāā workflows/ # Predefined workflow definitions
ā āāā jira/ # Jira workflows
ā ā āāā jira-workflow.ts
ā āāā android/ # Android workflows
ā ā āāā android-workflow.ts
ā āāā google/ # Google Drive workflows
ā āāā google-drive-workflow.ts
āāā types/ # Type definitions for workflow system
āāā index.ts
š Key Features
- LangGraph-Powered: Core intelligence powered by LangGraph agents
- MCP SDK Integration: Standardized tool exposure via MCP protocol
- n8n-Style Workflows: Extensible node-based workflow system
- Enterprise Ready: Production-grade architecture patterns
- TypeScript: Full type safety and modern development experience
- Cursor Integration: Seamless integration with Cursor IDE
- Multi-Agent Support: Jira, Android Release, and Google Drive agents
- Large File Handling: Streaming uploads for files 100MB+ with progress tracking
- Service Account Authentication: Secure Google Drive integration with service accounts
- Build Automation: Complete Android release pipeline with intelligent error handling
šÆ Architecture Benefits
1. Separation of Concerns
- LangGraph: Handles AI reasoning and workflow orchestration
- MCP SDK: Manages tool exposure and client communication
- Workflow Engine: Executes business logic through nodes
2. Scalability
- Easy to add new agents for different domains
- Extensible node system for complex workflows
- Standardized MCP protocol for tool integration
3. Production Ready
- Proper error handling and logging
- Type-safe implementations
- Modular architecture for easy testing
š§ Usage
Environment Setup
# Required environment variables
# Jira Configuration
export JIRA_DOMAIN="https://your-domain.atlassian.net"
export JIRA_EMAIL="your-email@company.com"
export JIRA_API_TOKEN="your-jira-api-token"
# Google Drive Configuration (Service Account)
export GOOGLE_SERVICE_ACCOUNT_PATH="./drive-agent-service.json"
export GOOGLE_DRIVE_FOLDER_ID="your-shared-drive-folder-id"
# Google Chat Configuration (Optional - for default space)
export GCHAT_SPACE_ID="spaces/your-google-chat-space-id"
Google Drive Setup
For Google Drive integration, you need to set up a service account:
-
Create Service Account:
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google Drive API
- Create a service account
- Download the JSON key file as
drive-agent-service.json
-
Configure Shared Drive:
- Create a Google Shared Drive (required for service accounts)
- Share the folder with your service account email
- Give Editor permissions to the service account
- Copy the folder ID from the URL
-
Environment Variables:
export GOOGLE_SERVICE_ACCOUNT_PATH="./drive-agent-service.json" export GOOGLE_DRIVE_FOLDER_ID="0ACgT3D-lOrnbUk9PVA" # Your shared drive folder ID
See GOOGLE_DRIVE_SETUP.md
for detailed setup instructions.
Google Chat Setup
For Google Chat integration, you need to set up a service account and configure the space:
-
Service Account Setup (same as Google Drive):
- Use the same service account JSON file (service.json) as Google Drive
- Ensure the service account has Google Chat API access
-
Add Bot to Google Chat Space:
- Open your Google Chat space
- Click on the space name ā "Manage webhooks and apps"
- Add the service account email as a bot
- Give it appropriate permissions
-
Get Space ID:
- Open the Google Chat space in your browser
- Copy the space ID from the URL:
https://chat.google.com/room/XXXXXXXXX
- The space ID format is:
spaces/XXXXXXXXX
-
Environment Variables:
export GCHAT_SPACE_ID="spaces/your-google-chat-space-id"
-
Usage:
- With default space:
Send message 'Hello World'
- With specific space:
Send message 'Hello World' to space spaces/abc123
- With default space:
Running the System
# Development mode with hot reload
yarn dev
# Production MCP server
yarn mcp
# Production build and start
yarn build
yarn start:prod
# LangGraph API server (alternative deployment)
yarn langgraph:start
# Development LangGraph server
yarn langgraph:dev
Production Deployment
-
Environment Setup:
cp env.example .env # Edit .env with your production values export NODE_ENV=production
-
Build and Deploy:
yarn build yarn start:prod
-
Health Monitoring:
- Health checks run every 5 minutes in production
- Monitor logs for uptime and error messages
- All agents include basic error handling and logging
Cursor Integration
The MCP server exposes multiple specialized tools:
š¤ Available Agents & APIs
1. Jira Agent
Tools: jira_agent
, jira_advanced_search
Capabilities:
- Intelligent Jira Queries: Natural language processing of Jira requests
- Workflow Execution: n8n-style workflow processing
- AI-Enhanced Responses: Context-aware ticket summaries
- Multi-format Support: Handles ticket keys, URLs, and descriptions
- Advanced Search: Filter by assignee, status, priority, issue type, project
API Parameters:
// jira_agent
{ query: string }
// jira_advanced_search
{
text?: string, // Search text
assignee?: string, // Filter by assignee
status?: string, // Filter by status
priority?: string, // Filter by priority
issueType?: string, // Filter by issue type
project?: string, // Filter by project
maxResults?: number // Max results (default: 10)
}
2. Android Release Agent
Tool: android_release_agent
Capabilities:
- Build Automation: Automated Android release builds
- Error Analysis: Intelligent error detection with solutions
- Progress Tracking: Real-time build progress monitoring
- Clean Build Management: Smart cache clearing and build folder management
- Extended Timeout: Optimized for low-end devices
API Parameters:
{
command: string, // Required: Command to execute
projectPath?: string, // Optional: Project path
runGradleClean?: 'yes'|'no'|'auto' // Gradle clean control
}
Special Commands:
android:release
- Full Android release build workflowyarn build
- Standard build commandyarn android:release
- Android-specific release
3. Google Chat Agent
Tool: google_chat_agent
Capabilities:
- Text Messaging: Send messages to Google Chat spaces
- User Mentions: Tag specific users by name or email
- URL Attachments: Include links with custom display text
- Default Space: Configure a default space for easy messaging
- Enhanced Features: Support for @all mentions and thread replies
API Parameters:
{
query: string; // Natural language query for sending messages
}
Query Examples:
// Simple message to default space
"Send message 'Hello World'";
// Message to specific space
"Send message 'Hello World' to space spaces/abc123";
// Message with user mentions
"Send message 'Hello team' tag users 'john, jane'";
// Message with URL
"Send message 'Check this out' url 'https://example.com' url text 'Example Link'";
// Message with @all mention
"Send message 'Important update' tag all";
4. Google Drive Agent
Tool: google_drive_upload
Capabilities:
- Large File Uploads: Streaming uploads for files 100MB+ with resumable upload
- Progress Tracking: Real-time upload progress with speed and ETA
- Memory Efficient: Uses streaming to avoid loading entire files into memory
- Service Account Auth: Secure authentication with Google service accounts
- Public Sharing: Automatic public sharing permissions
- File Replacement: Smart handling of existing files
API Parameters:
{
filePath: string, // Required: Local file path
folderId?: string, // Optional: Google Drive folder ID
fileName?: string, // Optional: Custom file name
enableProgress?: boolean // Optional: Enable progress tracking
}
Features:
- Automatic Optimization: Chooses simple vs resumable upload based on file size
- Progress Tracking: Real-time upload progress with speed and ETA
- Public URLs: Returns both direct and sharing links
- Error Handling: Comprehensive error messages with solutions
š Production Deployment
Option 1: Direct MCP Server
yarn mcp
- Runs as stdio MCP server
- Direct integration with Cursor
- Best for development and single-user scenarios
Option 2: LangGraph API Server
yarn langgraph:start
- Runs as HTTP server with
/mcp
endpoint - Supports multiple clients
- Better for production and team environments
š Extending the System
Adding New Agents
- Create agent class in
src/agents/
- Implement workflow integration
- Register in MCP server
Adding New Workflow Nodes
- Extend
BaseNode
class - Implement
getDefinition()
andexecute()
methods - Register in
WorkflowEngine
Adding New Workflows
- Create workflow definitions in
src/workflows/
- Define node connections and parameters
- Integrate with agents
š Future Enhancements
- Multi-Agent Orchestration: Coordinate multiple specialized agents
- Advanced Workflows: Complex branching and parallel execution
- Visual Workflow Editor: n8n-style drag-and-drop interface
- Enterprise Integrations: GitHub, Slack, email, CRM systems
- Real-time Monitoring: Workflow execution tracking and analytics
- Custom Node Marketplace: Community-driven node ecosystem
- Google Drive List/Download: File listing and download capabilities
- Android Build Variants: Support for different build flavors and variants
- Jira Webhook Integration: Real-time ticket updates and notifications
š ļø Development
# Install dependencies
yarn install
# Format code
yarn format
# Build TypeScript
yarn build
# Run tests (when implemented)
yarn test
š Architecture Patterns
This implementation follows these premium patterns:
- Agent-First Design: LangGraph agents as the core intelligence layer
- Protocol Standardization: MCP SDK for tool exposure
- Workflow Abstraction: n8n-style node system for business logic
- Type Safety: Full TypeScript implementation
- Modular Architecture: Clear separation of concerns
- Production Readiness: Error handling, logging, and monitoring
š License
MIT