MCPInstall
mcp_dart_codegen logo

mcp_dart_codegen

by nelsoncampos-cloudwalk 3 stars nelsoncampos-cloudwalk/mcp_dart_codegen

A mono-repo for generating Dart servers from MCP annotations.

READMEmain

MCP Dart Codegen

A collection of packages that turn Model Context Protocol (MCP) annotations into fully-functional Dart servers and tool descriptors.

This repository is a mono-repo that hosts:

PackageDescription
packages/mcp_annotationsCompile-time annotations (e.g. @MCPTool, @MCPServerApp) used to describe MCP servers and tools.
packages/mcp_codegenA build_runner generator that converts the annotations above into:

An example server that demonstrates these packages in action can be found under examples/demo_server.


Quick start

Add both packages to your own project:

# pubspec.yaml
name: my_app

dependencies:
  mcp_annotations: ^0.1.0

dev_dependencies:
  build_runner: ^2.4.0
  mcp_codegen: ^0.1.0

Annotate your functions / classes and run the generator:

# One-shot build
$ dart run build_runner build

# Or keep it running during development
$ dart run build_runner watch

Generated .mcp.g.dart files will contain the server entry-points, handler glue code, and JSON descriptors expected by MCP tooling.


Repository layout

├── examples/             # Example projects that consume the packages
│   └── demo_server/
├── packages/             # Published Dart packages
│   ├── mcp_annotations/
│   └── mcp_codegen/
├── .github/
└── ...

Development

  1. Clone the repo and get dependencies:

    $ git clone git@github.com:nelsoncampos-cloudwalk/mcp_dart_codegen.git
    $ cd mcp_dart_codegen
    $ dart pub get
    
  2. Format & analyse:

    $ dart format .
    $ dart analyze
    
  3. Run tests:

    $ dart test ./packages/...  # or run from individual package folders
    
  4. Make your changes following the contribution guidelines and open a pull-request.


Contributing

We ❤️ pull-requests! Please read CONTRIBUTING.md for details on our coding standards, commit conventions, and release process.


License

This project is licensed under the terms of the Apache 2.0 License.

More Developer Tools MCP servers

Similar servers from the same category.

Sourcebot

sourcebot-dev

Enables code search across multiple repository hosts including GitHub, GitLab, Gitea, Gerrit, and Bitbucket with advanced filtering options for exploring large codebases through natural language queries.

searchgit

CodeAlive

codealive-ai

Provides a bridge to CodeAlive's platform for semantic code search, repository exploration, and context-aware chat completions that leverage deep understanding of entire codebases including documentation and dependencies.

search

Provides a secure, sandboxed environment for executing Python, Node.js, and shell commands in ephemeral containers with file management capabilities for code testing, visualization, and data analysis.

filesystemdatabase

NovaCV

lightbaby

Integrates with NovaCV API to generate, analyze, and convert resumes in various formats without dealing with complex document formatting

PDFSupport+5