Add MCP server for AI assistant integration#273
Merged
vpetersson merged 7 commits intomasterfrom Jan 14, 2026
Merged
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.
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
approved these changes
Jan 13, 2026
Contributor
renatgalimov
left a comment
There was a problem hiding this comment.
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
sergey-borovkov
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: