fix: v1.0.2 β drop /v1 prefix (live production bug) + add new tool params#2
Merged
Merged
Conversation
β¦lowers_count) ## The critical bug v1.0.1 (published to npm 2025-12-18) defaults `API_BASE_URL` to `https://api.socialapis.io/v1`. The real API has NO `/v1` prefix β this was verified end-to-end against production. Every MCP customer who installed `@socialapis/mcp@1.0.1` has been getting 404s on every call since publication. Fix: server.js now defaults to `https://api.socialapis.io` (matching the actual public API surface). ## Tool-schema updates for recent endpoint additions The main repo (Minima-Partners/Social-APIs) added several new query params and pricing-changing flags via PRs #183 and follow-ups. Surfacing them in MCP tool schemas: - facebook_get_page_details: new `exact_followers_count` boolean. Charges 5 credits when true, 1 otherwise. Description updated. - facebook_get_page_posts: new `limit` number (default 3, min 3, max 9). Description now states ceil(posts_returned / 3) pricing. - facebook_get_group_posts: same `limit` constraint + pricing. - facebook_get_page_videos: new `limit` number (default 6, min 6, max 12). - facebook_get_post_comments: new `limit` number (default 10, max 30). - facebook_marketplace_search: new `limit` number (default 24). - facebook_get_post_attachments: description updated to flag 5 credits/call. JSON Schema `minimum` / `maximum` constraints on the numeric `limit` fields so MCP clients (Claude Desktop, Cursor, etc.) can surface the bounds at parameter-edit time instead of letting the user submit invalid values that the upstream rejects. ## Sanity check 47 tools, no duplicates, no required-but-undefined property references. Programmatic validation: ``` node -e "import('./src/tools.js').then(({tools}) => { const dups = tools.filter((t,i,a) => a.findIndex(x=>x.name===t.name)!==i); const broken = tools.filter(t => (t.inputSchema?.required||[]) .some(r => !(r in (t.inputSchema?.properties||{})))); console.log('dups:', dups.length, 'broken:', broken.length); })" # β dups: 0, broken: 0 ``` ## Publish steps after merge 1. `npm publish` (operator with publish access β Trusted Publishing not yet wired for this repo, so manual for now) 2. MCP Registry will auto-pull the new version on its next sync since the `mcpName` field already points at this package 3. Update Minima-Partners/Social-APIs `backend/mcp-server` submodule pointer to this commit and update the main repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
server.jsdefaults tohttps://api.socialapis.io/v1but the real API has no /v1 prefix. Every npm-installed MCP customer has been 404'ing since the 2025-12-18 publish.The critical bug
server.jsline 7:```diff
```
Verified against production: `curl https://api.socialapis.io/facebook/pages/details?...\` returns 200; the same path with `/v1` prefix 404s.
Tool schemas updated
Tracking the recent additions to the main repo's `endpoints.json` (per Minima-Partners/Social-APIs PR #183 and follow-ups):
Numeric limits use JSON Schema `minimum`/`maximum` so MCP clients can surface bounds at parameter-edit time.
Sanity check passed
```bash
node -e "import('./src/tools.js').then(({tools}) => {
const dups = tools.filter((t,i,a) => a.findIndex(x=>x.name===t.name)!==i);
const broken = tools.filter(t => (t.inputSchema?.required||[])
.some(r => !(r in (t.inputSchema?.properties||{}))));
console.log('dups:', dups.length, 'broken:', broken.length);
})"
β dups: 0, broken: 0
```
Publish steps after merge
Test plan post-publish
```bash
Install the new version
npm install @socialapis/mcp@1.0.2
Quick smoke test β should not 404
SOCIALAPIS_API_KEY=<your_key> npx @socialapis/mcp test-key
```
In Claude Desktop / Cursor with the MCP server configured, calling `facebook_get_page_details` with `exact_followers_count: true` should charge 5 credits (visible in the `X-SocialAPIs-Credits-Deducted` response header).