fix: apply all A-J improvements across MCP server
- A: fix get_user_profile URL (/api/user/profile → /api/users/:username)
- B: fix unban_user to use DELETE /api/mod/users/:id/ban (was POST .../unban)
- C: add check_duplicates tool (GET /api/news/:id/check-duplicates)
- D: add shadowban_user tool (PATCH /api/mod/users/:id/shadowban)
- E: add create_mod_user tool (POST /api/mod/users)
- F: extract handleTool helper in utils.ts; all 37 tools now use it for
consistent isError:true error responses visible to the AI model
- G: only send Content-Type header when request has a body
- H: support BETTERNEWS_BASE_URL env var for local dev overrides
- I: fix get_news_item_stats description (accessible by own author, not Mod/Admin only)
- J: add .describe() to page/limit/status params in list_all_tickets and list_my_tickets
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -19,7 +19,8 @@ if (!apiKey) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const client = new BetterNewsClient(apiKey);
|
||||
const baseUrl = process.env.BETTERNEWS_BASE_URL ?? "https://api.betternews.app";
|
||||
const client = new BetterNewsClient(apiKey, baseUrl);
|
||||
|
||||
const server = new McpServer({
|
||||
name: "betternews",
|
||||
|
||||
Reference in New Issue
Block a user