AI Coding
MeshStream AI Coding materials help an AI editor work from the official SDK documentation. Web, Android, iOS / macOS, Windows, Flutter, React Native, and uni-app can use the same MCP and Skills workflow. Build, playback, and real P2P transfer evidence remain the source of truth for the result.
What it can do
AI Coding has two layers: MCP retrieves facts and creates a structured integration plan; Skills turn that plan into an editor workflow. Both use public documentation only. They do not read customer source files, accept SDK keys, or publish production changes on the user's behalf.
| Capability | MCP | Skills |
|---|---|---|
| Documentation, versions, and error lookup | Supported, with source URLs | Supported, with an official-docs-first workflow |
| Platform, framework, and player-aware integration plan | get_integration_plan | Identifies context from the project |
| Demo run / from-zero integration | Returns steps and acceptance checks | Supports Codex, Cursor, Claude Code, and CodeBuddy |
| Feature extension and troubleshooting | Returns public rules | Keeps the existing player and makes focused changes |
| Plans, quota, and usage rules | get_billing_guidance | Links to the public pricing page and console |
| Platform capabilities and acceptance boundaries | get_platform_matrix | Selects setup, demo, and validation scope by platform |
Configure MCP
Add this entry to the existing mcpServers object in an MCP-capable editor:
{
"meshstream-docs": {
"command": "npx",
"args": ["--yes", "@meshstream/docs-mcp@0.6.2"]
}
}
Then ask:
Call get_integration_plan with mode=from-zero for a Vue 3 + hls.js + HLS VOD project. Produce the smallest MeshStream integration, keep CDN fallback, and list the evidence required for real two-client P2P acceptance.
Supported platforms
MCP uses platform, framework, player, and protocol to return the matching setup, integration, advanced usage, and acceptance sources. Skills identify the current project before selecting a public SDK; native projects are not silently reduced to a Web example.
| Platform | Projects | Official integration docs |
|---|---|---|
| Web | Vue, React, plain Web; hls.js, Shaka, dash.js | Web setup · integration |
| Android | Native Kotlin / Java apps | Android setup · integration |
| iOS / macOS | Swift / Objective-C, AVPlayer | Apple setup · integration |
| Windows | C++ / native Windows players | Windows setup · integration |
| Flutter | Flutter/Dart using native iOS and Android SDKs | Flutter setup · integration |
| React Native | React Native using native iOS and Android SDKs | React Native setup · integration |
| uni-app | Vue 3 + UTS, custom base or cloud build | uni-app setup · integration |
For example, ask MCP for a non-Web plan:
Call get_integration_plan with platform=android, framework=Kotlin, player=Media3, protocol=HLS, mode=from-zero.
Return dependencies, player wiring, the Android loopback proxy configuration, CDN fallback, and P2P upload/download byte evidence from two real Android devices.
Quick start
Open Codex, Cursor, Claude Code, or CodeBuddy at the project root and paste this task:
Integrate the MeshStream SDK into the current project.
Follow this order:
1. Identify the target platform, framework, player, media protocol, package manager, and playback lifecycle.
2. Read the official MeshStream setup, integration, statistics, and troubleshooting docs for that platform.
3. Use an exact SDK version available from a public channel. Do not invent APIs, versions, or options.
4. Keep the existing player, origin, CDN, DRM, and application authentication; use the platform's local playback proxy on native clients.
5. Keep CDN fallback and release the MeshStream session when playback ends, the source changes, the page is hidden, or a native controller is destroyed.
6. Run the project's existing build and test commands after editing; prefer a real device for mobile validation.
7. Report the target platform, changed files, exact SDK version, build/playback results, and unverified device or network conditions.
If no playable media URL or SDK key is available, list what I need to provide. Do not write credentials into source files.
Native and cross-platform integration task
Android, iOS / macOS, Windows, Flutter, React Native, and uni-app use the same task modes, while retaining their platform player lifecycle:
Integrate MeshStream into the current project:
- Identify the platform, framework, player, media protocol, and current playback controller first.
- Use the exact public version from the matching platform setup and integration pages.
- Keep the existing player, DRM, ABR, origin authentication, and CDN fallback; do not move Web APIs or Service Worker code into a native client.
- Use the SDK's local playback proxy on Android and iOS / macOS, and apply the documented network security configuration.
- Flutter, React Native, and uni-app must use published native dependencies, never local AARs, Pods, or internal source paths.
- For Windows, follow the official C++ headers, libraries, and player example, and verify x64 architecture and release cleanup.
- Release the session and connections on source changes, backgrounding, playback end, and controller destruction.
- Run builds and unit tests, then verify playback, P2P upload/download bytes, and CDN fallback on real devices or the target architecture.
Report platform, dependency versions, changed files, build result, device/OS, two-client P2P byte evidence, fallback result, and unexecuted checks.
Published tools
The current tool release is 0.6.2, adding structured integration planning, public billing guidance, and CodeBuddy support:
@meshstream/agent-skills: installs integration, troubleshooting, and P2P acceptance rules for Codex, Cursor, Claude Code, or CodeBuddy.@meshstream/docs-mcp: a read-only official documentation MCP that does not read customer project files or perform production actions.
Install the editor rules from the project root:
npx --yes @meshstream/agent-skills@0.6.2 add --ide codex
npx --yes @meshstream/agent-skills@0.6.2 add --ide codebuddy
How to use the skill in each editor
Run the command from your application project root. It writes project-local rules only; it does not upload source code or read credentials. Reopen the project or start a new chat so the editor loads the rule:
| Editor | Install command | Generated file | How to use it |
|---|---|---|---|
| Codex | npx --yes @meshstream/agent-skills@0.6.2 add --ide codex | .codex/skills/meshstream-sdk-integration/SKILL.md | Describe the integration, troubleshooting, or acceptance task in the project |
| Cursor | npx --yes @meshstream/agent-skills@0.6.2 add --ide cursor | .cursor/rules/meshstream-sdk-integration.mdc | Start a new Chat; enable the rule in Rules when it is not already active |
| Claude Code | npx --yes @meshstream/agent-skills@0.6.2 add --ide claude | .claude/skills/meshstream-sdk-integration/SKILL.md | Start a new session or invoke /meshstream-sdk-integration |
| CodeBuddy | npx --yes @meshstream/agent-skills@0.6.2 add --ide codebuddy | .codebuddy/skills/meshstream-sdk-integration/SKILL.md | Restart the project session and describe the task |
Install all editor rules at once:
npx --yes @meshstream/agent-skills@0.6.2 add --ide all --project .
Existing rules are preserved. Add --force only when you explicitly want to replace them. Then start with:
Read the MeshStream SDK integration skill. Identify this project as Android + Kotlin + Media3,
then call get_integration_plan for a from-zero plan. Do not apply Web APIs; after building, report
real-device P2P upload/download bytes, CDN fallback, and release evidence.
Add this to an MCP-capable editor configuration:
{
"mcpServers": {
"meshstream-docs": {
"command": "npx",
"args": ["--yes", "@meshstream/docs-mcp@0.6.2"]
}
}
}
Web playback integration task
You can also request demo, troubleshooting, feature-extension, or docs mode. Every mode must report actual runtime evidence; generated code alone is not a completed integration.
Use this task for Vue, React, or plain Web projects:
Integrate MeshStream into the current Web playback page.
- Player: identify the actual player from the project, such as hls.js, Shaka, or dash.js.
- Protocol: identify HLS or DASH from the actual media source.
- Use a stable contentId. Do not use a long-lived signed URL as the content identity.
- Read the SDK key from an environment variable. Do not commit it, log it, or render it in page source.
- Keep the existing ABR, DRM, origin headers, and player lifecycle.
- Fall back to CDN when acceleration initialization, Tracker, or a Peer request fails.
- Call the appropriate dispose/release method on page hide, source change, and player destruction.
Report changed files and dependency versions, build/test results, CDN playback, real P2P transfer evidence, and any untested device or network cases.
P2P acceptance task
Peer count alone proves that a connection exists. Use two playback clients with the same content identity and record bytes on both sides:
Run a two-client MeshStream P2P acceptance test:
1. Start the sender and cache at least one shareable segment.
2. Start the receiver with the same contentId, quality, and media content.
3. Record timestamped Peer count, P2P download bytes, P2P upload bytes, CDN bytes, and rebuffer count.
4. Report real transfer as passed only when receiver P2P download bytes and sender P2P upload bytes both increase for the same test.
5. Stop or block P2P and verify that playback continues through CDN.
6. Dispose both sessions and verify that WebSockets, Peers, listeners, and timers are released.
Separate passed, failed, blocked, and unexecuted checks. Do not use Peer > 0 as the transfer result.
Troubleshooting task
Troubleshoot a MeshStream session that plays normally but has no P2P transfer:
1. Check SDK key, application state, quota, and bootstrap response.
2. Check contentId, protocol, quality, and swarm identity.
3. Check Tracker WebSocket handshake, announce, and Peer discovery timing.
4. Check WebRTC, ICE, browser permissions, and network restrictions.
5. Check whether a P2P segment was actually selected and whether CDN fallback works after a timeout.
6. Check that dispose releases connections and timers.
Report evidence, conclusion, and next action for every step. Do not hide the issue by disabling diagnostics.
Version and credential rules
- Use only versions listed in Choose your SDK and the corresponding setup page.
- Keep SDK keys in local environment variables or restricted runtime configuration.
- Do not paste signed media URLs, Authorization headers, Cookies, SecretKeys, or production logs into an AI conversation.
- Generated code must pass build, playback, real transfer, CDN fallback, and release checks before production use.
- See the MeshStream AI Tools repository for source and release records.