mcphosted 0.0.0 → 1.20260929.36
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 +52 -1
- package/bin/mcphosted.js +58 -2
- package/package.json +36 -1
package/README.md
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
1
|
# mcphosted
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Self-hosted MCP servers from [MCP Hosted](https://mcphosted.com). WeFact and Laravel Forge are available today. One command starts a provider's MCP server on your own machine, and your AI client talks to it over stdio. Your API key never leaves your computer.
|
|
4
|
+
|
|
5
|
+
It needs Node.js 18 or newer and nothing else: the package ships one self-contained binary per platform (macOS and Linux, on x64 and arm64). Windows is not supported yet; use the hosted server at https://mcphosted.com there.
|
|
6
|
+
|
|
7
|
+
## Use it
|
|
8
|
+
|
|
9
|
+
Add it to the MCP config of your AI client (Cursor, Claude Desktop, VS Code):
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"forge": {
|
|
15
|
+
"command": "npx",
|
|
16
|
+
"args": ["-y", "mcphosted", "forge"],
|
|
17
|
+
"env": {
|
|
18
|
+
"FORGE_API_KEY": "<your API token>",
|
|
19
|
+
"MCPHOSTED_LICENSE_KEY": "<your license key>"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or in Claude Code:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
claude mcp add --transport stdio --scope user forge --env FORGE_API_KEY=<your API token> --env MCPHOSTED_LICENSE_KEY=<your license key> -- npx -y mcphosted forge
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Environment
|
|
33
|
+
|
|
34
|
+
| Variable | What |
|
|
35
|
+
|----------|------|
|
|
36
|
+
| `WEFACT_API_KEY` | Your WeFact API key, for `mcphosted wefact` |
|
|
37
|
+
| `FORGE_API_KEY` | Your Laravel Forge API token, for `mcphosted forge` |
|
|
38
|
+
| `MCPHOSTED_LICENSE_KEY` | Your license key for that provider |
|
|
39
|
+
|
|
40
|
+
## License key
|
|
41
|
+
|
|
42
|
+
Every provider needs its own license, a one-time purchase. Buy one on the provider's setup page at [mcphosted.com](https://mcphosted.com), which also shows your keys, the exact setup and a prompt that lets your AI coding assistant do it for you. Without a valid key the server does not start and says why on stderr.
|
|
43
|
+
|
|
44
|
+
## Pin a build
|
|
45
|
+
|
|
46
|
+
A license key never expires, and it starts every build we publish in the year after you buy it. After that, newer builds refuse it, so pin the builds it covers. Every version carries the day it was built, as `1.YYYYMMDD.N`, so a range pins every build up to a day: when your updates run until 2027-09-28, ask for anything below 2027-09-29.
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx -y "mcphosted@<1.20270929.0" forge
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The quotes keep the shell from reading `<` as a redirect. In an MCP config, put `"mcphosted@<1.20270929.0"` in place of `"mcphosted"` in `args`, with no extra quotes. npm then picks the newest build your license covers, and the server prints the exact range when it refuses your key. Or buy a new license for another year of updates.
|
|
53
|
+
|
|
54
|
+
Rather not run anything yourself? The same servers are hosted at [mcphosted.com](https://mcphosted.com).
|
package/bin/mcphosted.js
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// Starts the mcphosted binary for this platform with the same arguments, for example `npx -y mcphosted forge`.
|
|
3
|
+
// npm installs only the platform package that matches this machine, through optionalDependencies.
|
|
4
|
+
// stdin and stdout are the MCP client's, so they are passed straight through.
|
|
5
|
+
import { spawn } from 'node:child_process';
|
|
6
|
+
import { createRequire } from 'node:module';
|
|
7
|
+
import { dirname, join } from 'node:path';
|
|
8
|
+
|
|
9
|
+
const packages = {
|
|
10
|
+
'darwin arm64': 'mcphosted-darwin-arm64',
|
|
11
|
+
'darwin x64': 'mcphosted-darwin-x64',
|
|
12
|
+
'linux arm64': 'mcphosted-linux-arm64',
|
|
13
|
+
'linux x64': 'mcphosted-linux-x64',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const name = packages[`${process.platform} ${process.arch}`];
|
|
17
|
+
|
|
18
|
+
if (!name) {
|
|
19
|
+
console.error(
|
|
20
|
+
`mcphosted does not run on ${process.platform} ${process.arch} yet. It runs on ${Object.keys(packages).join(', ')}. Use the hosted server at https://mcphosted.com instead.`,
|
|
21
|
+
);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let binary;
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const manifest = createRequire(import.meta.url).resolve(`${name}/package.json`);
|
|
29
|
+
binary = join(dirname(manifest), 'bin', process.platform === 'win32' ? 'mcphosted.exe' : 'mcphosted');
|
|
30
|
+
} catch {
|
|
31
|
+
console.error(`mcphosted could not find the ${name} package. Install it again without --omit=optional or --no-optional.`);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const child = spawn(binary, process.argv.slice(2), { stdio: 'inherit', windowsHide: true });
|
|
36
|
+
const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
|
|
37
|
+
|
|
38
|
+
for (const signal of signals) {
|
|
39
|
+
process.on(signal, () => child.kill(signal));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
child.on('error', (error) => {
|
|
43
|
+
console.error(`mcphosted could not start ${binary}: ${error.message}`);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
child.on('exit', (code, signal) => {
|
|
48
|
+
if (signal) {
|
|
49
|
+
for (const forwarded of signals) {
|
|
50
|
+
process.removeAllListeners(forwarded);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
process.kill(process.pid, signal);
|
|
54
|
+
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
process.exit(code ?? 1);
|
|
59
|
+
});
|
package/package.json
CHANGED
|
@@ -1 +1,36 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "mcphosted",
|
|
3
|
+
"version": "1.20260929.36",
|
|
4
|
+
"description": "Self-hosted MCP servers from MCP Hosted, such as WeFact and Laravel Forge, over stdio with nothing else to install.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"wefact",
|
|
9
|
+
"laravel-forge",
|
|
10
|
+
"forge",
|
|
11
|
+
"claude",
|
|
12
|
+
"cursor"
|
|
13
|
+
],
|
|
14
|
+
"license": "UNLICENSED",
|
|
15
|
+
"homepage": "https://mcphosted.com",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/pixel-perfect-agency/mcphosted.git"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"bin": {
|
|
22
|
+
"mcphosted": "bin/mcphosted.js"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"bin"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18"
|
|
29
|
+
},
|
|
30
|
+
"optionalDependencies": {
|
|
31
|
+
"mcphosted-darwin-arm64": "1.20260929.36",
|
|
32
|
+
"mcphosted-darwin-x64": "1.20260929.36",
|
|
33
|
+
"mcphosted-linux-x64": "1.20260929.36",
|
|
34
|
+
"mcphosted-linux-arm64": "1.20260929.36"
|
|
35
|
+
}
|
|
36
|
+
}
|