@relayrail/server 0.1.2 → 0.1.3
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/dist/cli.js +1876 -0
- package/dist/index.js +0 -53
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
1
|
// src/server.ts
|
|
4
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -2199,57 +2197,6 @@ var HTTPTransport = class {
|
|
|
2199
2197
|
function createHTTPTransport(config) {
|
|
2200
2198
|
return new HTTPTransport(config);
|
|
2201
2199
|
}
|
|
2202
|
-
|
|
2203
|
-
// src/index.ts
|
|
2204
|
-
async function main() {
|
|
2205
|
-
const apiKey = process.env.RELAYRAIL_API_KEY;
|
|
2206
|
-
if (!apiKey) {
|
|
2207
|
-
console.error("Error: RELAYRAIL_API_KEY environment variable is required");
|
|
2208
|
-
console.error("");
|
|
2209
|
-
console.error("Get your API key from https://relayrail.dev/dashboard/agents");
|
|
2210
|
-
console.error("");
|
|
2211
|
-
console.error("Example MCP configuration:");
|
|
2212
|
-
console.error(JSON.stringify({
|
|
2213
|
-
mcpServers: {
|
|
2214
|
-
relayrail: {
|
|
2215
|
-
command: "npx",
|
|
2216
|
-
args: ["@relayrail/server"],
|
|
2217
|
-
env: {
|
|
2218
|
-
RELAYRAIL_API_KEY: "rr_your_api_key_here"
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
}, null, 2));
|
|
2223
|
-
process.exit(1);
|
|
2224
|
-
}
|
|
2225
|
-
const config = {
|
|
2226
|
-
supabaseUrl: process.env.SUPABASE_URL || process.env.NEXT_PUBLIC_SUPABASE_URL || "https://lcmdokppykqmigqcwnol.supabase.co",
|
|
2227
|
-
supabaseServiceRoleKey: process.env.SUPABASE_SERVICE_ROLE_KEY || "sb_secret_cj-1Y1KxjlapuwyXvfSKLA_xBJ0oS8i",
|
|
2228
|
-
baseUrl: process.env.RELAYRAIL_BASE_URL || "https://relayrail.dev",
|
|
2229
|
-
resendApiKey: process.env.RESEND_API_KEY,
|
|
2230
|
-
telnyxApiKey: process.env.TELNYX_API_KEY,
|
|
2231
|
-
telnyxPhoneNumber: process.env.TELNYX_PHONE_NUMBER
|
|
2232
|
-
};
|
|
2233
|
-
try {
|
|
2234
|
-
const server = createServer(config);
|
|
2235
|
-
const authenticated = await server.authenticate(apiKey);
|
|
2236
|
-
if (!authenticated) {
|
|
2237
|
-
console.error("Error: Invalid API key");
|
|
2238
|
-
console.error("");
|
|
2239
|
-
console.error("Please check your RELAYRAIL_API_KEY and try again.");
|
|
2240
|
-
console.error("Get a new API key from https://relayrail.dev/dashboard/agents");
|
|
2241
|
-
process.exit(1);
|
|
2242
|
-
}
|
|
2243
|
-
await server.start();
|
|
2244
|
-
} catch (error) {
|
|
2245
|
-
console.error("Failed to start RelayRail MCP server:", error);
|
|
2246
|
-
process.exit(1);
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
main().catch((error) => {
|
|
2250
|
-
console.error("Unexpected error:", error);
|
|
2251
|
-
process.exit(1);
|
|
2252
|
-
});
|
|
2253
2200
|
export {
|
|
2254
2201
|
HTTPTransport,
|
|
2255
2202
|
MCP_ERRORS,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relayrail/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "RelayRail MCP Server - SMS/Email connectivity for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"relayrail": "./dist/
|
|
10
|
-
"relayrail-server": "./dist/
|
|
9
|
+
"relayrail": "./dist/cli.js",
|
|
10
|
+
"relayrail-server": "./dist/cli.js"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|