{"_id":"@aiconnect/agentjobs-mcp","_rev":"23-0f3f213a4209cb62ebf4599693b7190b","name":"@aiconnect/agentjobs-mcp","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.8":{"name":"@aiconnect/agentjobs-mcp","version":"1.0.8","keywords":["mcp","model-context-protocol","anthropic","aiconnect","agent-jobs","typescript","automation"],"author":{"name":"Eric Santos"},"license":"MIT","_id":"@aiconnect/agentjobs-mcp@1.0.8","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://aiconnect.cloud","bugs":{"url":"https://github.com/aiconnect-cloud/agentjobs-mcp/issues"},"bin":{"agentjobs-mcp":"build/index.js"},"dist":{"shasum":"e59e00974311a1e21a7385e8042625dff53e29f8","tarball":"https://registry.npmjs.org/@aiconnect/agentjobs-mcp/-/agentjobs-mcp-1.0.8.tgz","fileCount":11,"integrity":"sha512-sFCL4R10Rm10fo3vBrZ9m3DH+499ibbcxIfY+P8v0t0/OypL6yV8ucOxs4+KwEWZ+exI2YWtb+q94CXZijglHA==","signatures":[{"sig":"MEQCIDyQGWLvS0/iT5d+wXScqgrZ/+FTuEE6iXgET6HTgSQBAiAluPj6FvtCsrD/VYbJWUKxiWKT0qceCPMQSMkodrf+kQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43186},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"6ab5d5ab7cd40be47e2d931ca277a3937d37409f","scripts":{"dev":"tsc && node build/index.js","lint":"echo 'Linting not configured yet'","test":"echo 'Tests not configured yet'","build":"tsc && chmod +x build/index.js","clean":"rm -rf build","start":"node build/index.js","prepare":"npm run build","release":"npm run clean && npm run build && npm run typecheck && npm publish","cli:help":"npm run build && node build/index.js --help","typecheck":"tsc --noEmit","cli:config":"npm run build && node build/index.js --config","cli:version":"npm run build && node build/index.js --version","publish:major":"npm run version:major && npm publish","publish:minor":"npm run version:minor && npm publish","publish:patch":"npm run version:patch && npm publish","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run clean && npm run build && npm run typecheck"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/aiconnect-cloud/agentjobs-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP (Model Context Protocol) server for managing Agent Jobs in the AI Connect platform. Developed by AI Connect - Advanced AI automation and integration solutions.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.9.0","dotenv":"^16.5.0","@modelcontextprotocol/sdk":"^1.1.0"},"organization":"AI Connect","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/agentjobs-mcp_1.0.8_1748608974153_0.3813648280626245","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@aiconnect/agentjobs-mcp","version":"1.0.9","keywords":["mcp","model-context-protocol","anthropic","aiconnect","agent-jobs","typescript","automation"],"author":{"name":"Eric Santos"},"license":"MIT","_id":"@aiconnect/agentjobs-mcp@1.0.9","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://aiconnect.cloud","bugs":{"url":"https://github.com/aiconnect-cloud/agentjobs-mcp/issues"},"bin":{"agentjobs-mcp":"build/index.js"},"dist":{"shasum":"fb77a223645ed933d54ef1f612eaed8dc91350b5","tarball":"https://registry.npmjs.org/@aiconnect/agentjobs-mcp/-/agentjobs-mcp-1.0.9.tgz","fileCount":13,"integrity":"sha512-NiUAZJcRVzmQ9EseHh71JXRBvG2vVtk6utTczeo039CkCKSPyDIUT7a6OQAWyvxTgZZnqBeR1p91jUh/1kqJkg==","signatures":[{"sig":"MEUCIQDBBv62gvZ1c8U8itYMWQuG6TXjSEhxbV1FoRh7PutXBAIgH+K6PazxOgXn0lCkyfUZOY+zOccazk6rE8TQx3PsAR0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50442},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"7e2e2d48740fc3eb11c91b9f6e1b03515e696892","scripts":{"dev":"tsc && node build/index.js","lint":"echo 'Linting not configured yet'","test":"echo 'Tests not configured yet'","build":"tsc && chmod +x build/index.js","clean":"rm -rf build","start":"node build/index.js","prepare":"npm run build","release":"npm run clean && npm run build && npm run typecheck && npm publish","cli:help":"npm run build && node build/index.js --help","typecheck":"tsc --noEmit","cli:config":"npm run build && node build/index.js --config","cli:version":"npm run build && node build/index.js --version","publish:major":"npm run version:major && npm publish","publish:minor":"npm run version:minor && npm publish","publish:patch":"npm run version:patch && npm publish","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run clean && npm run build && npm run typecheck"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/aiconnect-cloud/agentjobs-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP (Model Context Protocol) server for managing Agent Jobs in the AI Connect platform. Developed by AI Connect - Advanced AI automation and integration solutions.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.9.0","dotenv":"^16.5.0","@modelcontextprotocol/sdk":"^1.1.0"},"organization":"AI Connect","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/agentjobs-mcp_1.0.9_1753301853590_0.021393386879308585","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@aiconnect/agentjobs-mcp","version":"1.1.0","keywords":["mcp","model-context-protocol","anthropic","aiconnect","agent-jobs","typescript","automation"],"author":{"name":"Eric Santos"},"license":"MIT","_id":"@aiconnect/agentjobs-mcp@1.1.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://aiconnect.cloud","bugs":{"url":"https://github.com/aiconnect-cloud/agentjobs-mcp/issues"},"bin":{"agentjobs-mcp":"build/index.js"},"dist":{"shasum":"e6e497a7e7b1b0cb36ab7dd5a6cfba7e52c8d0b9","tarball":"https://registry.npmjs.org/@aiconnect/agentjobs-mcp/-/agentjobs-mcp-1.1.0.tgz","fileCount":22,"integrity":"sha512-3Y/E9XioK3nZUEhL1DlXksf6SY/0cPQdcWlkgj1gdkNDuCISp/ub/N3U7Ldta9Zn09B+/TdPIk7obT2Xz4paFg==","signatures":[{"sig":"MEQCIB+m+zyQ1gsVfS/zw7lwavBV4o7/i3tq92SpD8U/us/iAiApP6no4VJQ6ARvWzRV+SlGrbmFhdCaK6cOuzgMcE+nUg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105430},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"4051060f729e627fe1df68267987967357f6da31","scripts":{"dev":"tsc && node build/index.js","lint":"eslint . --ext .ts,.js","test":"vitest","build":"tsc && chmod +x build/index.js","clean":"rm -rf build","debug":"tsc && node build/debug.js","start":"node build/index.js","prepare":"npm run build","release":"npm run clean && npm run build && npm run typecheck && npm publish","cli:help":"npm run build && node build/index.js --help","lint:fix":"eslint . --ext .ts,.js --fix","typecheck":"tsc --noEmit","cli:config":"npm run build && node build/index.js --config","test:tools":"npm run build && node build/test-tools.js","cli:version":"npm run build && node build/index.js --version","debug:watch":"tsc --watch & sleep 2 && node build/debug.js","publish:major":"npm run version:major && npm publish","publish:minor":"npm run version:minor && npm publish","publish:patch":"npm run version:patch && npm publish","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run clean && npm run build && npm run typecheck"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/aiconnect-cloud/agentjobs-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP (Model Context Protocol) server for managing Agent Jobs in the AI Connect platform. Developed by AI Connect - Advanced AI automation and integration solutions.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.9.0","dotenv":"^16.5.0","@modelcontextprotocol/sdk":"^1.1.0"},"organization":"AI Connect","_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.14.0","vitest":"^3.2.4","@eslint/js":"^9.14.0","typescript":"^5.7.2","@types/node":"^22.10.5","typescript-eslint":"^8.12.2"},"_npmOperationalInternal":{"tmp":"tmp/agentjobs-mcp_1.1.0_1755203049881_0.482564004212066","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@aiconnect/agentjobs-mcp","version":"1.2.0","keywords":["mcp","model-context-protocol","anthropic","aiconnect","agent-jobs","typescript","automation"],"author":{"name":"Eric Santos"},"license":"MIT","_id":"@aiconnect/agentjobs-mcp@1.2.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://aiconnect.cloud","bugs":{"url":"https://github.com/aiconnect-cloud/agentjobs-mcp/issues"},"bin":{"agentjobs-mcp":"build/index.js"},"dist":{"shasum":"e6dd030cda5d9237149ee7213acd2a1b19bab37f","tarball":"https://registry.npmjs.org/@aiconnect/agentjobs-mcp/-/agentjobs-mcp-1.2.0.tgz","fileCount":26,"integrity":"sha512-ZNk+nYrdKdghm38xD40nFc27rmQHr757ESYR7zwfmx4lsYreN0jW3Gnw8ArZXBI62DwWkYDadU41ISJBB1xh6g==","signatures":[{"sig":"MEYCIQCROvuOfRNiTxFy6+iy0g4ILdSk5YrZE5gKNjYXi1AYnAIhAMJFgFko3UBXV2WkecbyMackRSX9csA/QW19j/dROr/W","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":131748},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"e9c6f0ee06091796a5c60f0d3a6488ee0386388c","scripts":{"dev":"tsc && node build/index.js","lint":"eslint . --ext .ts,.js","test":"vitest","build":"tsc && chmod +x build/index.js","clean":"rm -rf build","debug":"tsc && node build/debug.js","start":"node build/index.js","prepare":"npm run build","release":"npm run clean && npm run build && npm run typecheck && npm publish","cli:help":"npm run build && node build/index.js --help","lint:fix":"eslint . --ext .ts,.js --fix","typecheck":"tsc --noEmit","cli:config":"npm run build && node build/index.js --config","test:tools":"npm run build && node build/test-tools.js","cli:version":"npm run build && node build/index.js --version","debug:watch":"tsc --watch & sleep 2 && node build/debug.js","publish:major":"npm run version:major && npm publish","publish:minor":"npm run version:minor && npm publish","publish:patch":"npm run version:patch && npm publish","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run clean && npm run build && npm run typecheck"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/aiconnect-cloud/agentjobs-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"MCP (Model Context Protocol) server for managing Agent Jobs in the AI Connect platform. Developed by AI Connect - Advanced AI automation and integration solutions.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"zod":"^3.22.4","axios":"^1.9.0","dotenv":"^16.5.0","@modelcontextprotocol/sdk":"^1.1.0"},"organization":"AI Connect","_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.14.0","vitest":"^3.2.4","@eslint/js":"^9.14.0","typescript":"^5.7.2","@types/node":"^22.10.5","typescript-eslint":"^8.12.2","zod-to-json-schema":"^3.23.0"},"_npmOperationalInternal":{"tmp":"tmp/agentjobs-mcp_1.2.0_1777933262548_0.011694145032890235","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@aiconnect/agentjobs-mcp","version":"1.3.0","description":"MCP (Model Context Protocol) server for managing Agent Jobs in the AI Connect platform. Developed by AI Connect - Advanced AI automation and integration solutions.","type":"module","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/aiconnect-cloud/agentjobs-mcp.git"},"homepage":"https://aiconnect.cloud","organization":"AI Connect","keywords":["mcp","model-context-protocol","anthropic","aiconnect","agent-jobs","typescript","automation"],"author":{"name":"Eric Santos"},"license":"MIT","bin":{"agentjobs-mcp":"build/index.js"},"scripts":{"build":"tsc && chmod +x build/index.js","start":"node build/index.js","dev":"tsc && node build/index.js","debug":"tsc && node build/debug.js","debug:watch":"tsc --watch & sleep 2 && node build/debug.js","clean":"rm -rf build","typecheck":"tsc --noEmit","lint":"eslint . --ext .ts,.js","lint:fix":"eslint . --ext .ts,.js --fix","test":"vitest","test:tools":"npm run build && node build/test-tools.js","prepare":"npm run build","version:patch":"npm version patch","version:minor":"npm version minor","version:major":"npm version major","publish:patch":"npm run version:patch && npm publish","publish:minor":"npm run version:minor && npm publish","publish:major":"npm run version:major && npm publish","release":"npm run clean && npm run build && npm run typecheck && npm publish","prepublishOnly":"npm run clean && npm run build && npm run typecheck","cli:help":"npm run build && node build/index.js --help","cli:version":"npm run build && node build/index.js --version","cli:config":"npm run build && node build/index.js --config"},"dependencies":{"@modelcontextprotocol/sdk":"^1.1.0","axios":"^1.9.0","dotenv":"^16.5.0","zod":"^3.22.4"},"devDependencies":{"@types/node":"^22.10.5","@eslint/js":"^9.14.0","eslint":"^9.14.0","typescript-eslint":"^8.12.2","typescript":"^5.7.2","vitest":"^3.2.4","zod-to-json-schema":"^3.23.0"},"engines":{"node":">=18.0.0"},"gitHead":"4b7af86e65e94cfe3aecf74fb4001961ce8f5698","_id":"@aiconnect/agentjobs-mcp@1.3.0","bugs":{"url":"https://github.com/aiconnect-cloud/agentjobs-mcp/issues"},"_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-Z6O+5VCjPsZ3zwZOnWki//7lGcjchIxOY/SStaea2n5HD5POrHLuUOhM3ColqeE0VmY3oMODomOH2UQcQIxRIA==","shasum":"08e6ed408a109cf2562dd7ffe5ce6d0e3b74e32d","tarball":"https://registry.npmjs.org/@aiconnect/agentjobs-mcp/-/agentjobs-mcp-1.3.0.tgz","fileCount":23,"unpackedSize":123311,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEdl1WBrhBmqw5LXpNxDPZwlw6V87Eulv4WeG141XBq6AiBUeVWASBcnotv/V+vEClKTZSM4pm8MfG5mi0hYVPZ+Og=="}]},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"directories":{},"maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agentjobs-mcp_1.3.0_1778547075829_0.9331946352657865"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-30T00:49:06.131Z","modified":"2026-05-12T00:51:16.103Z","1.0.0":"2025-05-30T00:49:06.487Z","1.0.1":"2025-05-30T00:54:10.148Z","1.0.2":"2025-05-30T00:54:59.669Z","1.0.3":"2025-05-30T00:55:29.059Z","1.0.4":"2025-05-30T00:56:18.891Z","1.0.5":"2025-05-30T00:56:47.327Z","1.0.6":"2025-05-30T00:59:57.437Z","1.0.7":"2025-05-30T12:12:51.061Z","1.0.8":"2025-05-30T12:42:54.345Z","1.0.9":"2025-07-23T20:17:33.778Z","1.0.10":"2025-07-23T21:46:43.631Z","1.1.0":"2025-08-14T20:24:10.060Z","1.2.0":"2026-05-04T22:21:02.704Z","1.3.0":"2026-05-12T00:51:15.962Z"},"bugs":{"url":"https://github.com/aiconnect-cloud/agentjobs-mcp/issues"},"author":{"name":"Eric Santos"},"license":"MIT","homepage":"https://aiconnect.cloud","keywords":["mcp","model-context-protocol","anthropic","aiconnect","agent-jobs","typescript","automation"],"repository":{"type":"git","url":"git+https://github.com/aiconnect-cloud/agentjobs-mcp.git"},"description":"MCP (Model Context Protocol) server for managing Agent Jobs in the AI Connect platform. Developed by AI Connect - Advanced AI automation and integration solutions.","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"readme":"# AI Connect MCP Server\n\nAn MCP (Model Context Protocol) server that allows AI agents to query and manage jobs in the AI Connect platform.\n\n## About AI Connect Jobs\n\nAI Connect Jobs is a robust asynchronous task management system on the AI Connect platform, enabling the creation, monitoring, and execution of jobs across different platforms like Slack and WhatsApp, with support for scheduled execution, automatic retries, and timeout handling. The API provides endpoints to create, list, query, and cancel jobs, allowing developers and external systems to easily integrate asynchronous processing functionalities into their applications, automating complex workflows without the need to implement the entire task management infrastructure.\n\n## Features\n\nThis MCP Server provides tools for AI agents to:\n\n- 📋 **List Jobs**: Query all jobs with advanced filtering\n- 🔍 **Get Specific Job**: Retrieve details of a specific job by ID\n- ✅ **Create Jobs**: Create new jobs for immediate or scheduled execution\n- ❌ **Cancel Jobs**: Cancel running or scheduled jobs\n- 📊 **Monitor Status**: Track job status (WAITING, RUNNING, COMPLETED, FAILED, CANCELED)\n\n## Technologies\n\n- **Node.js** with **TypeScript**\n- **Model Context Protocol (MCP)** by Anthropic\n- **Zod** for schema validation\n- **AI Connect API** for integration with the Agent Jobs system\n\n## Installation\n\n### NPX (Recommended)\n\nYou can run the MCP server directly using npx without installation:\n\n```bash\nnpx @aiconnect/agentjobs-mcp --help\n```\n\n### Local Installation\n\n1. **Clone the repository:**\n```bash\ngit clone <repository-url>\ncd agentjobs-mcp\n```\n\n2. **Install dependencies:**\n```bash\nnpm install\n```\n\n3. **Configure environment variables (Optional):**\n\nThe MCP server comes with default values from `.env.example`, so you can run it without setting any environment variables. However, you **must** provide an API key for authentication.\n\n```bash\ncp .env.example .env\n```\n\nEdit the `.env` file with your credentials:\n```env\nDEFAULT_ORG_ID=your-organization     # Default: aiconnect\nAICONNECT_API_KEY=your-api-key       # Required: Must be provided\nAICONNECT_API_URL=https://api.aiconnect.cloud/api/v0  # Default\nDEFAULT_TIMEZONE=America/Sao_Paulo   # Default: UTC (informational only, surfaced via get_context)\n```\n\n**Important**: If no environment variables are provided, the server will use these defaults:\n- `DEFAULT_ORG_ID`: `aiconnect`\n- `AICONNECT_API_URL`: `https://api.aiconnect.cloud/api/v0`\n- `AICONNECT_API_KEY`: empty (must be provided for API calls to work)\n- `DEFAULT_TIMEZONE`: `UTC`\n\n4. **Build the project:**\n```bash\nnpm run build\n```\n\n## Usage\n\n### CLI Usage\n\nThe MCP server now supports CLI commands for easy management:\n\n```bash\n# Show help and usage information\nnpx @aiconnect/agentjobs-mcp --help\n\n# Show version information\nnpx @aiconnect/agentjobs-mcp --version\n\n# Show current configuration status\nnpx @aiconnect/agentjobs-mcp --config\n\n# Start MCP server (default behavior)\nnpx @aiconnect/agentjobs-mcp\n```\n\n**Setting Environment Variables:**\n```bash\n# Using environment variables with npx\nAICONNECT_API_URL=https://api.aiconnect.cloud/api/v0 \\\nAICONNECT_API_KEY=your-api-key-here \\\nnpx @aiconnect/agentjobs-mcp\n\n# Or create a .env file (recommended for development)\ncp .env.example .env\n# Edit .env with your credentials\nnpx @aiconnect/agentjobs-mcp\n```\n\n**Required Environment Variables:**\n- `AICONNECT_API_URL`: API endpoint URL (e.g., https://api.aiconnect.cloud/api/v0)\n- `AICONNECT_API_KEY`: Your API authentication key\n\n**Optional Environment Variables:**\n\n- `DEFAULT_ORG_ID`: Fallback organization ID when a tool's `org_id` parameter is omitted (default: `aiconnect`)\n- `DEFAULT_TIMEZONE`: Preferred timezone surfaced by the `get_context` tool so LLM clients can format timestamps. Informational only — does not change behavior of other tools, which continue to emit timestamps in UTC (default: `UTC`)\n\n**CLI Command Examples:**\n```bash\n# Quick help\nnpx @aiconnect/agentjobs-mcp -h\n\n# Check version\nnpx @aiconnect/agentjobs-mcp -v\n\n# Verify configuration before starting\nnpx @aiconnect/agentjobs-mcp -c\n\n# Test with environment variables\nenv AICONNECT_API_URL=https://api.aiconnect.cloud/api/v0 \\\n    AICONNECT_API_KEY=test-key \\\n    npx @aiconnect/agentjobs-mcp --config\n```\n\n### Local Development\n\nFor local development, you can use npm scripts:\n\n```bash\n# Build and test CLI commands\nnpm run cli:help\nnpm run cli:version  \nnpm run cli:config\n\n# Run test suite (if available)\nnpm run test:cli\n```\n\n### Configuration Options\n\nThis MCP server is designed to work out-of-the-box with minimal configuration. It uses a smart fallback system:\n\n1. **With environment variables**: Full control over all settings\n2. **Without environment variables**: Uses defaults from `.env.example`\n3. **Partial configuration**: Mix of environment variables and defaults\n\n**Default Values (when no env vars are set):**\n\n- `DEFAULT_ORG_ID`: `\"aiconnect\"`\n- `AICONNECT_API_URL`: `\"https://api.aiconnect.cloud/api/v0\"`\n- `AICONNECT_API_KEY`: `\"\"` (empty - you must provide this)\n- `DEFAULT_TIMEZONE`: `\"UTC\"`\n\n**Error Handling:**\n\n- The server will always start, even if environment variables are missing.\n- If `AICONNECT_API_KEY` or `AICONNECT_API_URL` are not provided, each tool will return a clear error message upon execution, guiding the user to configure the environment correctly.\n- If `DEFAULT_ORG_ID` is not set, it defaults to \"aiconnect\".\n- If `DEFAULT_TIMEZONE` is not set, it defaults to \"UTC\". This value is purely informational (returned by the `get_context` tool) and does not affect timestamp parsing or formatting in other tools.\n\n### Running the MCP server\n\n```bash\nnpm start\n```\n\nThe server will start and wait for connections via stdio transport.\n\n### Claude Desktop Configuration\n\nTo use this MCP server with Claude Desktop, add the following configuration to your `claude_desktop_config.json` file:\n\n```json\n{\n  \"mcpServers\": {\n    \"agentjobs\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/agentjobs-mcp/build/index.js\"],\n      \"env\": {\n        \"DEFAULT_ORG_ID\": \"your-organization\",\n        \"AICONNECT_API_KEY\": \"your-api-key\",\n        \"AICONNECT_API_URL\": \"https://api.aiconnect.cloud/api/v0\",\n        \"DEFAULT_TIMEZONE\": \"America/Sao_Paulo\"\n      }\n    }\n  }\n}\n```\n\n### Local Development with Claude Code\n\nFor development and testing, you can add this MCP server directly to your Claude Code project:\n\n```bash\n# Prerequisites: build the project first\nnpm install\nnpm run build\n\n# Configure your .env file\ncp .env.example .env\n# Edit .env with your API credentials\n\n# Add MCP server to Claude Code (project scope)\nclaude mcp add --scope project agentjobs -- ./mcp-agentjobs.sh\n```\n\nThis allows you to test and use the AgentJobs tools directly within Claude Code during development, providing immediate feedback and easier debugging.\n\n## Available Tools\n\n### 📊 `get_jobs_stats`\nGet aggregated statistics for agent jobs without retrieving individual job data. Optimized for dashboards and monitoring with minimal network overhead.\n\n**Parameters:**\n- `scheduled_at_gte`: Start of period (ISO 8601)\n- `scheduled_at_lte`: End of period (ISO 8601)\n- `org_id`: Organization filter\n- `job_type_id`: Job type filter\n- `tags`: Tags filter (comma-separated)\n- `status`: Status filter\n- `channel_code`: Channel filter\n\n### 🔧 `list_jobs`\nLists all jobs with filtering and pagination options.\n\n**Parameters:**\n- `status` (optional): Filter by status (WAITING, RUNNING, COMPLETED, FAILED, CANCELED)\n- `job_type_id` (optional): Filter by job type\n- `channel_code` (optional): Filter by channel code\n- `limit` (optional): Result limit (default: 50)\n- `offset` (optional): Pagination offset\n- `sort` (optional): Field and direction for sorting\n- `include_activities` (optional): Attach recent activities to each job (default: false)\n- `activities_limit_per_job` (optional): Max activities per job (1–100, default 15)\n- `activities_total_limit` (optional): Global cap across the response (1–3000, default 500)\n- `activities_sort` (optional): `created_at` or `-created_at` (default `-created_at`)\n\n### 🔍 `get_job`\nGets details of a specific job.\n\n**Parameters:**\n- `job_id` (required): ID of the job to query\n- `include_activities` (optional): Attach recent activities as an inline overlay (default: false)\n- `include_limit` (optional): Max activities to attach (1–100, default 50)\n- `include_sort` (optional): `created_at` or `-created_at` (default `-created_at`)\n\n### 🧾 `get_job_activities`\nRetrieves the audit activity trail for a specific agent job via the dedicated `/services/activities` endpoint. Supports real pagination (no truncation) and server-side filtering. Use this for focused investigation of a job's activity log; for a quick overlay of recent activities, use `get_job` with `include_activities=true`.\n\n**Parameters:**\n- `job_id` (required): ID of the agent job\n- `org_id` (optional): Organization scope\n- `status` (optional): `submitted`, `completed`, or `canceled`\n- `activity_type_code` (optional): Open-string code (e.g., `ai_completion`)\n- `source_type` (optional): `dispatch`, `process_module`, or `direct`\n- `limit` (optional): Page size (default 50)\n- `offset` (optional): Pagination offset (default 0)\n- `sort` (optional): Sort field/direction (default `-created_at`)\n\n### ✅ `create_job`\nCreates a new job for execution.\n\n**Parameters:**\n- `target_channel`: Target channel configuration\n- `job_type_id`: Job type ID\n- `config`: Job configuration (timeouts, retries, etc.)\n- `params`: Job-specific parameters\n- `scheduled_at` (optional): Date/time for scheduled execution\n- `delay` (optional): Random delay in minutes\n\n### ❌ `cancel_job`\nCancels a running or scheduled job.\n\n**Parameters:**\n- `job_id` (required): ID of the job to cancel\n- `reason` (optional): Cancellation reason\n\n## Job Status\n\nJobs can have the following status values:\n\n- `WAITING`: Job waiting for execution\n- `SCHEDULED`: Job scheduled for future execution\n- `RUNNING`: Job currently running\n- `COMPLETED`: Job completed successfully\n- `FAILED`: Job failed\n- `CANCELED`: Job was canceled\n\n## Usage Examples\n\n### List running jobs\n```\nAgent: \"Show me all jobs that are currently running\"\n```\n\n### Query specific job\n```\nAgent: \"What's the status of job job-123?\"\n```\n\n### Create scheduled job\n```\nAgent: \"Create a daily report job for Slack channel C123456 to run tomorrow at 9 AM\"\n```\n\n### Cancel job\n```\nAgent: \"Cancel job job-456 because it's no longer needed\"\n```\n\n## Project Structure\n\n```\nagentjobs-mcp/\n├── src/                    # TypeScript source code\n│   ├── index.ts           # Main MCP server entry point\n│   ├── config.ts          # Configuration loader\n│   └── tools/             # Directory for all MCP tools\n│       ├── get_jobs_stats.ts     # Tool for getting job statistics\n│       ├── list_jobs.ts          # Tool for listing jobs\n│       ├── get_job.ts            # Tool for getting a job\n│       ├── get_job_activities.ts # Tool for getting a job's activity trail\n│       ├── create_job.ts         # Tool for creating a job\n│       └── cancel_job.ts         # Tool for canceling a job\n├── build/                 # Compiled JavaScript code\n├── docs/                  # Documentation\n│   └── agent-jobs-api.md  # API documentation\n├── package.json           # Dependencies and scripts\n├── tsconfig.json          # TypeScript configuration\n├── .env.example           # Environment variables example\n└── README.md              # This file\n```\n\n## Development\n\n### Available scripts\n\n- `npm run build`: Compiles TypeScript\n- `npm start`: Runs the compiled server\n- `npm run debug`: Runs server in debug mode with detailed logging\n- `npm run test:tools`: Tests tool loading without starting server\n- `npm run cli:config`: Shows current configuration\n- `npm run cli:version`: Shows version information\n- `npm run cli:help`: Shows help information\n\n### Debugging\n\nFor detailed debugging information, see [Debug Guide](docs/debug-guide.md).\n\n**Quick Debug Commands:**\n```bash\n# Test configuration\nnpm run cli:config\n\n# Test tool loading\nnpm run test:tools\n\n# Run in debug mode\nMCP_DEBUG=true npm run debug\n\n# Use debug helper script (Fish shell)\n./debug.fish help\n./debug.fish quick\n```\n\n**Debug Environment:**\n```bash\n# Copy debug environment template\ncp .env.debug .env\n# Edit .env with your API credentials\n# Run with debug environment\n./debug.fish debug-with-env\n```\n\n### Adding new tools\n\nAdding a new tool is simple:\n\n1. Create a new TypeScript file inside the `src/tools/` directory (e.g., `my_new_tool.ts`).\n2. Implement your tool logic following the existing pattern. The server will automatically detect and register it on startup.\n3. Recompile the project with `npm run build`.\n4. Test with `npm run test:tools` to verify loading.\n\n## Contributing\n\n1. Fork the project\n2. Create a feature branch (`git checkout -b feature/new-feature`)\n3. Commit your changes (`git commit -am 'Add new feature'`)\n4. Push to the branch (`git push origin feature/new-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Support\n\nFor technical support or questions about AI Connect Jobs:\n- Check the [API documentation](docs/agent-jobs-api.md)\n- Contact the AI Connect development team\n\n---\n\n**Note**: This project was developed using the Anthropic mcp-tools scaffold for integration with the AI Connect platform.\n","readmeFilename":"README.md"}