Skip to main content
Glama

Jira-GitLab MCP Server

by gabbar910
start_agent.pyโ€ข3.98 kB
#!/usr/bin/env python3 """ Startup script for Jira-GitHub Agent Provides easy way to start the agent with different configurations """ import argparse import asyncio import sys from pathlib import Path # Add parent directory to path for imports sys.path.append(str(Path(__file__).parent.parent)) from jira_github_agent import JiraGitHubAgent def parse_arguments(): """Parse command line arguments""" parser = argparse.ArgumentParser( description="Start the Jira-GitHub Agent", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: python start_agent.py # Use default config python start_agent.py --config custom.yaml # Use custom config python start_agent.py --dry-run # Run in dry-run mode python start_agent.py --test # Run tests first """ ) parser.add_argument( '--config', '-c', default='agents/agent_config.yaml', help='Path to configuration file (default: agents/agent_config.yaml)' ) parser.add_argument( '--dry-run', '-d', action='store_true', help='Run in dry-run mode (no actual changes made)' ) parser.add_argument( '--test', '-t', action='store_true', help='Run tests before starting the agent' ) parser.add_argument( '--verbose', '-v', action='store_true', help='Enable verbose logging' ) return parser.parse_args() async def run_tests(): """Run agent tests""" print("๐Ÿงช Running agent tests...") try: from test_agent import run_all_tests success = await run_all_tests() return success except ImportError: print("โŒ Test module not found. Skipping tests.") return True except Exception as e: print(f"โŒ Test execution failed: {e}") return False async def main(): """Main entry point""" args = parse_arguments() print("๐Ÿš€ Jira-GitHub Agent Startup") print("=" * 40) # Run tests if requested if args.test: test_success = await run_tests() if not test_success: print("โŒ Tests failed. Aborting startup.") sys.exit(1) print("โœ… All tests passed. Starting agent...\n") # Create agent with specified config try: agent = JiraGitHubAgent(config_path=args.config) print(f"๐Ÿ“ Using configuration: {args.config}") # Override dry-run if specified if args.dry_run: agent.config['agent']['dry_run'] = True print("๐Ÿงช Dry-run mode enabled") # Override log level if verbose if args.verbose: agent.config['agent']['log_level'] = 'DEBUG' print("๐Ÿ” Verbose logging enabled") # Display configuration summary print("\n๐Ÿ“‹ Configuration Summary:") print(f" Jira Project: {agent.config['jira']['project_key']}") print(f" GitHub Repo: {agent.config['github']['repo_owner']}/{agent.config['github']['repo_name']}") print(f" MCP Server: {agent.config['mcp']['host']}") print(f" Check Interval: {agent.config['jira']['check_interval']}s") print(f" Dry Run: {agent.config['agent']['dry_run']}") print(f" Log Level: {agent.config['agent']['log_level']}") # Start the agent print("\n๐ŸŽฏ Starting agent monitoring...") await agent.start() except KeyboardInterrupt: print("\nโน๏ธ Agent stopped by user") except FileNotFoundError: print(f"โŒ Configuration file not found: {args.config}") print(" Please create the configuration file or specify a different path.") sys.exit(1) except Exception as e: print(f"โŒ Failed to start agent: {e}") sys.exit(1) if __name__ == "__main__": asyncio.run(main())

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gabbar910/MCPJiraGitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server