mcp_server
MCP server from app-appplayer/mcp_server
claude mcp add --transport stdio app-appplayer-mcp_server npx -y mcp_server
How to use
This MCP server is a Dart-based implementation of the Model Context Protocol (MCP). It exposes data and functionality to LLMs by serving data through Resources, enabling actions through Tools, and orchestrating interactions with Prompts. The server includes features such as session management, resource caching, logging, and multiple transport layers (including standard I/O and HTTP-based Server-Sent Events). To use it, start the server and connect your MCP clients (which could be Dart-based clients or other MCP-compliant clients) to the transport channel you choose. The repository demonstrates configuring the server with a simple calculator tool, a time resource, and a greeting prompt, illustrating how tools, resources, and prompts are defined and invoked by LLMs.
Once running, you can interact with the server by calling its Tools to perform operations, query Resources for data, and request Prompts to generate structured conversations or content. The included examples show how to wire a tool (calculator), a time resource, and a greeting prompt, and how to assemble a simple server using the unified API (McpServer.createAndStart) with a standard TransportConfig. This makes it straightforward to extend the server with additional Resources, Tools, and Prompts as your application needs evolve. You can also switch transports to SSE over HTTP for remote clients or continue using STDIO for local testing.
How to install
Prerequisites
- Dart SDK installed (https://dart.dev/get-dart)
- Basic Dart tooling (dart, pub) available in your environment
Step 1: Initialize your project (if needed)
- Create a new Dart project or use an existing one.
Step 2: Add the MCP server package
- In your pubspec.yaml, add:
dependencies: mcp_server: ^1.0.3
Step 3: Get dependencies
- Run:
dart pub get
Step 4: Run or integrate the MCP server
- You can run a simple server using the example patterns from the README, or integrate the MCP server package into your application code.
- Example usage (from README) demonstrates creating a Server, adding Tools, Resources, and Prompts, and starting via the unified API (McpServer.createAndStart) with a TransportConfig (stdio or SSE over HTTP).
Optional: Run a quick test script
- Create a Dart file (e.g., bin/run_mcp.dart) and implement a minimal server as shown in the README. Then run:
dart run bin/run_mcp.dart
Additional notes
Tips and common considerations:
- When extending the server, you can add more Tools, Resources, and Prompts following the patterns shown in the README example.
- Transport options include STDIO for local use, SSE over HTTP for remote clients, and other transports as supported by the MCP package. Choose the transport that best fits your deployment environment.
- Keep your protocol versions in sync with clients by referring to the MCP protocol versions listed in the README (e.g., 2024-11-05 and 2025-03-26).
- If you expose the server over HTTP, consider implementing authentication tokens for the SSE transport endpoint to secure access (the README shows an optional authToken in the transport config).
- Use the built-in logging, metrics, and session management features to monitor performance and behavior of Tools, Resources, and Prompts in production.
Related MCP Servers
chatmcp
ChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
mcp_flutter
MCP server and MCP Toolkit for Flutter and Dart VM - supports dynamic tooling
dart
Dart AI Model Context Protocol (MCP) server
cbn_mcp
A Model Context Protocol (MCP) server for accessing Central Bank of Nigeria (CBN) data and circulars. Connect this server to Cursor, Claude Desktop, or any MCP-compatible application to access CBN regulatory information directly in your AI conversations. 🚀
mcp_server_dart
A developer-friendly MCP (Model Context Protocol) framework for Dart with annotations and code generation. Build MCP servers as easily as annotating methods with @MCPTool, @MCPResource, or @MCPPrompt - similar to how json_serializable or freezed works.
straw
A Dart implementation of the Model Context Protocol (MCP), enabling seamless integration between Dart/Flutter applications and LLM services.