Skip to content

Commit 690211e

Browse files
committed
feat: Skeleton for MCP server
1 parent 39c6251 commit 690211e

File tree

8 files changed

+567
-11
lines changed

8 files changed

+567
-11
lines changed

package-lock.json

Lines changed: 147 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@homebridge/node-pty-prebuilt-multiarch": "^0.12.0-beta.5",
99
"@inkjs/ui": "^2",
1010
"@mischnic/json-sourcemap": "^0.1.1",
11+
"@modelcontextprotocol/sdk": "^1.26.0",
1112
"@oclif/core": "^4.0.8",
1213
"@oclif/plugin-autocomplete": "^3.2.24",
1314
"@oclif/plugin-help": "^6.2.4",
@@ -39,7 +40,8 @@
3940
"parse-json": "^8.1.0",
4041
"react": "^18.3.1",
4142
"uuid": "^10.0.0",
42-
"ws": "^8.18.3"
43+
"ws": "^8.18.3",
44+
"zod": "^4.3.6"
4345
},
4446
"description": "Codify allows users to configure settings, install new packages, and automate their systems using code instead of the GUI. Check out https://dashboard.codifycli.com for an online editor.",
4547
"devDependencies": {

src/commands/mcp.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { BaseCommand } from '../common/base-command.js';
2+
import { startMcpServer } from '../mcp/index.js';
3+
4+
export default class Mcp extends BaseCommand {
5+
static description =
6+
`Run a MCP (model context protocol) server to allow LLMs to use Codify as a tool.
7+
8+
This command starts a Model Context Protocol (MCP) server that enables Large Language Models
9+
(LLMs) and AI assistants to interact with Codify programmatically. The server exposes Codify's
10+
functionality as tools that can be called by compatible MCP clients.
11+
12+
The MCP server allows LLMs to:
13+
- Resolve and read Codify configuration files
14+
- Generate execution plans for infrastructure changes
15+
- Apply infrastructure changes
16+
- Validate Codify configurations
17+
- Interact with Codify's full feature set through a standardized protocol
18+
19+
This is useful for integrating Codify with AI-powered development tools, IDEs, and
20+
automation platforms that support the Model Context Protocol.
21+
22+
For more information, visit: https://docs.codifycli.com/commands/mcp
23+
`
24+
25+
static flags = {}
26+
27+
static examples = [
28+
'<%= config.bin %> <%= command.id %>',
29+
]
30+
31+
public async run(): Promise<void> {
32+
await startMcpServer();
33+
}
34+
}

0 commit comments

Comments
 (0)