Add analytics events for initialization and list* method calls (#332)

Initially this started as a desire to get metrics for how many clients ever even do the initialization handshake with the MCP server, but I did end up also adding metrics for all the `list*` methods, which will help us understand better if clients support features like prompts and resources (which we can infer from their usage of these methods).

Overall here the goal is to try and understand how many users are setting up the MCP server but never interacting with it - as well as get a better idea of real support for various features from various real world clients.

**dart_mcp changes:**

Exposes various private methods as public methods so that calls can be intercepted, but adds `@mustCallSuper` to these as they are not intended to be completely overridden, it just provides a hook to do additional logic.

Also prepares to publish dart_mcp version 0.4.1 with those changes.
12 files changed
tree: bcd27441755aba6430c7ae7bedad9af549798b3d
  1. .github/
  2. .vscode/
  3. mcp_examples/
  4. pkgs/
  5. .gitignore
  6. CONTRIBUTING.md
  7. GEMINI.md
  8. LICENSE
  9. README.md
README.md

Overview

A general repository for AI / GenAI packages and explorations.

Packages

PackageDescriptionIssuesVersion
dart_mcpA package for making MCP servers and clients.issuespub package
dart_mcp_serverAn MCP server for Dart projects, exposing various developer tools to AI models.issuesn/a