straw-mcp
A Dart implementation of the Model Context Protocol (MCP), enabling seamless integration between Dart/Flutter applications and LLM services.
Install / Use
claude mcp add szktty -- npx -y github:szktty/straw-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Our assessment of straw-mcp
straw-mcp scores 73/100 on our quality scale, 878th of 978 AI & Machine Learning skills we index.
Its MCP Server is 8.1 KB long, well organised into 9 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
It has 9 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 1.5 years ago. Expect some instructions to reference tool versions or APIs that have since changed.
- Our last check on 2026-09-10 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 80/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
straw-mcp compared with similar skills
All 4 of these similar skills score higher than straw-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| straw-mcp (this skill)by szktty | 73 | 9 | 19mo ago | MCP Server |
| claude-memby thedotmack | 100 | 99.7k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 95.9k | 3d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 85.9k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.1k | today | CLAUDE.md |
Frequently asked questions
- How do I install straw-mcp?
- Run
claude mcp add szktty -- npx -y github:szktty/straw-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does straw-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is straw-mcp safe to use?
- It is Apache-2.0-licensed and scores 80/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is straw-mcp still maintained?
- The repository was last updated about 1.5 years ago. Expect some instructions to reference tool versions or APIs that have since changed.
Skill content
View source on GitHubStrawMCP: MCP Dart SDK
A Dart implementation of the Model Context Protocol (MCP), enabling seamless integration between Dart/Flutter applications and LLM services.
Note: This SDK is currently experimental and under active development. APIs are subject to change.
Supported Features
Currently, the following features are supported:
- MCP client functionality (sending requests to MCP servers)
- MCP server functionality (implementing a server in Dart applications)
- Tool registration and execution
- Resource management
- Prompt management
- stdio communication (communication via standard input/output)
- HTTP+SSE communication (basic implementation)
Documentation for LLMs
doc/llms-full.txt contains the full documentation for LLMs using the MCP Dart SDK.
Installation
Install the package with the following command:
dart pub add straw_mcp
Or add the following to your pubspec.yaml:
dependencies:
straw_mcp: ^0.5.0 # Specify the latest version
Examples
For detailed examples, please refer to the example/ directory.
Quick Start
Implementing an MCP Server
import 'dart:io';
import 'package:logging/logging.dart';
import 'package:straw_mcp/straw_mcp.dart';
void main() async {
// Set up logging
Logger.root.level = Level.INFO;
Logger.root.onRecord.listen((record) {
stderr.writeln('${record.level.name}: ${record.time}: ${record.message}');
});
final logger = Logger('ServerExample');
// Create a server
final server = ProtocolHandler(
'example-server',
'1.0.0',
[
withToolCapabilities(listChanged: true),
withResourceCapabilities(subscribe: false, listChanged: true),
withPromptCapabilities(listChanged: true),
withLogging(),
withInstructions('This is an example MCP server with tools, resources, and prompts.'),
],
logger,
);
// Add a tool
server.addTool(
newTool('calculator', [
withDescription('Simple calculator'),
withNumber('a', [required(), description('First operand')]),
withNumber('b', [required(), description('Second operand')]),
withString('operation', [
required(),
description('Operation to perform'),
enumValues(['add', 'subtract', 'multiply', 'divide']),
]),
]),
(request) async {
final args = request.params['arguments'] as Map<String, dynamic>;
final a = (args['a'] as num).toDouble();
final b = (args['b'] as num).toDouble();
final operation = args['operation'] as String;
double result;
switch (operation) {
case 'add':
result = a + b;
break;
case 'subtract':
result = a - b;
break;
case 'multiply':
result = a * b;
break;
case 'divide':
if (b == 0) {
return newToolResultError('Cannot divide by zero');
}
result = a / b;
break;
default:
return newToolResultError('Unknown operation: $operation');
}
return newToolResultText('Result: $result');
},
);
// Add a resource
server.addResource(
Resource(
uri: 'example://greeting',
name: 'Greeting',
description: 'A simple greeting message',
mimeType: 'text/plain',
),
(request) async {
return [
TextResourceContents(
uri: 'example://greeting',
text: 'Hello, world!',
mimeType: 'text/plain',
),
];
},
);
// Add a prompt
server.addPrompt(
Prompt(
name: 'simple-greeting',
description: 'A simple greeting prompt',
arguments: [
PromptArgument(
name: 'name',
description: 'Name to greet',
required: true,
),
],
),
(request) async {
final args = request.params['arguments'] as Map<String, dynamic>? ?? {};
final name = args['name'] as String? ?? 'World';
return GetPromptResult(
messages: [
PromptMessage(
role: Role.user,
content: TextContent(
text: 'Please provide a warm greeting to $name.',
),
),
],
);
},
);
logger.info('Starting MCP server...');
// Start the server
await serveStdio(
server,
options: StreamServerOptions.stdio(logger: Logger('StreamServer')),
);
}
Using an MCP Client
import 'dart:io';
import 'package:logging/logging.dart';
import 'package:straw_mcp/straw_mcp.dart';
Future<void> main() async {
// Set up logging
Logger.root.level = Level.INFO;
Logger.root.onRecord.listen((record) {
stderr.writeln('${record.level.name}: ${record.time}: ${record.message}');
});
final logger = Logger('ClientExample');
// Create a client
final client = StreamClient(
options: StreamClientOptions.stdio(logger: Logger('StreamClient')),
);
try {
// Connect to the server
logger.info('Connecting to MCP server...');
await client.connect();
// Initialize
final initResult = await client.initialize(
InitializeRequest(
protocolVersion: latestProtocolVersion,
capabilities: ClientCapabilities(),
clientInfo: Implementation(
name: 'example-client',
version: '1.0.0',
),
),
);
logger.info('Connected to server: ${initResult.serverInfo.name} ${initResult.serverInfo.version}');
if (initResult.instructions != null) {
logger.info('Server instructions: ${initResult.instructions}');
}
// Register notification handler
client.onNotification((notification) {
final method = notification.notification.method;
logger.info('Received notification: $method');
});
// Get available tools
logger.info('Requesting tools...');
final toolsResult = await client.listTools(ListToolsRequest());
logger.info('Available tools: ${toolsResult.tools.map((t) => t.name).join(', ')}');
// Call a tool
if (toolsResult.tools.any((t) => t.name == 'calculator')) {
logger.info('Calling calculator tool...');
final callResult = await client.callTool(
CallToolRequest(
name: 'calculator',
arguments: {
'a': 5,
'b': 3,
'operation': 'add',
},
),
);
// Display the result
for (final content in callResult.content) {
if (content is TextContent) {
logger.info('Calculator result: ${content.text}');
}
}
}
// Get available resources
logger.info('Requesting resources...');
final resourcesResult = await client.listResources(ListResourcesRequest());
logger.info('Available resources: ${resourcesResult.resources.map((r) => r.uri).join(', ')}');
// Read a resource
if (resourcesResult.resources.any((r) => r.uri == 'example://greeting')) {
logger.info('Reading greeting resource...');
final readResult = await client.readResource(
ReadResourceRequest(uri: 'example://greeting'),
);
for (final content in readResult.contents) {
if (content is TextResourceContents) {
logger.info('Resource content: ${content.text}');
}
}
}
// Get available prompts
logger.info('Requesting prompts...');
final promptsResult = await client.listPrompts(ListPromptsRequest());
logger.info('Available prompts: ${promptsResult.prompts.map((p) => p.name).join(', ')}');
// Get a prompt
if (promptsResult.prompts.any((p) => p.name == 'simple-greeting')) {
logger.info('Getting simple-greeting prompt...');
final promptResult = await client.getPrompt(
GetPromptRequest(
name: 'simple-greeting',
arguments: {'name': 'John'},
),
);
for (final message in promptResult.messages) {
if (message.content is TextContent) {
logger.info('Prompt message: ${(message.content as TextContent).text}');
}
}
}
// Close the client
logger.info('Closing connection...');
await client.close();
logger.info('Connection closed');
} catch (e) {
logger.severe('Error: $e');
}
}
License
Apache License 2.0
Related Skills
claude-mem
99.7kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
95.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
85.9kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
75.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
