-
Notifications
You must be signed in to change notification settings - Fork 6
Add MCP server for AI assistant integration #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Implement a Model Context Protocol (MCP) server as a new subcommand (`screenly mcp`) that exposes the Screenly v4 API as tools for AI assistants like Claude, Cursor, and others. Features: - 31 MCP tools covering screens, assets, playlists, labels, and Edge Apps - Stdio transport for seamless AI assistant integration - Reuses existing CLI authentication (API_TOKEN env var or ~/.screenly) - Comprehensive test coverage with 35 new unit tests New files: - src/mcp/mod.rs - Module structure - src/mcp/server.rs - MCP server handler with tool definitions - src/mcp/tests.rs - Unit tests for all tools - src/mcp/tools/*.rs - Tool implementations for each API resource Dependencies: - Add rmcp 0.12 (MCP SDK) and schemars 0.8 (JSON Schema) - Update sentry 0.42 -> 0.46, simple_logger 4 -> 5 - Update dev deps: httpmock 0.6 -> 0.8, swc_common 14 -> 18, swc_ecma_parser 24 -> 32 Other changes: - Update httpmock API calls (body_contains -> body_includes, assert_hits -> assert_calls) - Remove unused SettingValue struct in edge_app/setting.rs - Comment out nightly-only rustfmt options to avoid warnings - Update README with MCP documentation and configuration examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a Model Context Protocol (MCP) server as a new subcommand (screenly mcp) that exposes the Screenly v4 API as tools for AI assistants like Claude and Cursor.
Changes:
- Added 31 MCP tools across screens, assets, playlists, labels, and Edge Apps with stdio transport
- Integrated rmcp 0.12 and schemars 0.8 dependencies for MCP functionality
- Updated several dependencies (sentry 0.42→0.46, simple_logger 4→5, httpmock 0.6→0.8, swc packages)
- Added comprehensive test coverage with 35 unit tests
- Updated httpmock API usage and removed unused code
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/mcp/mod.rs | Module structure for MCP server |
| src/mcp/server.rs | Main MCP server handler with 31 tool definitions |
| src/mcp/tests.rs | Unit tests for all MCP tools |
| src/mcp/tools/*.rs | Tool implementations for each API resource (screens, assets, playlists, labels, edge apps) |
| src/main.rs | Added mcp module import |
| src/cli.rs | Added Mcp subcommand and handler function |
| Cargo.toml | Added MCP dependencies and updated versions |
| README.md | Added MCP documentation and configuration examples |
| rustfmt.toml | Commented out nightly-only options |
| src/commands/edge_app/setting.rs | Removed unused SettingValue struct |
| src/commands/edge_app/app.rs | Updated httpmock API calls |
| src/commands/playlist.rs | Updated httpmock API calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
renatgalimov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but I'd like to get @sergey-borovkov's review too.
- Fix grammar issues in command descriptions:
- "Logins/Logouts" → "Logs in/Logs out"
- Add missing articles ("a web asset", "an Edge App")
- Fix verb tenses ("release it" → "releases it")
- Standardize "Edge App" title-casing across all user-facing messages
- Error messages, success messages, and help text now consistently
use "Edge App" instead of "edge app"
- Improve help text clarity:
- "If not specified CLI will use..." → "Defaults to..."
- "Shortcut for setting up..." → "Sets up..."
- Clearer parameter descriptions
- Add predicate DSL documentation to MCP server instructions
- Documents $DATE, $TIME, $WEEKDAY variables
- Includes operator reference and common examples
- Adds time reference values (9AM, 12PM, 5PM in milliseconds)
- Update docs/CommandLineHelp.md to reflect all help text changes
Implement a Model Context Protocol (MCP) server as a new subcommand (
screenly mcp) that exposes the Screenly v4 API as tools for AI assistants like Claude, Cursor, and others.Features:
New files:
Dependencies:
Other changes: