truth-social-mcp
Truth Social MCP
A local Python MCP 2.x server for explicitly authorized Truth Social access. It keeps model-facing tools separate from credential setup, defaults to read-only, and treats all social content as untrusted external data.
Current safety boundary
Truth Social's current Terms of Service
prohibit automated/non-human access and data extraction unless separately
authorized. The server therefore starts and
negotiates MCP normally, but live network calls fail closed until
TRUTH_SOCIAL_MCP_AUTHORIZED=1 is configured. Set that variable only after
obtaining written authorization or an official API agreement.
This project does not bypass Cloudflare, impersonate a browser, or treat a logged-in browser session as API authorization.
Related MCP server: x-mcp
Requirements
Python 3.10+
An OS credential store supported by Python
keyring(macOS Keychain on macOS)An externally issued bearer token for authenticated tools
Written permission or an official Truth Social API agreement for live use
uv0.11.26 for the reproducible locked installation below
Install
From a source checkout, install the exact dependency graph recorded in
uv.lock:
cd /absolute/path/to/truth-social-mcp
uv sync --locked --extra dev --no-editable --python python3Portable pip fallback (compatible, but not locked to the exact transitive
versions in uv.lock):
cd /absolute/path/to/truth-social-mcp
python3 -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/pip install '.[dev]'The install creates two cwd-independent commands:
.venv/bin/truthsocial-mcp— MCP stdio server.venv/bin/truthsocial-auth— out-of-band token management
The two console commands are part of the installed Python distribution. By
contrast, run.sh is a convenience launcher that belongs to the source
checkout; it resolves that checkout's .venv regardless of the MCP host's
working directory. A wheel installation does not install run.sh or the
config-examples directory.
Configure a token safely
Never paste a password, OTP, bearer token, cookie, or access code into an MCP conversation. Import an externally authorized token directly in Terminal:
.venv/bin/truthsocial-auth set-token --username your_handle --scope read
.venv/bin/truthsocial-auth statusDeclared scopes are enforced locally as an additional safety gate. If an
authorized token is permitted to perform every supported mutation, import it
with --scope read --scope write --scope follow; write covers post/media/
like/retruth/delete operations, while follow covers follow/unfollow. Enabling
the write environment flag alone never overrides a missing local scope.
The command prompts for the token without echoing it. The token is stored in the
operating-system credential store selected by keyring (Keychain on macOS).
~/.truth_social_mcp/session.json contains only non-secret metadata and is
written atomically with mode 0600 inside a 0700 directory.
To remove the token:
.venv/bin/truthsocial-auth clearRun and register
For a normal environment installation, point the MCP host directly at the installed console command:
{
"mcpServers": {
"truth-social": {
"command": "/absolute/path/to/truth-social-mcp/.venv/bin/truthsocial-mcp",
"args": []
}
}
}Codex registration for the installed console command:
codex mcp add truth-social -- /absolute/path/to/truth-social-mcp/.venv/bin/truthsocial-mcpWhen Codex should follow the source checkout's .venv, the repository launcher
is equivalent:
codex mcp add truth-social -- /absolute/path/to/truth-social-mcp/run.shconfig-examples/continue_config.yaml is the current Continue configuration.
continue_config.legacy.json is retained only for older Continue releases that
still use the deprecated JSON configuration.
The server is intentionally useful even when network access is disabled:
truth_auth_status reports local configuration without reading the network.
Authorization and environment
After written authorization or an official API agreement, enable live calls in the MCP host's environment:
TRUTH_SOCIAL_MCP_AUTHORIZED=1Optional settings:
Variable | Default | Purpose |
|
| Permit live API calls after external authorization |
|
| Register mutation tools at startup |
|
|
|
|
| Maximum local media size |
|
| Request timeout |
|
| API origin; mainly for authorized/test deployments |
|
| Permit a non-Truth-Social HTTPS test/authorized origin |
|
| Honest client identification |
Tool surface
Default server tools:
Local:
truth_auth_status,truth_logoutPublic API:
truth_instance_info,truth_lookup_user,truth_get_user_posts,truth_get_statusToken-required reads:
truth_verify,truth_get_user,truth_followers,truth_following,truth_home_timeline,truth_trending,truth_get_thread,truth_search,truth_notifications
Truth Social's removed public timeline endpoint is not advertised. Search and trending are correctly marked token-required rather than returning fake empty results.
When both TRUTH_SOCIAL_MCP_AUTHORIZED=1 and
TRUTH_SOCIAL_MCP_ALLOW_WRITES=1 are present at server startup, these additional
tools are registered:
truth_post_status,truth_delete_statustruth_like,truth_unliketruth_reblog,truth_unreblogtruth_follow,truth_unfollowtruth_upload_media
Every mutation requires schema-level confirm: true. Posting also uses an
idempotency key. Uploads accept only relative paths beneath configured roots,
reject symlinks and non-regular files, enforce size limits, and verify supported
media signatures.
Error behavior
MCP 2.x validates tool arguments before executing handlers.
Tool failures return real
isError: trueresults.Upstream HTML, response bodies, tokens, cookies, usernames, query strings and local paths are not copied into error messages.
Stable error codes distinguish missing auth, forbidden access, missing resources/endpoints, rate limits, invalid payloads and network failures.
Public and authenticated HTTP traffic use physically separate clients; anonymous calls cannot inherit an account token or cookie.
Test
.venv/bin/pytest
.venv/bin/python -m pip check
uv lock --checkThe default suite uses in-memory MCP sessions and httpx.MockTransport; it does
not contact Truth Social and never performs a real post, like, follow, upload or
delete. A subprocess test starts run.sh from outside the repository to protect
against cwd/import regressions and also exercises the installed console
entrypoint. CI repeats the locked install and full suite on Python 3.10, 3.11,
and 3.12.
Known external limitations
Truth Social does not currently publish a stable, generally authorized API contract for this use. Endpoint availability, authentication requirements, Cloudflare policy and account permissions may change independently of this server. Passing local tests proves the MCP implementation, not external API permission or future availability.
License
MIT. See LICENSE.
Available Tools
15 toolstruth_auth_statusARead-onlyIdempotent
Show local token/configuration state without contacting Truth Social.
Inputs: no named parameters. Returns: object
truth_followersARead-onlyIdempotent
List followers for an account. An authorized token is required.
Inputs: account_id (required), limit. Returns: object
truth_followingARead-onlyIdempotent
List accounts followed by a user. An authorized token is required.
Inputs: account_id (required), limit. Returns: object
truth_get_statusARead-onlyIdempotent
Fetch one public Truth Social post by numeric ID.
Inputs: status_id (required). Returns: object
truth_get_threadARead-onlyIdempotent
Fetch a post and its ancestors/descendants. An authorized token is required for context.
Inputs: status_id (required). Returns: object
truth_get_userBRead-onlyIdempotent
Fetch a Truth Social account by numeric ID. An authorized token is required.
Inputs: account_id (required). Returns: object
truth_get_user_postsBRead-onlyIdempotent
Fetch recent public posts for a username. Pagination IDs must be numeric.
Inputs: username (required), limit, max_id, pinned, +3 more. Returns: object
truth_home_timelineARead-onlyIdempotent
Fetch the authorized account's home timeline.
Inputs: limit, max_id, since_id. Returns: object
truth_instance_infoARead-onlyIdempotent
Fetch public Truth Social instance capabilities and limits.
Inputs: no named parameters. Returns: object
truth_logoutADestructiveIdempotent
Delete the locally stored Truth Social token from Keychain. Requires explicit confirmation.
Inputs: confirm (required). Returns: object
truth_lookup_userARead-onlyIdempotent
Resolve a public Truth Social username to a compact account record.
Inputs: username (required). Returns: object
truth_notificationsBRead-onlyIdempotent
Fetch notifications for the authorized account.
Inputs: limit, max_id, since_id, exclude_types. Returns: object
truth_searchARead-onlyIdempotent
Search statuses, accounts or hashtags. Truth Social requires an authorized token.
Inputs: query (required), limit, resolve, search_type. Returns: object
truth_trendingARead-onlyIdempotent
Fetch trending statuses. Truth Social currently requires an authorized token.
Inputs: limit. Returns: object
truth_verifyARead-onlyIdempotent
Verify the configured bearer token and return its account.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct resource and action: posts (get_status, get_thread), search, users (lookup_user, get_user, get_user_posts), relationships (followers, following), timelines (home_timeline, trending), notifications, and auth (auth_status, logout, verify). Even get_status and get_thread are clearly differentiated by thread context.
All tools share the truth_ prefix, but the pattern after the prefix is inconsistent: some are verb_noun (get_status, lookup_user), some are single verbs (search, logout), and some are bare nouns (followers, trending). This mixed style makes the set less predictable.
15 tools is within the well-scoped range for a social media API server, covering posts, users, relationships, timelines, notifications, and auth. Each tool serves a clear purpose without feeling bloated.
The tool set is heavily read-oriented and lacks any write operations such as posting, liking, replying, or following. While it covers the main read paths, the absence of social interactions makes it an incomplete client for the stated domain.
Maintenance
Related MCP Connectors
Twitter/X read-only MCP server — 12 tools: search, users, tweets, followers, timelines, trends.
Official MCP server for twitterapis.com. Twitter/X search, users, DMs, Grok, monitoring and writes.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Mastodon MCP — public Mastodon data via mastodon.social (no auth required)
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA read-only X/Twitter MCP server that enables data retrieval for user profiles, tweets, and social graphs using OAuth 2.0 Bearer Token authentication. It supports searching recent tweets, viewing timelines, and tracking engagement metrics like followers, likes, and retweets.3MIT
- FlicenseNot gradedqualityBmaintenanceRead-only MCP server for public X/Twitter search and retrieval via twitter.2-38.com-
- AlicenseAqualityBmaintenanceMCP server for the Twitter/X API, enabling search, user profiles, tweets, followers, and more via natural language.941,114 npm6MIT
- AlicenseAqualityBmaintenanceMCP server to read X (Twitter) posts, threads, replies, quotes, and search using your own logged-in session, no API key required.8177 PyPI4MIT