formlova-mcp 0.1.0
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/LICENSE +21 -0
- package/README.md +119 -0
- package/bin/formlova-mcp.mjs +179 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FORMLOVA
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# formlova-mcp
|
|
2
|
+
|
|
3
|
+
FORMLOVA MCP setup helper for Codex, Claude Code, Cursor, ChatGPT, and Gemini CLI.
|
|
4
|
+
|
|
5
|
+
## Main connection URL
|
|
6
|
+
|
|
7
|
+
Use this MCP server URL in any MCP-compatible client:
|
|
8
|
+
|
|
9
|
+
`https://formlova.com/api/mcp`
|
|
10
|
+
|
|
11
|
+
Reviewing setup instructions and registering the URL does not require a FORMLOVA account.
|
|
12
|
+
On first real use, you can log in or sign up during authentication.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
No install needed:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx formlova-mcp print --client all
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Project config write:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx formlova-mcp install --client all --scope project --yes
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Connectivity and local config check:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx formlova-mcp doctor
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Commands
|
|
35
|
+
|
|
36
|
+
### `print`
|
|
37
|
+
|
|
38
|
+
Print setup snippets only (no file write).
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx formlova-mcp print --client codex
|
|
42
|
+
npx formlova-mcp print --client claude-code
|
|
43
|
+
npx formlova-mcp print --client cursor
|
|
44
|
+
npx formlova-mcp print --client chatgpt
|
|
45
|
+
npx formlova-mcp print --client gemini-cli
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### `install`
|
|
49
|
+
|
|
50
|
+
Writes project-level setup files.
|
|
51
|
+
|
|
52
|
+
Supported writes:
|
|
53
|
+
|
|
54
|
+
- Codex: `.codex/config.toml`
|
|
55
|
+
- Claude Code: `.mcp.json`
|
|
56
|
+
- Cursor: `.cursor/mcp.json`
|
|
57
|
+
|
|
58
|
+
For ChatGPT and Gemini CLI, this command prints setup instructions (no local config file standard).
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx formlova-mcp install --client all --scope project --yes
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### `doctor`
|
|
65
|
+
|
|
66
|
+
Checks:
|
|
67
|
+
|
|
68
|
+
- `https://formlova.com/api/mcp` reachability
|
|
69
|
+
- Presence of common local setup files
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx formlova-mcp doctor
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Client quick references
|
|
76
|
+
|
|
77
|
+
### Claude
|
|
78
|
+
|
|
79
|
+
- Settings > Connectors で Remote MCP を追加
|
|
80
|
+
- Docs: https://support.anthropic.com/en/articles/11175166-how-do-i-connect-to-remote-mcp-servers-from-claude-desktop
|
|
81
|
+
|
|
82
|
+
### ChatGPT
|
|
83
|
+
|
|
84
|
+
- 開発者モード時: 設定 > アプリ > 高度な設定(アプリを作成する)
|
|
85
|
+
- Docs: https://platform.openai.com/docs/guides/tools-remote-mcp
|
|
86
|
+
|
|
87
|
+
### Codex
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
codex mcp add formlova --url https://formlova.com/api/mcp
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Claude Code
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
claude mcp add --transport http formlova https://formlova.com/api/mcp
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Cursor
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"formlova": {
|
|
105
|
+
"url": "https://formlova.com/api/mcp"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Gemini CLI
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
gemini mcp add --transport http formlova https://formlova.com/api/mcp
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Notes
|
|
118
|
+
|
|
119
|
+
Client-side setup menus and steps may change without notice.
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
|
|
6
|
+
const MCP_URL = "https://formlova.com/api/mcp";
|
|
7
|
+
const VALID_CLIENTS = new Set([
|
|
8
|
+
"all",
|
|
9
|
+
"codex",
|
|
10
|
+
"claude-code",
|
|
11
|
+
"cursor",
|
|
12
|
+
"chatgpt",
|
|
13
|
+
"gemini-cli",
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
function printHelp() {
|
|
17
|
+
console.log(`formlova-mcp
|
|
18
|
+
|
|
19
|
+
Usage:
|
|
20
|
+
formlova-mcp print --client <client|all>
|
|
21
|
+
formlova-mcp install --client <client|all> [--scope project] [--yes]
|
|
22
|
+
formlova-mcp doctor
|
|
23
|
+
|
|
24
|
+
Options:
|
|
25
|
+
--client all | codex | claude-code | cursor | chatgpt | gemini-cli
|
|
26
|
+
--scope project (default) | user
|
|
27
|
+
--yes write files without prompt
|
|
28
|
+
`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function parseArgs(argv) {
|
|
32
|
+
const [command, ...rest] = argv;
|
|
33
|
+
const args = { command, client: "all", scope: "project", yes: false };
|
|
34
|
+
for (let i = 0; i < rest.length; i += 1) {
|
|
35
|
+
const token = rest[i];
|
|
36
|
+
if (token === "--client") args.client = rest[i + 1] ?? "all";
|
|
37
|
+
if (token === "--scope") args.scope = rest[i + 1] ?? "project";
|
|
38
|
+
if (token === "--yes") args.yes = true;
|
|
39
|
+
if (token === "--help" || token === "-h") args.command = "help";
|
|
40
|
+
}
|
|
41
|
+
return args;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function snippets() {
|
|
45
|
+
return {
|
|
46
|
+
codex: `codex mcp add formlova --url ${MCP_URL}`,
|
|
47
|
+
"claude-code": `claude mcp add --transport http formlova ${MCP_URL}`,
|
|
48
|
+
cursor: `{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"formlova": {
|
|
51
|
+
"url": "${MCP_URL}"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}`,
|
|
55
|
+
chatgpt: "ChatGPT (developer mode): Settings > Apps > Advanced settings (Create app), then add MCP server URL.",
|
|
56
|
+
"gemini-cli": `gemini mcp add --transport http formlova ${MCP_URL}`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function resolveClients(target) {
|
|
61
|
+
if (!VALID_CLIENTS.has(target)) {
|
|
62
|
+
throw new Error(`Invalid --client: ${target}`);
|
|
63
|
+
}
|
|
64
|
+
if (target === "all") {
|
|
65
|
+
return ["codex", "claude-code", "cursor", "chatgpt", "gemini-cli"];
|
|
66
|
+
}
|
|
67
|
+
return [target];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function printConfig(client) {
|
|
71
|
+
const s = snippets();
|
|
72
|
+
console.log(`\n[${client}]`);
|
|
73
|
+
console.log(s[client]);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function ensureDir(filePath) {
|
|
77
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function writeProjectConfig(client) {
|
|
81
|
+
if (client === "codex") {
|
|
82
|
+
const target = path.resolve(process.cwd(), ".codex/config.toml");
|
|
83
|
+
ensureDir(target);
|
|
84
|
+
const content = `[mcp_servers.formlova]
|
|
85
|
+
url = "${MCP_URL}"
|
|
86
|
+
`;
|
|
87
|
+
fs.writeFileSync(target, content, "utf8");
|
|
88
|
+
console.log(`Wrote ${target}`);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (client === "claude-code") {
|
|
92
|
+
const target = path.resolve(process.cwd(), ".mcp.json");
|
|
93
|
+
ensureDir(target);
|
|
94
|
+
const content = JSON.stringify(
|
|
95
|
+
{ mcpServers: { formlova: { url: MCP_URL } } },
|
|
96
|
+
null,
|
|
97
|
+
2
|
|
98
|
+
);
|
|
99
|
+
fs.writeFileSync(target, `${content}\n`, "utf8");
|
|
100
|
+
console.log(`Wrote ${target}`);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (client === "cursor") {
|
|
104
|
+
const target = path.resolve(process.cwd(), ".cursor/mcp.json");
|
|
105
|
+
ensureDir(target);
|
|
106
|
+
const content = JSON.stringify(
|
|
107
|
+
{ mcpServers: { formlova: { url: MCP_URL } } },
|
|
108
|
+
null,
|
|
109
|
+
2
|
|
110
|
+
);
|
|
111
|
+
fs.writeFileSync(target, `${content}\n`, "utf8");
|
|
112
|
+
console.log(`Wrote ${target}`);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (client === "chatgpt" || client === "gemini-cli") {
|
|
116
|
+
printConfig(client);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function runDoctor() {
|
|
121
|
+
try {
|
|
122
|
+
const res = await fetch(MCP_URL, { method: "GET" });
|
|
123
|
+
console.log(`MCP URL check: ${res.status} ${res.statusText}`);
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.log(`MCP URL check: failed (${String(err)})`);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const checks = [
|
|
129
|
+
".codex/config.toml",
|
|
130
|
+
".mcp.json",
|
|
131
|
+
".cursor/mcp.json",
|
|
132
|
+
];
|
|
133
|
+
for (const p of checks) {
|
|
134
|
+
const abs = path.resolve(process.cwd(), p);
|
|
135
|
+
console.log(`${p}: ${fs.existsSync(abs) ? "found" : "not found"}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function main() {
|
|
140
|
+
const args = parseArgs(process.argv.slice(2));
|
|
141
|
+
if (!args.command || args.command === "help") {
|
|
142
|
+
printHelp();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (args.command === "print") {
|
|
147
|
+
for (const client of resolveClients(args.client)) printConfig(client);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (args.command === "install") {
|
|
152
|
+
if (args.scope === "user") {
|
|
153
|
+
console.log("User-scope auto-write is not enabled yet.");
|
|
154
|
+
console.log("Use --scope project or run: formlova-mcp print --client all");
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (!args.yes) {
|
|
158
|
+
console.log("Add --yes to write files. Example:");
|
|
159
|
+
console.log(" formlova-mcp install --client all --scope project --yes");
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
for (const client of resolveClients(args.client)) writeProjectConfig(client);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (args.command === "doctor") {
|
|
167
|
+
await runDoctor();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
printHelp();
|
|
172
|
+
process.exitCode = 1;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
main().catch((err) => {
|
|
176
|
+
console.error(err);
|
|
177
|
+
process.exitCode = 1;
|
|
178
|
+
});
|
|
179
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "formlova-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "FORMLOVA MCP setup helper CLI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"formlova-mcp": "bin/formlova-mcp.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18.17"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"start": "node bin/formlova-mcp.mjs",
|
|
20
|
+
"check": "node bin/formlova-mcp.mjs doctor"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"mcp",
|
|
24
|
+
"formlova",
|
|
25
|
+
"codex",
|
|
26
|
+
"claude-code",
|
|
27
|
+
"cursor",
|
|
28
|
+
"chatgpt",
|
|
29
|
+
"gemini-cli"
|
|
30
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/formlova/formlova-mcp.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/formlova/formlova-mcp#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/formlova/formlova-mcp/issues"
|
|
38
|
+
}
|
|
39
|
+
}
|