{"id":27876270,"url":"https://github.com/jhgaylor/dart-mcp-server-template","last_synced_at":"2025-06-24T09:08:45.624Z","repository":{"id":289996819,"uuid":"973036181","full_name":"jhgaylor/dart-mcp-server-template","owner":"jhgaylor","description":"A template for dart mcp servers","archived":false,"fork":false,"pushed_at":"2025-04-26T07:32:39.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T08:20:46.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhgaylor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-26T05:49:20.000Z","updated_at":"2025-04-26T07:32:42.000Z","dependencies_parsed_at":"2025-04-26T08:20:52.236Z","dependency_job_id":"43c2876f-1848-4a0f-abc3-f952f53df23a","html_url":"https://github.com/jhgaylor/dart-mcp-server-template","commit_stats":null,"previous_names":["jhgaylor/dart-mcp-server-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhgaylor%2Fdart-mcp-server-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhgaylor%2Fdart-mcp-server-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhgaylor%2Fdart-mcp-server-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhgaylor%2Fdart-mcp-server-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhgaylor","download_url":"https://codeload.github.com/jhgaylor/dart-mcp-server-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252429938,"owners_count":21746570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-05T02:45:27.936Z","updated_at":"2025-05-05T02:45:30.591Z","avatar_url":"https://github.com/jhgaylor.png","language":"Dart","funding_links":[],"categories":["Templates"],"sub_categories":["Development Tools"],"readme":"# Dart MCP Server Template\n\nA template repository for creating Dart server applications compatible with MCP (Model Control Protocol). This template provides a starting point with Docker configuration, server implementations, and basic project structure.\n\n## About This Template\n\nThis template includes:\n- A streamable HTTP server implementation for MCP\n- Docker configuration for easy deployment\n- Basic project structure with lib, bin, and test directories\n- Integration with the mcp_dart package\n\n## Project Structure and Features\n\n### Server Implementation\n- **bin/** - Contains executable Dart files to start the server via different transport methods:\n  - `dart bin/stdio_server.dart`: Start server with standard I/O transport.\n  - `dart bin/sse_server.dart`: Start server with Server-Sent Events transport.\n  - `dart bin/streamable_http_server.dart`: Start server with HTTP streaming transport.\n  - All these executables use the core server implementation defined in `lib/src/server.dart`.\n\n- **lib/src/server.dart** - Sets up a basic MCP server. This is where the bulk of your custom code will go.\n\n### In-Memory Stream Transport\nYou can connect a Dart client and server entirely in memory using the `IOStreamTransport`. [Here](https://github.com/leehack/mcp_dart/blob/main/example/iostream-client-server/simple.dart) is an end-to-end example.\n\n## Using This Template\n\nClone this repository and manually update the package name:\n\n```bash\ngit clone https://github.com/jhgaylor/dart-mcp-server-template.git my_new_mcp_server\ncd my_new_mcp_server\n\n# Update the package name throughout the codebase\nfind . -type f -name \"*.dart\" -o -name \"pubspec.yaml\" | xargs sed -i 's/dart_mcp_server_template/my_new_mcp_server/g'\n# Update the package name in the repository URL\nfind . -type f -name \"*.md\" -o -name \"Dockerfile\" | xargs sed -i 's/dart-mcp-server-template/my-new-mcp-server/g'\n# Rename the files\nfind . -type f -name \"*dart_mcp_server_template*\" | while read file; do mv \"$file\" \"${file//dart_mcp_server_template/my_new_mcp_server}\"; done\n\n# Remove the .git directory to start fresh\nrm -rf .git\n\n# Initialize a new git repository\ngit init\n```\n\nThen update the package name in pubspec.yaml and throughout the codebase.\n\n## Getting Started\n\nAfter creating your project from this template:\n\n1. Update the `pubspec.yaml` with your project details\n2. Modify the configuration in `lib/src/config.dart` as needed\n3. Implement your custom server logic\n4. Run the server using one of the provided entrypoints:\n   - `dart bin/stdio_server.dart` (Standard I/O)\n   - `dart bin/sse_server.dart` (Server-Sent Events)\n   - `dart bin/streamable_http_server.dart` (HTTP streaming)\n\n## Docker Deployment\n\nThis template includes a Dockerfile for easy containerization:\n\n```bash\n# Build the Docker image\ndocker build -t my-mcp-server .\n\n# Run the container\ndocker run -p 3000:3000 my-mcp-server\n```\n\n## License\n\nThis template is released under the MIT License. When you generate your own application from this template, you are free to choose any license for your project; the template does not impose a specific license on your generated code.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhgaylor%2Fdart-mcp-server-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhgaylor%2Fdart-mcp-server-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhgaylor%2Fdart-mcp-server-template/lists"}