@init-computer/mcp 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # Init MCP
2
+
3
+ Use Init from any MCP-compatible assistant or development tool. Init turns a natural-language request into a deployed backend endpoint or project and returns structured JSON with routes, schemas, versions, and results.
4
+
5
+ Documentation: [Init.computer](https://init.computer)
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @init-computer/mcp
11
+ ```
12
+
13
+ Requires Node.js 18 or later.
14
+
15
+ ## Configure authentication
16
+
17
+ The MCP server is stateless and reads the API key from its process environment. It never stores the key itself:
18
+
19
+ ```bash
20
+ export INIT_API_KEY=init_sk_...
21
+ export INIT_API_BASE_URL=https://api.init.computer
22
+ ```
23
+
24
+ Keep the key in the MCP client's secret/environment configuration, not in a prompt or checked-in file.
25
+
26
+ ## Register with an MCP client
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "init": {
32
+ "command": "init-mcp",
33
+ "env": {
34
+ "INIT_API_KEY": "init_sk_...",
35
+ "INIT_API_BASE_URL": "https://api.init.computer"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ Run the server directly for a stdio client:
43
+
44
+ ```bash
45
+ init-mcp
46
+ ```
47
+
48
+ ## Tools
49
+
50
+ ### `init_generate`
51
+
52
+ Create an endpoint, or create a new version of an existing endpoint with `resource_id`.
53
+
54
+ ```json
55
+ {
56
+ "prompt": "Create an API that reviews source code for security issues.",
57
+ "resource_id": "optional-resource-id",
58
+ "projects": ["Security"]
59
+ }
60
+ ```
61
+
62
+ ### `init_generate_project`
63
+
64
+ Create a project and a cohesive endpoint suite.
65
+
66
+ ```json
67
+ {
68
+ "name": "Customer Support",
69
+ "prompt": "Build ticket intake and status lookup."
70
+ }
71
+ ```
72
+
73
+ ### `init_edit_project`
74
+
75
+ Add endpoints or create new endpoint versions in an existing project.
76
+
77
+ ```json
78
+ {
79
+ "project_id": "project_uuid",
80
+ "prompt": "Add ticket assignment."
81
+ }
82
+ ```
83
+
84
+ ### `init_run`
85
+
86
+ Call a generated endpoint by route, `/vN/...` path, or full URL.
87
+
88
+ ```json
89
+ {
90
+ "route": "abc123",
91
+ "version": 1,
92
+ "input": { "topic": "sports players" },
93
+ "requestFormat": "json"
94
+ }
95
+ ```
96
+
97
+ ### `init_list_resources`
98
+
99
+ List the authenticated user's generated resources. Optional filters such as `q` and `status` are passed through.
100
+
101
+ ```json
102
+ { "q": "sales", "status": "enabled" }
103
+ ```
104
+
105
+ ### `init_get_resource`
106
+
107
+ Fetch one resource by id:
108
+
109
+ ```json
110
+ { "id": "resource_uuid" }
111
+ ```
112
+
113
+ ### `init_list_packages`
114
+
115
+ Inspect available runtime packages and enabled connections. Filter by `category`, for example `Database` or `Storage`.
116
+
117
+ ```json
118
+ { "category": "Database" }
119
+ ```
120
+
121
+ ## Protocol behavior
122
+
123
+ The server uses MCP stdio transport and returns JSON text content for every tool call. It does not upload local files, read repository secrets, or manage a local project directory. Use the CLI for terminal workflows and the SDK for application code.
package/bin/init-mcp.js CHANGED
@@ -14,7 +14,7 @@ const tools = [
14
14
  inputSchema: objectSchema({
15
15
  prompt: stringSchema("API to generate or edit."),
16
16
  resource_id: optionalStringSchema("Existing resource id when editing."),
17
- directories: arraySchema("Directory names to attach if they already exist."),
17
+ projects: arraySchema("Project names to attach if they already exist."),
18
18
  }, ["prompt"]),
19
19
  handler: (args) => client.generate(args),
20
20
  },
@@ -57,38 +57,6 @@ const tools = [
57
57
  inputSchema: objectSchema({ id: stringSchema("Resource id.") }, ["id"]),
58
58
  handler: ({ id }) => client.resource.get(id),
59
59
  },
60
- {
61
- name: "init_list_directories",
62
- description: "List flat Init directories.",
63
- inputSchema: freeObjectSchema("Optional directory filters."),
64
- handler: (args) => client.directory.list(args || {}),
65
- },
66
- {
67
- name: "init_list_daemons",
68
- description: "List Init daemon workflows.",
69
- inputSchema: freeObjectSchema("Optional daemon filters."),
70
- handler: (args) => client.daemon.list(args || {}),
71
- },
72
- {
73
- name: "init_create_daemon",
74
- description: "Create a daemon for an existing Init resource/version.",
75
- inputSchema: objectSchema({
76
- resource_id: stringSchema("Resource id."),
77
- version_id: stringSchema("Version id."),
78
- input: freeObjectSchema("Daemon input body."),
79
- interval_seconds: numberSchema("Interval in seconds."),
80
- max_runs: numberSchema("Optional max run count."),
81
- description: stringSchema("Optional daemon description."),
82
- schedule: stringSchema("Schedule type or label."),
83
- }, ["resource_id", "version_id", "input", "interval_seconds"]),
84
- handler: (args) => client.daemon.create(args),
85
- },
86
- {
87
- name: "init_run_daemon",
88
- description: "Run a daemon once immediately.",
89
- inputSchema: objectSchema({ id: stringSchema("Daemon id.") }, ["id"]),
90
- handler: ({ id }) => client.daemon.run(id),
91
- },
92
60
  {
93
61
  name: "init_list_packages",
94
62
  description: "List package catalog entries and packages enabled for the user.",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@init-computer/mcp",
3
- "version": "0.1.0",
4
- "description": "MCP server for Init generated backend APIs.",
3
+ "version": "0.1.2",
4
+ "description": "Init is a programmable backend platform available through MCP for generating and running backend APIs.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "init-mcp": "./bin/init-mcp.js"
8
8
  },
9
9
  "dependencies": {
10
- "@init-computer/sdk": "^0.1.3"
10
+ "@init-computer/sdk": "0.1.5"
11
11
  },
12
12
  "engines": {
13
13
  "node": ">=18"