Commit 38a1ec8
authored
Add MCP server for AI assistant integration (#273)
* Add MCP server for AI assistant integration
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
* Bumps version
* Rebuild docs
* roll back changes
* Fixes nightly linting
* Improve CLI documentation and help text consistency
- 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
* Fixes linting1 parent d200c21 commit 38a1ec8
24 files changed
Lines changed: 3160 additions & 1402 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
70 | 121 | | |
71 | 122 | | |
72 | 123 | | |
| |||
0 commit comments