{"_id":"@egyleader/dart-mcp-server","_rev":"4-99084ae00f12519d983a5f0284e34d53","name":"@egyleader/dart-mcp-server","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@egyleader/dart-mcp-server","version":"1.0.0","keywords":["dart","mcp","codium","windsurf","cli","modelcontextprotocol"],"author":{"name":"Ahmed Osama"},"license":"MIT","_id":"@egyleader/dart-mcp-server@1.0.0","maintainers":[{"name":"egyleader","email":"ahmed.os.attya@gmail.com"}],"bin":{"dart-mcp-server":"dist/index.js"},"dist":{"shasum":"3ae24e2156b6dc7b512a4306aaf845874eca0288","tarball":"https://registry.npmjs.org/@egyleader/dart-mcp-server/-/dart-mcp-server-1.0.0.tgz","fileCount":45,"integrity":"sha512-HgxZ1MphhzXKy78bxEXtqhx62i4V/NMSGcNoblWQmG+m9d0hkC01owEOP2Zx8qB7LiFQVk2SQwtmkdQIWQsh9Q==","signatures":[{"sig":"MEUCIQCobwWXNINvnI7XIAYGh0pfFwoffUudDqOrq7vl9F6YjAIgTL93/4W4AA7JeOklpIKFk1EkFPrH7KpdX/dbvkEBikM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59440},"main":"dist/index.js","type":"module","_from":"file:egyleader-dart-mcp-server-1.0.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc -w","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"egyleader","email":"ahmed.os.attya@gmail.com"},"_resolved":"/private/var/folders/7m/z9v0dr3j4b91bc2k1sqynwjc0000gn/T/da0e84dab1676728a467fb380cef9300/egyleader-dart-mcp-server-1.0.0.tgz","_integrity":"sha512-HgxZ1MphhzXKy78bxEXtqhx62i4V/NMSGcNoblWQmG+m9d0hkC01owEOP2Zx8qB7LiFQVk2SQwtmkdQIWQsh9Q==","_npmVersion":"10.2.4","description":"MCP server for Dart SDK commands","directories":{},"_nodeVersion":"20.11.1","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.9"},"_npmOperationalInternal":{"tmp":"tmp/dart-mcp-server_1.0.0_1741474177583_0.603820432455787","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@egyleader/dart-mcp-server","version":"1.0.1","keywords":["dart","mcp","codium","windsurf","cli","modelcontextprotocol"],"author":{"name":"Ahmed Osama"},"license":"MIT","_id":"@egyleader/dart-mcp-server@1.0.1","maintainers":[{"name":"egyleader","email":"ahmed.os.attya@gmail.com"}],"bin":{"dart-mcp-server":"dist/index.js"},"dist":{"shasum":"cee0b47559ee46b38061c43fcb03c5698e0aad93","tarball":"https://registry.npmjs.org/@egyleader/dart-mcp-server/-/dart-mcp-server-1.0.1.tgz","fileCount":45,"integrity":"sha512-4fLQ/bYnllzTq449fI/uHXrAQJ7ZAXkPyiJXyulhj+HKio5IeRZzGfWWSlWvYpQZNZUXzMuDxs2dL9565sPDCA==","signatures":[{"sig":"MEUCIQC0d4ioyKxPWqFdilLPNRcC/pDgy/rCA3+cei6X9qaYaQIgS4usS5RlK0L18GyjsWjtlBN9Fb/xMWt5/ceU6pL6w08=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59781},"main":"dist/index.js","type":"module","_from":"file:egyleader-dart-mcp-server-1.0.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc -w","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"egyleader","email":"ahmed.os.attya@gmail.com"},"_resolved":"/private/var/folders/7m/z9v0dr3j4b91bc2k1sqynwjc0000gn/T/8557fd1b75435fb34955d5ccc91dc718/egyleader-dart-mcp-server-1.0.1.tgz","_integrity":"sha512-4fLQ/bYnllzTq449fI/uHXrAQJ7ZAXkPyiJXyulhj+HKio5IeRZzGfWWSlWvYpQZNZUXzMuDxs2dL9565sPDCA==","_npmVersion":"10.2.4","description":"MCP server for Dart SDK commands","directories":{},"_nodeVersion":"20.11.1","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.9"},"_npmOperationalInternal":{"tmp":"tmp/dart-mcp-server_1.0.1_1741528307543_0.6933479997966152","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@egyleader/dart-mcp-server","version":"1.0.2","keywords":["dart","mcp","codium","windsurf","cli","modelcontextprotocol"],"author":{"name":"Ahmed Osama"},"license":"MIT","_id":"@egyleader/dart-mcp-server@1.0.2","maintainers":[{"name":"egyleader","email":"ahmed.os.attya@gmail.com"}],"bin":{"dart-mcp-server":"dist/index.js"},"dist":{"shasum":"8f59c35e73ceb40dc2d31bc37a916d449334a073","tarball":"https://registry.npmjs.org/@egyleader/dart-mcp-server/-/dart-mcp-server-1.0.2.tgz","fileCount":45,"integrity":"sha512-q0S4pcPymR2ePAUhewMA13fo31b+nhV8Ntg1bng+Yq8qMsig9lyHljadjoXDn8w4q5WE+iOP+PZy0ETey4ORng==","signatures":[{"sig":"MEYCIQDC/cqg8zMqvCshYTt9Pa87LA2fbpX0WX+pZ8IDxigt7QIhALoKs5VeC4QnFZ1RLTz358V9QRJMr9K9d9SNVBZhs47A","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61011},"main":"dist/index.js","type":"module","_from":"file:egyleader-dart-mcp-server-1.0.2.tgz","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc -w","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"egyleader","email":"ahmed.os.attya@gmail.com"},"_resolved":"/private/var/folders/7m/z9v0dr3j4b91bc2k1sqynwjc0000gn/T/f5bcfd4d09d62cba1217b53c52e57772/egyleader-dart-mcp-server-1.0.2.tgz","_integrity":"sha512-q0S4pcPymR2ePAUhewMA13fo31b+nhV8Ntg1bng+Yq8qMsig9lyHljadjoXDn8w4q5WE+iOP+PZy0ETey4ORng==","_npmVersion":"10.2.4","description":"MCP server for Dart SDK commands","directories":{},"_nodeVersion":"20.11.1","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.9"},"_npmOperationalInternal":{"tmp":"tmp/dart-mcp-server_1.0.2_1741609301723_0.07022156395341783","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@egyleader/dart-mcp-server","version":"1.0.3","description":"MCP server for Dart SDK commands","main":"dist/index.js","type":"module","bin":{"dart-mcp-server":"dist/index.js"},"keywords":["dart","mcp","codium","windsurf","cli","modelcontextprotocol"],"author":{"name":"Ahmed Osama"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.6.1","zod":"^3.24.2"},"devDependencies":{"@types/jest":"^29.5.14","@types/node":"^22.13.9","jest":"^29.7.0","ts-jest":"^29.2.6","typescript":"^5.8.2"},"publishConfig":{"access":"public"},"engines":{"node":">=18.0.0"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsc -w","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage"},"types":"./dist/index.d.ts","_id":"@egyleader/dart-mcp-server@1.0.3","_integrity":"sha512-OExhWw1itAR+iM3qVCxk3C6PHIE3ko4wecWePSBPay1UfoevSc7oFoSATD2Db2+3O81k4JAWG+Sngsa6c6L9UA==","_resolved":"/private/var/folders/7m/z9v0dr3j4b91bc2k1sqynwjc0000gn/T/77e4256422266309e5106939f5c18725/egyleader-dart-mcp-server-1.0.3.tgz","_from":"file:egyleader-dart-mcp-server-1.0.3.tgz","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-OExhWw1itAR+iM3qVCxk3C6PHIE3ko4wecWePSBPay1UfoevSc7oFoSATD2Db2+3O81k4JAWG+Sngsa6c6L9UA==","shasum":"b747d4027ae9708ca398d159215c092a1a87a92c","tarball":"https://registry.npmjs.org/@egyleader/dart-mcp-server/-/dart-mcp-server-1.0.3.tgz","fileCount":45,"unpackedSize":59998,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIErBmuO+3TRHGgUrpW90nBoqvZAabmUhoqYN8b7Hi7PUAiAYIEL3IHl9BGFGInqOMfDN8HocWrY0YZEBWnTCKTSSWg=="}]},"_npmUser":{"name":"egyleader","email":"ahmed.os.attya@gmail.com"},"directories":{},"maintainers":[{"name":"egyleader","email":"ahmed.os.attya@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dart-mcp-server_1.0.3_1741686405301_0.4379940129229858"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-08T22:49:37.489Z","modified":"2025-03-11T09:46:46.073Z","1.0.0":"2025-03-08T22:49:37.786Z","1.0.1":"2025-03-09T13:51:47.722Z","1.0.2":"2025-03-10T12:21:41.893Z","1.0.3":"2025-03-11T09:46:45.592Z"},"author":{"name":"Ahmed Osama"},"license":"MIT","keywords":["dart","mcp","codium","windsurf","cli","modelcontextprotocol"],"description":"MCP server for Dart SDK commands","maintainers":[{"name":"egyleader","email":"ahmed.os.attya@gmail.com"}],"readme":"# Dart MCP Server\n\n[![npm version](https://img.shields.io/npm/v/@egyleader/dart-mcp-server.svg)](https://www.npmjs.com/package/@egyleader/dart-mcp-server)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nA distributable Model Context Protocol (MCP) server that exposes Dart SDK commands for AI-powered development. This server bridges the gap between AI coding assistants and Dart/Flutter development workflows by implementing the Model Context Protocol (MCP).\n\n## Features\n\nThis MCP server provides seamless access to the following Dart SDK commands:\n\n| Command | Description |\n|---------|-------------|\n| `dart-analyze` | Analyze Dart code for errors, warnings, and lints |\n| `dart-compile` | Compile Dart to various formats (exe, AOT/JIT snapshots, JavaScript) |\n| `dart-create` | Create new Dart projects from templates |\n| `dart-doc` | Generate API documentation for Dart projects |\n| `dart-fix` | Apply automated fixes to Dart source code |\n| `dart-format` | Format Dart source code according to style guidelines |\n| `dart-info` | Show diagnostic information about the installed Dart tooling |\n| `dart-package` | Work with packages (get, add, upgrade, outdated, etc.) |\n| `dart-run` | Run Dart programs with support for passing arguments |\n| `dart-test` | Run tests with support for filtering and reporting options |\n\n### Key Benefits\n\n- **Intelligent Path Handling**: Automatically resolves relative paths to absolute paths, ensuring commands work correctly regardless of working directory\n- **Project Auto-Detection**: Identifies Dart/Flutter projects in common locations like home directories and workspaces\n- **Cross-Platform Support**: Works on macOS, Linux, and Windows\n- **Zero Configuration**: Works out of the box with sensible defaults\n- **MCP Integration**: Compatible with any MCP client, including Windsurf, Cline, and other Model Context Protocol implementations\n\n## Prerequisites\n\n- **Node.js**: 18.x or higher\n- **Dart SDK**: 3.0 or higher installed and available in your PATH\n\n## Installation\n\n### Using npx (recommended)\n\nThe server can be run directly without installation using npx:\n\n```bash\nnpx @egyleader/dart-mcp-server\n```\n\n### Global Installation\n\nFor easier access, you can install the server globally:\n\n```bash\nnpm install -g @egyleader/dart-mcp-server\n```\n\nThen run it using:\n\n```bash\ndart-mcp-server\n```\n\n### From Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/egyleader/dart-mcp-server.git\ncd dart-mcp-server\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run the server\nnode dist/index.js\n```\n\n## Integration with MCP Clients\n\n### Windsurf / Codeium IDE Configuration\n\nTo use this MCP server with Windsurf or Codeium IDE, add the following to your `mcp_config.json` file (typically located at `~/.codeium/windsurf/mcp_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"dart\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@egyleader/dart-mcp-server\"\n      ]\n    }\n  }\n}\n```\n\n### Environment Variables\n\n- `DART_MCP_VERBOSE`: Set to any value to enable verbose logging for debugging\n\n## MCP Tool Usage Examples\n\nHere are examples of how to use the MCP tools provided by the server. These examples show the parameters that can be passed to each tool.\n\n### dart-analyze\n\nAnalyze Dart code for errors, warnings, and lints:\n\n```json\n{\n  \"path\": \"lib/main.dart\",\n  \"options\": [\"--fatal-infos\", \"--fatal-warnings\"]\n}\n```\n\n### dart-compile\n\nCompile Dart code to various formats:\n\n```json\n{\n  \"path\": \"lib/main.dart\",\n  \"format\": \"exe\",\n  \"output\": \"build/app\",\n  \"options\": [\"--verbose\"]\n}\n```\n\nSupported formats: `exe`, `aot-snapshot`, `jit-snapshot`, `kernel`, `js`\n\n### dart-create\n\nCreate a new Dart project from a template:\n\n```json\n{\n  \"projectName\": \"my_awesome_app\",\n  \"template\": \"console\",\n  \"output\": \"projects/my_awesome_app\",\n  \"options\": [\"--force\"]\n}\n```\n\n**Note on projectName and output:**\n- If only `projectName` is provided, it's used as the directory name where the project is created.\n- If `output` is provided, it's used as the directory where the project is created.\n- The actual package/project name in Dart is derived from the final directory name by the Dart CLI.\n\nSupported templates: `console`, `package`, `server-shelf`, `web`\n\n### dart-doc\n\nGenerate API documentation for a Dart project:\n\n```json\n{\n  \"path\": \".\",\n  \"output\": \"doc\",\n  \"options\": [\"--exclude\", \"lib/generated\"]\n}\n```\n\n### dart-fix\n\nApply automated fixes to Dart source code:\n\n```json\n{\n  \"path\": \"lib\",\n  \"apply\": true,\n  \"options\": [\"--pedantic\"]\n}\n```\n\n### dart-format\n\nFormat Dart source code according to style guidelines:\n\n```json\n{\n  \"paths\": [\"lib/main.dart\", \"lib/models\"],\n  \"setExitIfChanged\": true,\n  \"options\": [\"--line-length=100\"]\n}\n```\n\n### dart-info\n\nShow diagnostic information about the installed Dart tooling:\n\n```json\n{\n  \"options\": [\"--verbose\"]\n}\n```\n\n### dart-package\n\nWork with packages (pub commands):\n\n```json\n{\n  \"command\": \"get\",\n  \"workingDir\": \".\",\n  \"args\": [\"--offline\"]\n}\n```\n\nSupported commands: `get`, `upgrade`, `outdated`, `add`, `remove`, `publish`, `deps`, `downgrade`, `cache`, `run`, `global`\n\n### dart-run\n\nRun Dart programs with support for passing arguments:\n\n```json\n{\n  \"script\": \"bin/server.dart\",\n  \"workingDir\": \".\",\n  \"args\": [\"--port=8080\", \"--mode=production\"]\n}\n```\n\n### dart-test\n\nRun tests with support for filtering and reporting options:\n\n```json\n{\n  \"path\": \"test\",\n  \"workingDir\": \".\",\n  \"options\": [\"--name=login\", \"--platform=chrome\"]\n}\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Tool API Reference\n\n### dart-analyze\n\nAnalyze Dart code in a directory or file.\n\n```typescript\n{\n  path?: string;       // Directory or file to analyze\n  options?: string[];  // Additional options for the dart analyze command\n}\n```\n\n**Example:**\n```typescript\n{\n  path: \"lib\",\n  options: [\"--fatal-infos\", \"--fatal-warnings\"]\n}\n```\n\n### dart-compile\n\nCompile Dart to various formats.\n\n```typescript\n{\n  format: 'exe' | 'aot-snapshot' | 'jit-snapshot' | 'kernel' | 'js'; // Output format\n  path: string;        // Path to the Dart file to compile\n  output?: string;     // Output file path\n  options?: string[];  // Additional compilation options\n}\n```\n\n**Example:**\n```typescript\n{\n  format: \"exe\",\n  path: \"bin/main.dart\",\n  output: \"bin/app\"\n}\n```\n\n### dart-create\n\nCreate a new Dart project.\n\n```typescript\n{\n  template: 'console' | 'package' | 'server-shelf' | 'web'; // Project template\n  projectName: string; // Name of the project to create\n  output?: string;     // Directory where to create the project\n  options?: string[];  // Additional project creation options\n}\n```\n\n**Note:**\n- If `output` is provided, the project will be created in that directory.\n- If only `projectName` is provided, it will be used as the directory name.\n- The actual Dart package name is derived from the final directory name.\n\n**Example:**\n```typescript\n{\n  template: \"package\",\n  projectName: \"my_dart_library\",\n  output: \"projects/my_dart_library\"\n}\n```\n\n### dart-doc\n\nGenerate API documentation for Dart projects.\n\n```typescript\n{\n  path?: string;       // Directory containing the Dart package to document\n  output?: string;     // Output directory for the generated documentation\n  options?: string[];  // Additional documentation options\n}\n```\n\n**Example:**\n```typescript\n{\n  path: \".\",\n  output: \"doc/api\"\n}\n```\n\n### dart-fix\n\nApply automated fixes to Dart source code.\n\n```typescript\n{\n  path?: string;       // Directory or file to apply fixes to\n  apply?: boolean;     // Whether to apply the suggested fixes (default: true)\n  options?: string[];  // Additional fix options\n}\n```\n\n**Example:**\n```typescript\n{\n  path: \"lib\",\n  apply: true,\n  options: [\"--pedantic\"]\n}\n```\n\n### dart-format\n\nIdiomatically format Dart source code.\n\n```typescript\n{\n  paths: string[];     // Files or directories to format\n  setExitIfChanged?: boolean; // Return exit code 1 if there are formatting changes (default: false)\n  options?: string[];  // Additional format options\n}\n```\n\n**Example:**\n```typescript\n{\n  paths: [\"lib\", \"test\"],\n  setExitIfChanged: true,\n  options: [\"--line-length=80\"]\n}\n```\n\n### dart-info\n\nShow diagnostic information about the installed tooling.\n\n```typescript\n{\n  options?: string[];  // Additional info options\n}\n```\n\n**Example:**\n```typescript\n{\n  options: [\"--verbose\"]\n}\n```\n\n### dart-package\n\nWork with packages (pub commands).\n\n```typescript\n{\n  command: 'get' | 'upgrade' | 'outdated' | 'add' | 'remove' | 'publish' | 'deps' | 'downgrade' | 'cache' | 'run' | 'global'; // Pub subcommand\n  args?: string[];     // Arguments for the pub subcommand\n  workingDir?: string; // Working directory for the command\n}\n```\n\n**Examples:**\n```typescript\n// Add a package\n{\n  command: \"add\",\n  args: [\"rxdart\"],\n  workingDir: \"my_project\"\n}\n\n// Get dependencies\n{\n  command: \"get\",\n  workingDir: \"my_project\"\n}\n```\n\n### dart-run\n\nRun a Dart program.\n\n```typescript\n{\n  script: string;      // Path to the Dart script to run\n  args?: string[];     // Arguments to pass to the script\n  workingDir?: string; // Working directory for the command\n}\n```\n\n**Example:**\n```typescript\n{\n  script: \"bin/main.dart\",\n  args: [\"--verbose\"],\n  workingDir: \"my_project\"\n}\n```\n\n### dart-test\n\nRun tests for a project.\n\n```typescript\n{\n  path?: string;       // Path to the test file or directory\n  options?: string[];  // Additional test options\n  workingDir?: string; // Working directory for the command\n}\n```\n\n**Example:**\n```typescript\n{\n  path: \"test\",\n  options: [\"--coverage\", \"--name=auth\"],\n  workingDir: \"my_project\"\n}\n```\n\n## Development\n\n```bash\n# Watch mode for development\npnpm run dev\n\n# Build for production\npnpm run build\n```\n\n## Error Handling\n\nThe server implements comprehensive error handling:\n\n- Command execution errors are captured and formatted appropriately\n- Path resolution issues are reported with detailed diagnostics\n- Timeout handling for long-running operations\n- Proper exit code propagation from Dart commands\n\n## Contributing\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed contribution guidelines.\n\nOur commit format follows:\n```\n<type>[optional scope]: [JIRA-123(optional)] <description>\n```\n\nExample:\n```\nfeat(tools): [DART-456] add support for dart test tags\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}