| X_API_KEY | Yes | OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens. Secret. |
| X_API_KEY_SECRET | Yes | OAuth 1.0a consumer secret, issued together with X_API_KEY. Secret. |
| X_ACCESS_TOKEN | Yes | User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated. Secret. |
| X_ACCESS_TOKEN_SECRET | Yes | User access token secret, issued together with X_ACCESS_TOKEN. Secret. |
| MEDIA_ROOT | Yes | Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup. |
| MCP_TRANSPORT | No | stdio (client spawns the process) or http (streamable HTTP listener). |
| MCP_NAME | No | Server name reported in the MCP initialize handshake. |
| MCP_PATH | No | HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http. |
| SERVER_PORT | No | TCP port to listen on. Used only when MCP_TRANSPORT=http. |
| SERVER_READ_TIMEOUT | No | HTTP read timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| SERVER_WRITE_TIMEOUT | No | HTTP write timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| LOG_MODE | No | local (text, debug) or prod (JSON, info). Logs go to stderr. |
| MAX_IDLE_CONNS_PER_HOST | No | Idle connections the outbound HTTP client keeps per host. |
| X_DEBUG | No | Log the raw requests sent to the X API. Verbose; the output can contain request details, so keep it off outside debugging. |
| POSTS_MAX_QUERIES | No | Queries accepted in one x_posts_search or x_posts_count call. |
| POSTS_MAX_USERNAMES | No | Usernames accepted in one x_posts_by_user call. |
| POSTS_MAX_IDS | No | Post ids accepted in one x_posts_lookup call. The X API caps this at 100. |
| POSTS_DEFAULT_RESULTS | No | Posts returned per query when the call does not ask for a count. Every post returned is billed. |
| POSTS_MAX_RESULTS | No | Upper bound for posts per query. The X API caps this at 100. |
| POSTS_DEFAULT_DAYS | No | How far back post searches look when the call does not say, in days. |
| POSTS_MAX_DAYS | No | Furthest back a post search may look, in days. Recent search cannot exceed 7. |
| POSTS_DEFAULT_TIMEOUT_MS | No | Timeout for a posts call in milliseconds when the call does not request one. |
| POSTS_MIN_TIMEOUT_MS | No | Lowest timeout a posts call may request, in milliseconds. |
| POSTS_MAX_TIMEOUT_MS | No | Highest timeout a posts call may request, in milliseconds. |
| USERS_MAX_USERNAMES | No | Usernames accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_MAX_IDS | No | User ids accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_DEFAULT_RESULTS | No | Users returned per page when the call does not ask for a count. |
| USERS_MAX_RESULTS | No | Upper bound for users per page. |
| USERS_DEFAULT_TIMEOUT_MS | No | Timeout for a users call in milliseconds when the call does not request one. |
| USERS_MIN_TIMEOUT_MS | No | Lowest timeout a users call may request, in milliseconds. |
| USERS_MAX_TIMEOUT_MS | No | Highest timeout a users call may request, in milliseconds. |
| LISTS_DEFAULT_RESULTS | No | Items returned per list page when the call does not ask for a count. |
| LISTS_MAX_RESULTS | No | Upper bound for items per list page. The X API caps this at 100. |
| LISTS_DEFAULT_TIMEOUT_MS | No | Timeout for a lists call in milliseconds when the call does not request one. |
| LISTS_MIN_TIMEOUT_MS | No | Lowest timeout a lists call may request, in milliseconds. |
| LISTS_MAX_TIMEOUT_MS | No | Highest timeout a lists call may request, in milliseconds. |
| MEDIA_CHUNK_BYTES | No | Bytes per upload segment. The X APPEND endpoint caps a segment at 5 MB. |
| MEDIA_POLL_INTERVAL_MS | No | How often the upload status is polled while X transcodes a video, in milliseconds. |
| MEDIA_DEFAULT_TIMEOUT_MS | No | Timeout for a whole upload in milliseconds when the call does not request one. |
| MEDIA_MIN_TIMEOUT_MS | No | Lowest timeout an upload may request, in milliseconds. |
| MEDIA_MAX_TIMEOUT_MS | No | Highest timeout an upload may request, in milliseconds. |
| X_API_KEY | Yes | OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens. Secret. |
| X_API_KEY_SECRET | Yes | OAuth 1.0a consumer secret, issued together with X_API_KEY. Secret. |
| X_ACCESS_TOKEN | Yes | User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated. Secret. |
| X_ACCESS_TOKEN_SECRET | Yes | User access token secret, issued together with X_ACCESS_TOKEN. Secret. |
| MEDIA_ROOT | Yes | Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup. |
| MCP_TRANSPORT | No | stdio (client spawns the process) or http (streamable HTTP listener). |
| MCP_NAME | No | Server name reported in the MCP initialize handshake. |
| MCP_PATH | No | HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http. |
| SERVER_PORT | No | TCP port to listen on. Used only when MCP_TRANSPORT=http. |
| SERVER_READ_TIMEOUT | No | HTTP read timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| SERVER_WRITE_TIMEOUT | No | HTTP write timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| LOG_MODE | No | local (text, debug) or prod (JSON, info). Logs go to stderr. |
| MAX_IDLE_CONNS_PER_HOST | No | Idle connections the outbound HTTP client keeps per host. |
| X_DEBUG | No | Log the raw requests sent to the X API. Verbose; the output can contain request details, so keep it off outside debugging. |
| POSTS_MAX_QUERIES | No | Queries accepted in one x_posts_search or x_posts_count call. |
| POSTS_MAX_USERNAMES | No | Usernames accepted in one x_posts_by_user call. |
| POSTS_MAX_IDS | No | Post ids accepted in one x_posts_lookup call. The X API caps this at 100. |
| POSTS_DEFAULT_RESULTS | No | Posts returned per query when the call does not ask for a count. Every post returned is billed. |
| POSTS_MAX_RESULTS | No | Upper bound for posts per query. The X API caps this at 100. |
| POSTS_DEFAULT_DAYS | No | How far back post searches look when the call does not say, in days. |
| POSTS_MAX_DAYS | No | Furthest back a post search may look, in days. Recent search cannot exceed 7. |
| POSTS_DEFAULT_TIMEOUT_MS | No | Timeout for a posts call in milliseconds when the call does not request one. |
| POSTS_MIN_TIMEOUT_MS | No | Lowest timeout a posts call may request, in milliseconds. |
| POSTS_MAX_TIMEOUT_MS | No | Highest timeout a posts call may request, in milliseconds. |
| USERS_MAX_USERNAMES | No | Usernames accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_MAX_IDS | No | User ids accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_DEFAULT_RESULTS | No | Users returned per page when the call does not ask for a count. |
| USERS_MAX_RESULTS | No | Upper bound for users per page. |
| USERS_DEFAULT_TIMEOUT_MS | No | Timeout for a users call in milliseconds when the call does not request one. |
| USERS_MIN_TIMEOUT_MS | No | Lowest timeout a users call may request, in milliseconds. |
| USERS_MAX_TIMEOUT_MS | No | Highest timeout a users call may request, in milliseconds. |
| LISTS_DEFAULT_RESULTS | No | Items returned per list page when the call does not ask for a count. |
| LISTS_MAX_RESULTS | No | Upper bound for items per list page. The X API caps this at 100. |
| LISTS_DEFAULT_TIMEOUT_MS | No | Timeout for a lists call in milliseconds when the call does not request one. |
| LISTS_MIN_TIMEOUT_MS | No | Lowest timeout a lists call may request, in milliseconds. |
| LISTS_MAX_TIMEOUT_MS | No | Highest timeout a lists call may request, in milliseconds. |
| MEDIA_CHUNK_BYTES | No | Bytes per upload segment. The X APPEND endpoint caps a segment at 5 MB. |
| MEDIA_POLL_INTERVAL_MS | No | How often the upload status is polled while X transcodes a video, in milliseconds. |
| MEDIA_DEFAULT_TIMEOUT_MS | No | Timeout for a whole upload in milliseconds when the call does not request one. |
| MEDIA_MIN_TIMEOUT_MS | No | Lowest timeout an upload may request, in milliseconds. |
| MEDIA_MAX_TIMEOUT_MS | No | Highest timeout an upload may request, in milliseconds. |
| X_API_KEY | Yes | OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens. Secret. |
| X_API_KEY_SECRET | Yes | OAuth 1.0a consumer secret, issued together with X_API_KEY. Secret. |
| X_ACCESS_TOKEN | Yes | User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated. Secret. |
| X_ACCESS_TOKEN_SECRET | Yes | User access token secret, issued together with X_ACCESS_TOKEN. Secret. |
| MEDIA_ROOT | Yes | Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup. |
| MCP_TRANSPORT | No | stdio (client spawns the process) or http (streamable HTTP listener). |
| MCP_NAME | No | Server name reported in the MCP initialize handshake. |
| MCP_PATH | No | HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http. |
| SERVER_PORT | No | TCP port to listen on. Used only when MCP_TRANSPORT=http. |
| SERVER_READ_TIMEOUT | No | HTTP read timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| SERVER_WRITE_TIMEOUT | No | HTTP write timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| LOG_MODE | No | local (text, debug) or prod (JSON, info). Logs go to stderr. |
| MAX_IDLE_CONNS_PER_HOST | No | Idle connections the outbound HTTP client keeps per host. |
| X_DEBUG | No | Log the raw requests sent to the X API. Verbose; the output can contain request details, so keep it off outside debugging. |
| POSTS_MAX_QUERIES | No | Queries accepted in one x_posts_search or x_posts_count call. |
| POSTS_MAX_USERNAMES | No | Usernames accepted in one x_posts_by_user call. |
| POSTS_MAX_IDS | No | Post ids accepted in one x_posts_lookup call. The X API caps this at 100. |
| POSTS_DEFAULT_RESULTS | No | Posts returned per query when the call does not ask for a count. Every post returned is billed. |
| POSTS_MAX_RESULTS | No | Upper bound for posts per query. The X API caps this at 100. |
| POSTS_DEFAULT_DAYS | No | How far back post searches look when the call does not say, in days. |
| POSTS_MAX_DAYS | No | Furthest back a post search may look, in days. Recent search cannot exceed 7. |
| POSTS_DEFAULT_TIMEOUT_MS | No | Timeout for a posts call in milliseconds when the call does not request one. |
| POSTS_MIN_TIMEOUT_MS | No | Lowest timeout a posts call may request, in milliseconds. |
| POSTS_MAX_TIMEOUT_MS | No | Highest timeout a posts call may request, in milliseconds. |
| USERS_MAX_USERNAMES | No | Usernames accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_MAX_IDS | No | User ids accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_DEFAULT_RESULTS | No | Users returned per page when the call does not ask for a count. |
| USERS_MAX_RESULTS | No | Upper bound for users per page. |
| USERS_DEFAULT_TIMEOUT_MS | No | Timeout for a users call in milliseconds when the call does not request one. |
| USERS_MIN_TIMEOUT_MS | No | Lowest timeout a users call may request, in milliseconds. |
| USERS_MAX_TIMEOUT_MS | No | Highest timeout a users call may request, in milliseconds. |
| LISTS_DEFAULT_RESULTS | No | Items returned per list page when the call does not ask for a count. |
| LISTS_MAX_RESULTS | No | Upper bound for items per list page. The X API caps this at 100. |
| LISTS_DEFAULT_TIMEOUT_MS | No | Timeout for a lists call in milliseconds when the call does not request one. |
| LISTS_MIN_TIMEOUT_MS | No | Lowest timeout a lists call may request, in milliseconds. |
| LISTS_MAX_TIMEOUT_MS | No | Highest timeout a lists call may request, in milliseconds. |
| MEDIA_CHUNK_BYTES | No | Bytes per upload segment. The X APPEND endpoint caps a segment at 5 MB. |
| MEDIA_POLL_INTERVAL_MS | No | How often the upload status is polled while X transcodes a video, in milliseconds. |
| MEDIA_DEFAULT_TIMEOUT_MS | No | Timeout for a whole upload in milliseconds when the call does not request one. |
| MEDIA_MIN_TIMEOUT_MS | No | Lowest timeout an upload may request, in milliseconds. |
| MEDIA_MAX_TIMEOUT_MS | No | Highest timeout an upload may request, in milliseconds. |
| X_API_KEY | Yes | OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens. Secret. |
| X_API_KEY_SECRET | Yes | OAuth 1.0a consumer secret, issued together with X_API_KEY. Secret. |
| X_ACCESS_TOKEN | Yes | User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated. Secret. |
| X_ACCESS_TOKEN_SECRET | Yes | User access token secret, issued together with X_ACCESS_TOKEN. Secret. |
| MEDIA_ROOT | Yes | Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup. |
| MCP_TRANSPORT | No | stdio (client spawns the process) or http (streamable HTTP listener). |
| MCP_NAME | No | Server name reported in the MCP initialize handshake. |
| MCP_PATH | No | HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http. |
| SERVER_PORT | No | TCP port to listen on. Used only when MCP_TRANSPORT=http. |
| SERVER_READ_TIMEOUT | No | HTTP read timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| SERVER_WRITE_TIMEOUT | No | HTTP write timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| LOG_MODE | No | local (text, debug) or prod (JSON, info). Logs go to stderr. |
| MAX_IDLE_CONNS_PER_HOST | No | Idle connections the outbound HTTP client keeps per host. |
| X_DEBUG | No | Log the raw requests sent to the X API. Verbose; the output can contain request details, so keep it off outside debugging. |
| POSTS_MAX_QUERIES | No | Queries accepted in one x_posts_search or x_posts_count call. |
| POSTS_MAX_USERNAMES | No | Usernames accepted in one x_posts_by_user call. |
| POSTS_MAX_IDS | No | Post ids accepted in one x_posts_lookup call. The X API caps this at 100. |
| POSTS_DEFAULT_RESULTS | No | Posts returned per query when the call does not ask for a count. Every post returned is billed. |
| POSTS_MAX_RESULTS | No | Upper bound for posts per query. The X API caps this at 100. |
| POSTS_DEFAULT_DAYS | No | How far back post searches look when the call does not say, in days. |
| POSTS_MAX_DAYS | No | Furthest back a post search may look, in days. Recent search cannot exceed 7. |
| POSTS_DEFAULT_TIMEOUT_MS | No | Timeout for a posts call in milliseconds when the call does not request one. |
| POSTS_MIN_TIMEOUT_MS | No | Lowest timeout a posts call may request, in milliseconds. |
| POSTS_MAX_TIMEOUT_MS | No | Highest timeout a posts call may request, in milliseconds. |
| USERS_MAX_USERNAMES | No | Usernames accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_MAX_IDS | No | User ids accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_DEFAULT_RESULTS | No | Users returned per page when the call does not ask for a count. |
| USERS_MAX_RESULTS | No | Upper bound for users per page. |
| USERS_DEFAULT_TIMEOUT_MS | No | Timeout for a users call in milliseconds when the call does not request one. |
| USERS_MIN_TIMEOUT_MS | No | Lowest timeout a users call may request, in milliseconds. |
| USERS_MAX_TIMEOUT_MS | No | Highest timeout a users call may request, in milliseconds. |
| LISTS_DEFAULT_RESULTS | No | Items returned per list page when the call does not ask for a count. |
| LISTS_MAX_RESULTS | No | Upper bound for items per list page. The X API caps this at 100. |
| LISTS_DEFAULT_TIMEOUT_MS | No | Timeout for a lists call in milliseconds when the call does not request one. |
| LISTS_MIN_TIMEOUT_MS | No | Lowest timeout a lists call may request, in milliseconds. |
| LISTS_MAX_TIMEOUT_MS | No | Highest timeout a lists call may request, in milliseconds. |
| MEDIA_CHUNK_BYTES | No | Bytes per upload segment. The X APPEND endpoint caps a segment at 5 MB. |
| MEDIA_POLL_INTERVAL_MS | No | How often the upload status is polled while X transcodes a video, in milliseconds. |
| MEDIA_DEFAULT_TIMEOUT_MS | No | Timeout for a whole upload in milliseconds when the call does not request one. |
| MEDIA_MIN_TIMEOUT_MS | No | Lowest timeout an upload may request, in milliseconds. |
| MEDIA_MAX_TIMEOUT_MS | No | Highest timeout an upload may request, in milliseconds. |
| X_API_KEY | Yes | OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens. Secret. |
| X_API_KEY_SECRET | Yes | OAuth 1.0a consumer secret, issued together with X_API_KEY. Secret. |
| X_ACCESS_TOKEN | Yes | User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated. Secret. |
| X_ACCESS_TOKEN_SECRET | Yes | User access token secret, issued together with X_ACCESS_TOKEN. Secret. |
| MEDIA_ROOT | Yes | Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup. |
| MCP_TRANSPORT | No | stdio (client spawns the process) or http (streamable HTTP listener). |
| MCP_NAME | No | Server name reported in the MCP initialize handshake. |
| MCP_PATH | No | HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http. |
| SERVER_PORT | No | TCP port to listen on. Used only when MCP_TRANSPORT=http. |
| SERVER_READ_TIMEOUT | No | HTTP read timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| SERVER_WRITE_TIMEOUT | No | HTTP write timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| LOG_MODE | No | local (text, debug) or prod (JSON, info). Logs go to stderr. |
| MAX_IDLE_CONNS_PER_HOST | No | Idle connections the outbound HTTP client keeps per host. |
| X_DEBUG | No | Log the raw requests sent to the X API. Verbose; the output can contain request details, so keep it off outside debugging. |
| POSTS_MAX_QUERIES | No | Queries accepted in one x_posts_search or x_posts_count call. |
| POSTS_MAX_USERNAMES | No | Usernames accepted in one x_posts_by_user call. |
| POSTS_MAX_IDS | No | Post ids accepted in one x_posts_lookup call. The X API caps this at 100. |
| POSTS_DEFAULT_RESULTS | No | Posts returned per query when the call does not ask for a count. Every post returned is billed. |
| POSTS_MAX_RESULTS | No | Upper bound for posts per query. The X API caps this at 100. |
| POSTS_DEFAULT_DAYS | No | How far back post searches look when the call does not say, in days. |
| POSTS_MAX_DAYS | No | Furthest back a post search may look, in days. Recent search cannot exceed 7. |
| POSTS_DEFAULT_TIMEOUT_MS | No | Timeout for a posts call in milliseconds when the call does not request one. |
| POSTS_MIN_TIMEOUT_MS | No | Lowest timeout a posts call may request, in milliseconds. |
| POSTS_MAX_TIMEOUT_MS | No | Highest timeout a posts call may request, in milliseconds. |
| USERS_MAX_USERNAMES | No | Usernames accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_MAX_IDS | No | User ids accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_DEFAULT_RESULTS | No | Users returned per page when the call does not ask for a count. |
| USERS_MAX_RESULTS | No | Upper bound for users per page. |
| USERS_DEFAULT_TIMEOUT_MS | No | Timeout for a users call in milliseconds when the call does not request one. |
| USERS_MIN_TIMEOUT_MS | No | Lowest timeout a users call may request, in milliseconds. |
| USERS_MAX_TIMEOUT_MS | No | Highest timeout a users call may request, in milliseconds. |
| LISTS_DEFAULT_RESULTS | No | Items returned per list page when the call does not ask for a count. |
| LISTS_MAX_RESULTS | No | Upper bound for items per list page. The X API caps this at 100. |
| LISTS_DEFAULT_TIMEOUT_MS | No | Timeout for a lists call in milliseconds when the call does not request one. |
| LISTS_MIN_TIMEOUT_MS | No | Lowest timeout a lists call may request, in milliseconds. |
| LISTS_MAX_TIMEOUT_MS | No | Highest timeout a lists call may request, in milliseconds. |
| MEDIA_CHUNK_BYTES | No | Bytes per upload segment. The X APPEND endpoint caps a segment at 5 MB. |
| MEDIA_POLL_INTERVAL_MS | No | How often the upload status is polled while X transcodes a video, in milliseconds. |
| MEDIA_DEFAULT_TIMEOUT_MS | No | Timeout for a whole upload in milliseconds when the call does not request one. |
| MEDIA_MIN_TIMEOUT_MS | No | Lowest timeout an upload may request, in milliseconds. |
| MEDIA_MAX_TIMEOUT_MS | No | Highest timeout an upload may request, in milliseconds. |
| X_API_KEY | Yes | OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens. Secret. |
| X_API_KEY_SECRET | Yes | OAuth 1.0a consumer secret, issued together with X_API_KEY. Secret. |
| X_ACCESS_TOKEN | Yes | User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated. Secret. |
| X_ACCESS_TOKEN_SECRET | Yes | User access token secret, issued together with X_ACCESS_TOKEN. Secret. |
| MEDIA_ROOT | Yes | Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup. |
| MCP_TRANSPORT | No | stdio (client spawns the process) or http (streamable HTTP listener). |
| MCP_NAME | No | Server name reported in the MCP initialize handshake. |
| MCP_PATH | No | HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http. |
| SERVER_PORT | No | TCP port to listen on. Used only when MCP_TRANSPORT=http. |
| SERVER_READ_TIMEOUT | No | HTTP read timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| SERVER_WRITE_TIMEOUT | No | HTTP write timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| LOG_MODE | No | local (text, debug) or prod (JSON, info). Logs go to stderr. |
| MAX_IDLE_CONNS_PER_HOST | No | Idle connections the outbound HTTP client keeps per host. |
| X_DEBUG | No | Log the raw requests sent to the X API. Verbose; the output can contain request details, so keep it off outside debugging. |
| POSTS_MAX_QUERIES | No | Queries accepted in one x_posts_search or x_posts_count call. |
| POSTS_MAX_USERNAMES | No | Usernames accepted in one x_posts_by_user call. |
| POSTS_MAX_IDS | No | Post ids accepted in one x_posts_lookup call. The X API caps this at 100. |
| POSTS_DEFAULT_RESULTS | No | Posts returned per query when the call does not ask for a count. Every post returned is billed. |
| POSTS_MAX_RESULTS | No | Upper bound for posts per query. The X API caps this at 100. |
| POSTS_DEFAULT_DAYS | No | How far back post searches look when the call does not say, in days. |
| POSTS_MAX_DAYS | No | Furthest back a post search may look, in days. Recent search cannot exceed 7. |
| POSTS_DEFAULT_TIMEOUT_MS | No | Timeout for a posts call in milliseconds when the call does not request one. |
| POSTS_MIN_TIMEOUT_MS | No | Lowest timeout a posts call may request, in milliseconds. |
| POSTS_MAX_TIMEOUT_MS | No | Highest timeout a posts call may request, in milliseconds. |
| USERS_MAX_USERNAMES | No | Usernames accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_MAX_IDS | No | User ids accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_DEFAULT_RESULTS | No | Users returned per page when the call does not ask for a count. |
| USERS_MAX_RESULTS | No | Upper bound for users per page. |
| USERS_DEFAULT_TIMEOUT_MS | No | Timeout for a users call in milliseconds when the call does not request one. |
| USERS_MIN_TIMEOUT_MS | No | Lowest timeout a users call may request, in milliseconds. |
| USERS_MAX_TIMEOUT_MS | No | Highest timeout a users call may request, in milliseconds. |
| LISTS_DEFAULT_RESULTS | No | Items returned per list page when the call does not ask for a count. |
| LISTS_MAX_RESULTS | No | Upper bound for items per list page. The X API caps this at 100. |
| LISTS_DEFAULT_TIMEOUT_MS | No | Timeout for a lists call in milliseconds when the call does not request one. |
| LISTS_MIN_TIMEOUT_MS | No | Lowest timeout a lists call may request, in milliseconds. |
| LISTS_MAX_TIMEOUT_MS | No | Highest timeout a lists call may request, in milliseconds. |
| MEDIA_CHUNK_BYTES | No | Bytes per upload segment. The X APPEND endpoint caps a segment at 5 MB. |
| MEDIA_POLL_INTERVAL_MS | No | How often the upload status is polled while X transcodes a video, in milliseconds. |
| MEDIA_DEFAULT_TIMEOUT_MS | No | Timeout for a whole upload in milliseconds when the call does not request one. |
| MEDIA_MIN_TIMEOUT_MS | No | Lowest timeout an upload may request, in milliseconds. |
| MEDIA_MAX_TIMEOUT_MS | No | Highest timeout an upload may request, in milliseconds. |
| X_API_KEY | Yes | OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens. Secret. |
| X_API_KEY_SECRET | Yes | OAuth 1.0a consumer secret, issued together with X_API_KEY. Secret. |
| X_ACCESS_TOKEN | Yes | User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated. Secret. |
| X_ACCESS_TOKEN_SECRET | Yes | User access token secret, issued together with X_ACCESS_TOKEN. Secret. |
| MEDIA_ROOT | Yes | Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup. |
| MCP_TRANSPORT | No | stdio (client spawns the process) or http (streamable HTTP listener). |
| MCP_NAME | No | Server name reported in the MCP initialize handshake. |
| MCP_PATH | No | HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http. |
| SERVER_PORT | No | TCP port to listen on. Used only when MCP_TRANSPORT=http. |
| SERVER_READ_TIMEOUT | No | HTTP read timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| SERVER_WRITE_TIMEOUT | No | HTTP write timeout as a Go duration. Used only when MCP_TRANSPORT=http. |
| LOG_MODE | No | local (text, debug) or prod (JSON, info). Logs go to stderr. |
| MAX_IDLE_CONNS_PER_HOST | No | Idle connections the outbound HTTP client keeps per host. |
| X_DEBUG | No | Log the raw requests sent to the X API. Verbose; the output can contain request details, so keep it off outside debugging. |
| POSTS_MAX_QUERIES | No | Queries accepted in one x_posts_search or x_posts_count call. |
| POSTS_MAX_USERNAMES | No | Usernames accepted in one x_posts_by_user call. |
| POSTS_MAX_IDS | No | Post ids accepted in one x_posts_lookup call. The X API caps this at 100. |
| POSTS_DEFAULT_RESULTS | No | Posts returned per query when the call does not ask for a count. Every post returned is billed. |
| POSTS_MAX_RESULTS | No | Upper bound for posts per query. The X API caps this at 100. |
| POSTS_DEFAULT_DAYS | No | How far back post searches look when the call does not say, in days. |
| POSTS_MAX_DAYS | No | Furthest back a post search may look, in days. Recent search cannot exceed 7. |
| POSTS_DEFAULT_TIMEOUT_MS | No | Timeout for a posts call in milliseconds when the call does not request one. |
| POSTS_MIN_TIMEOUT_MS | No | Lowest timeout a posts call may request, in milliseconds. |
| POSTS_MAX_TIMEOUT_MS | No | Highest timeout a posts call may request, in milliseconds. |
| USERS_MAX_USERNAMES | No | Usernames accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_MAX_IDS | No | User ids accepted in one x_users_lookup call. The X API caps this at 100. |
| USERS_DEFAULT_RESULTS | No | Users returned per page when the call does not ask for a count. |
| USERS_MAX_RESULTS | No | Upper bound for users per page. |
| USERS_DEFAULT_TIMEOUT_MS | No | Timeout for a users call in milliseconds when the call does not request one. |
| USERS_MIN_TIMEOUT_MS | No | Lowest timeout a users call may request, in milliseconds. |
| USERS_MAX_TIMEOUT_MS | No | Highest timeout a users call may request, in milliseconds. |
| LISTS_DEFAULT_RESULTS | No | Items returned per list page when the call does not ask for a count. |
| LISTS_MAX_RESULTS | No | Upper bound for items per list page. The X API caps this at 100. |
| LISTS_DEFAULT_TIMEOUT_MS | No | Timeout for a lists call in milliseconds when the call does not request one. |
| LISTS_MIN_TIMEOUT_MS | No | Lowest timeout a lists call may request, in milliseconds. |
| LISTS_MAX_TIMEOUT_MS | No | Highest timeout a lists call may request, in milliseconds. |
| MEDIA_CHUNK_BYTES | No | Bytes per upload segment. The X APPEND endpoint caps a segment at 5 MB. |
| MEDIA_POLL_INTERVAL_MS | No | How often the upload status is polled while X transcodes a video, in milliseconds. |
| MEDIA_DEFAULT_TIMEOUT_MS | No | Timeout for a whole upload in milliseconds when the call does not request one. |
| MEDIA_MIN_TIMEOUT_MS | No | Lowest timeout an upload may request, in milliseconds. |
| MEDIA_MAX_TIMEOUT_MS | No | Highest timeout an upload may request, in milliseconds. |