mcp-reddit-ads 1.0.1 → 1.0.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/build-info.json +1 -1
- package/dist/index.js +25 -4
- package/package.json +4 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sha":"
|
|
1
|
+
{"sha":"0d0fac2","builtAt":"2026-04-09T18:53:33.093Z"}
|
package/dist/index.js
CHANGED
|
@@ -17,12 +17,33 @@ catch {
|
|
|
17
17
|
// build-info.json not present (dev mode)
|
|
18
18
|
}
|
|
19
19
|
function loadConfig() {
|
|
20
|
+
// Try config.json first
|
|
20
21
|
const configPath = join(dirname(new URL(import.meta.url).pathname), "..", "config.json");
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
let config;
|
|
23
|
+
if (existsSync(configPath)) {
|
|
24
|
+
config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
23
25
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
else {
|
|
27
|
+
// Build config entirely from env vars
|
|
28
|
+
config = {
|
|
29
|
+
reddit_api: {
|
|
30
|
+
base_url: "https://ads-api.reddit.com/api/v3",
|
|
31
|
+
auth: {
|
|
32
|
+
client_id: "",
|
|
33
|
+
client_secret: "",
|
|
34
|
+
refresh_token: "",
|
|
35
|
+
user_agent: "reddit-ad-mcp/1.0",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
defaults: {
|
|
39
|
+
account_id: "",
|
|
40
|
+
business_id: "",
|
|
41
|
+
report_metrics: ["impressions", "clicks", "spend", "ctr", "cpc", "ecpm"],
|
|
42
|
+
date_range_days: 7,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
// Environment overrides (always applied)
|
|
26
47
|
if (process.env.REDDIT_CLIENT_ID)
|
|
27
48
|
config.reddit_api.auth.client_id = process.env.REDDIT_CLIENT_ID;
|
|
28
49
|
if (process.env.REDDIT_CLIENT_SECRET)
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-reddit-ads",
|
|
3
3
|
"mcpName": "io.github.mharnett/reddit-ads",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "MCP server for Reddit Ads API v3 with campaign, ad group, ad management, and performance reporting.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mcp-reddit-ads": "dist/index.js"
|
|
9
|
+
},
|
|
7
10
|
"types": "dist/index.d.ts",
|
|
8
11
|
"type": "module",
|
|
9
12
|
"exports": {
|