@voidly/mcp-server 1.1.0 → 1.1.1

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16,8 +16,8 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
16
16
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
17
17
  import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
18
18
  // Voidly API endpoints
19
- const VOIDLY_API = 'https://censorship.voidly.ai';
20
- const VOIDLY_DATA_API = 'https://voidly.ai/api/data';
19
+ const VOIDLY_API = 'https://api.voidly.ai';
20
+ const VOIDLY_DATA_API = 'https://api.voidly.ai/data';
21
21
  // Country metadata for enriching responses
22
22
  const COUNTRY_NAMES = {
23
23
  CN: 'China', IR: 'Iran', RU: 'Russia', VE: 'Venezuela', CU: 'Cuba',
@@ -161,7 +161,7 @@ async function getMostCensored(limit = 10) {
161
161
  return result;
162
162
  }
163
163
  async function getActiveIncidents() {
164
- const data = await fetchJson(`${VOIDLY_API}/v1/censorship-index/incidents`);
164
+ const data = await fetchJson(`${VOIDLY_DATA_API}/incidents?status=active&limit=50`);
165
165
  let result = `# Active Censorship Incidents\n\n`;
166
166
  result += `Total: ${data.count} incidents\n\n`;
167
167
  if (data.incidents.length === 0) {
@@ -188,7 +188,19 @@ async function getActiveIncidents() {
188
188
  return result;
189
189
  }
190
190
  async function verifyClaim(claim, requireEvidence = false) {
191
- const data = await fetchJson(`${VOIDLY_API}/v1/verify-claim?claim=${encodeURIComponent(claim)}&require_evidence=${requireEvidence}`);
191
+ // Use POST for verify-claim
192
+ const response = await fetch(`${VOIDLY_API}/verify-claim`, {
193
+ method: 'POST',
194
+ headers: {
195
+ 'Content-Type': 'application/json',
196
+ 'User-Agent': 'Voidly-MCP-Server/1.0',
197
+ },
198
+ body: JSON.stringify({ claim, require_evidence: requireEvidence }),
199
+ });
200
+ if (!response.ok) {
201
+ throw new Error(`API request failed: ${response.status} ${response.statusText}`);
202
+ }
203
+ const data = await response.json();
192
204
  let result = `# Claim Verification\n\n`;
193
205
  result += `**Claim:** "${data.claim}"\n\n`;
194
206
  // Verdict with emoji
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidly/mcp-server",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "MCP server for Voidly Global Censorship Index - enables AI systems to query real-time censorship data",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",