@twitterapis/mcp 0.6.0 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.1 (2026-07-20)
4
+
5
+ ### Fixed
6
+
7
+ - **The server advertised the wrong version.** `serverInfo.version` in the MCP handshake and the outbound `user-agent` header were both hardcoded to `0.3.0`, so every client since 0.4.0 was told it was talking to 0.3.0. Both now derive from `package.json`, so the literal cannot drift again.
8
+ - Corrected a factual error in the 0.6.0 changelog entry below: the endpoint that stopped advertising `count` alongside `twitter_tweet_replies` is `twitter_tweet_thread`, not `twitter_tweet_retweeters`. `twitter_tweet_retweeters` does accept `count` and is unchanged.
9
+
3
10
  ## 0.6.0 (2026-07-20)
4
11
 
5
12
  ### Fixed
6
13
 
7
- - **Removed three phantom parameters from the published tool schemas.** Eleven write tools (`twitter_create_tweet`, `twitter_delete_tweet`, `twitter_favorite_tweet` / `twitter_unfavorite_tweet`, `twitter_retweet` / `twitter_unretweet`, `twitter_bookmark_tweet` / `twitter_unbookmark_tweet`, `twitter_follow_user` / `twitter_unfollow_user`, `twitter_dm_send`) advertised an optional `account` parameter that the API never accepted, so agents that passed it were silently ignored. `twitter_tweet_replies` and `twitter_tweet_retweeters` advertised the full pagination shape when the endpoint only accepts `cursor`.
14
+ - **Removed three phantom parameters from the published tool schemas.** Eleven write tools (`twitter_create_tweet`, `twitter_delete_tweet`, `twitter_favorite_tweet` / `twitter_unfavorite_tweet`, `twitter_retweet` / `twitter_unretweet`, `twitter_bookmark_tweet` / `twitter_unbookmark_tweet`, `twitter_follow_user` / `twitter_unfollow_user`, `twitter_dm_send`) advertised an optional `account` parameter that the API never accepted, so agents that passed it were silently ignored. `twitter_tweet_replies` and `twitter_tweet_thread` advertised the full pagination shape when the endpoint only accepts `cursor`.
8
15
  - A fail-closed MCP-to-OpenAPI parity gate now runs on every `npm test`, so a tool schema can no longer drift from the live API contract unnoticed.
9
16
  - README: corrected the Links section (the REST base URL is `https://api.twitterapis.com`; removed a link to a status page that does not exist) and added an FAQ covering signup, read-vs-write scope, supported clients, billing, and data handling.
10
17
 
11
18
  ### Breaking
12
19
 
13
- - If your client explicitly passed `account` to a write tool, or `count` to `twitter_tweet_replies` / `twitter_tweet_retweeters`, those keys are no longer part of the schema. They were never honoured by the API, so behaviour is unchanged; only the advertised schema is now accurate.
20
+ - If your client explicitly passed `account` to a write tool, or `count` to `twitter_tweet_replies` / `twitter_tweet_thread`, those keys are no longer part of the schema. They were never honoured by the API, so behaviour is unchanged; only the advertised schema is now accurate.
14
21
 
15
22
  ## 0.5.0 (2026-07-06)
16
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twitterapis/mcp",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Official MCP server for twitterapis.com, the Twitter/X API (search, users, followers, tweets, threads, lists, likes, bookmarks, DMs) plus write actions (post/like/retweet/follow) as native tools for Claude, Cursor, and any MCP client.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.js CHANGED
@@ -16,8 +16,14 @@
16
16
  //
17
17
  // Run: npx -y @twitterapis/mcp@latest (stdio transport)
18
18
 
19
+ import { createRequire } from "node:module";
19
20
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
20
21
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
22
+
23
+ // Single source of truth for the version. Previously this was a literal in two
24
+ // places and drifted: the package shipped 0.5.0 while the MCP handshake and the
25
+ // outbound user-agent both still advertised 0.3.0.
26
+ const VERSION = createRequire(import.meta.url)("../package.json").version;
21
27
  import { TOOLS, buildQuery } from "./tools.js";
22
28
 
23
29
  const API_KEY = process.env.TWITTERAPIS_KEY;
@@ -52,7 +58,7 @@ async function callEndpoint(path, args, method = "GET") {
52
58
  Authorization: `Bearer ${API_KEY}`,
53
59
  "x-api-key": API_KEY,
54
60
  accept: "application/json",
55
- "user-agent": "twitterapis-mcp/0.3.0",
61
+ "user-agent": `twitterapis-mcp/${VERSION}`,
56
62
  };
57
63
  if (auth_token && ct0) {
58
64
  headers["x-auth-token"] = auth_token;
@@ -99,7 +105,7 @@ async function callEndpoint(path, args, method = "GET") {
99
105
  }
100
106
 
101
107
  // ── MCP server ───────────────────────────────────────────────────────────────
102
- const server = new McpServer({ name: "twitterapis", version: "0.3.0" });
108
+ const server = new McpServer({ name: "twitterapis", version: VERSION });
103
109
 
104
110
  for (const tool of TOOLS) {
105
111
  const method = tool.method || "GET";