Official MCP server for PostIdentity - Generate AI-powered social media posts from any AI assistant that supports the Model Context Protocol (MCP).
- π Manage Identities - List, create, and archive your writing personas
- βοΈ Generate Posts - Transform thoughts into posts instantly
- π Refine Posts - Regenerate, shorten, lengthen, or adjust style (1 credit per refinement)
- π Character Limits - Generate posts for Twitter, LinkedIn, or custom lengths
- π Review Posts - Browse your post history on specific identities
- π³ Check Credits - Monitor your credit balance
- π Track Referrals - View your referral stats and code
- ποΈ Browse Marketplace - Discover identity templates
- π Secure - Token-based authentication with RLS protection
Click to watch: See PostIdentity MCP in action
For local AI assistants like Windsurf, Claude Desktop, and other MCP-compatible tools.
- Transport: stdio (stdin/stdout)
- Installation:
npx @postidentity/mcp-server - Best for: Desktop AI assistants
For cloud-based integrations like Gumloop and other HTTP-based MCP clients.
- Endpoint:
https://api.postidentity.com/functions/v1/mcp - Transport: HTTP with JSON-RPC 2.0
- Authentication:
X-API-Keyheader - Best for: Cloud platforms, custom integrations
Example usage:
curl -X POST https://api.postidentity.com/functions/v1/mcp \
-H "X-API-Key: pi_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Both servers provide identical functionality and identical output - just different transport mechanisms.
- Node.js 18+ (for local development)
- A PostIdentity account
- An MCP-compatible AI assistant (Windsurf, Claude Desktop, etc.)
If you're upgrading from v1.x: Access tokens still work, but we strongly recommend switching to API keys for permanent access. Access tokens expire hourly and require manual updates.
- Go to postidentity.com/settings
- Open the "Developers" section
- Click "Create Key"
- Give it a name (e.g., "Windsurf MCP")
- Copy the key immediately - you won't see it again!
Recommended (v2.0+):
{
"mcpServers": {
"postidentity": {
"command": "npx",
"args": [
"-y",
"@postidentity/mcp-server@latest",
"--api-key",
"your_api_key_here"
]
}
}
}Legacy (still supported):
{
"mcpServers": {
"postidentity": {
"command": "npx",
"args": [
"-y",
"@postidentity/mcp-server@latest",
"--access-token",
"YOUR_ACCESS_TOKEN_HERE"
]
}
}
}Get your writing identities.
Parameters:
status(optional): Filter by "active" (default), "archived", or "all"
Examples:
"Show me my PostIdentity identities"
"Show me my archived identities"
"Show me all my identities"
Transform a thought into a post using an identity's style. Supports refinement options.
Parameters:
identity_id(required): Identity UUID or name (e.g., "Tech Blogger")thought_content(required): Your thought/ideacharacter_limit(optional): Max character count (e.g., 280 for Twitter/X)refinement_type(optional): "regenerate", "shorter", "longer", "style_adjust", or "refine"session_id(required for refinements): Random UUID for the refinement sessionprevious_post(required for refinements): The post to refinestyle_adjustment(for "style_adjust"): "more_casual", "more_formal", "add_humor", "more_serious", "more_direct", "add_emojis"custom_feedback(for "refine"): Your specific feedback
Examples:
"Generate a post as Tech Blogger about AI trends"
"Generate a Twitter post (280 chars) as Tech Blogger about AI trends"
Cost: 1 credit per generation or refinement
Check your current credit balance.
Example:
"How many PostIdentity credits do I have?"
Browse your generated posts.
Parameters:
profile_id(optional): Filter by identity UUID or name (e.g., "Tech Blogger")limit(optional): Number of posts (default: 10)
Examples:
"Show me my last 5 posts"
"Show me posts from Tech Blogger"
View your referral code and stats.
Example:
"What's my PostIdentity referral code?"
Browse identity templates in the marketplace.
Parameters:
category(optional): Filter by business/creative/personal
Example:
"Show me business identity templates"
Create a new identity from examples.
Parameters:
name(required): Identity namedescription(required): Writing style descriptionexamples(required): Array of 3+ example posts (more = better accuracy)
Example:
"Create a tech blogger identity with these examples: ..."
Archive an identity (can be restored later).
Parameters:
identity_id(required): Identity UUID or name to archive
Example:
"Archive my Tech Blogger identity"
You: "List my PostIdentity identities"
AI: "Found 2 identities:
1. Tech Thought Leader
ID: abc123...
2. Casual Developer
ID: def456..."
You: "Generate a post as Tech Thought Leader about AI safety"
AI: "β
Post generated successfully!
AI safety isn't about preventing sci-fi scenarios.
It's about ensuring predictable behavior TODAY.
π³ Remaining credits: 45"
You: "Make that post shorter" (with refinement parameters)
AI: "β
Post generated successfully!
AI safety is about predictable behavior TODAY,
not sci-fi scenarios.
π³ Remaining credits: 44" (1 credit charged)
You: "How many credits do I have?"
AI: "π³ Current Balance: 45 credits
β
You can generate 45 more posts"
You: "What's my referral code?"
AI: "π Referral Stats
π Your Code: ABC123XY
π₯ Total Referrals: 3
π° Credits Earned: 15"
# Clone the repository
git clone https://github.com/PostIdentity/mcp-server.git
cd mcp-server
# Install dependencies
npm install
# Build
npm run build
# Run locally
node dist/index.js --access-token YOUR_TOKENβ
Token-based authentication - No passwords stored
β
Row Level Security (RLS) - Database-level access control
β
User isolation - Can only access your own data
β
Credit system - Natural rate limiting
β
Audit trail - All transactions logged
- Verify JSON syntax in config file
- Check token is correct and not expired
- Restart your AI assistant completely
- Check logs for errors
- Get fresh token from postidentity.com/settings
- Update your MCP config with new token
- Restart AI assistant
Buy credits at postidentity.com/credits
- You provide your access token in the MCP config
- Server authenticates using token on startup
- Token is used for all API requests to PostIdentity
- All operations respect your credits and RLS policies
- Free Trial: 5 credits on signup
- Generation: 1 credit per post
- Refinements: 1 credit per refinement
- Referrals: 5 credits per referral (for both users)
- Pricing: Starting at $5 for 15 credits
Refine your generated posts with these options:
- regenerate: Generate a completely new version
- shorter: Reduce length by ~40% while keeping the message
- longer: Add more detail and context
- style_adjust: Apply a single predefined tone change (more casual, formal, humor, etc.)
- refine: Apply any custom feedback, mixed instructions, or specific edits
How It Works: Your AI assistant automatically chooses the right refinement type based on your natural language request:
- "Make it shorter" β
shorter - "Add more humor" β
style_adjust: add_humor - "Make it more direct and remove em dashes" β
refine(custom feedback for mixed instructions) - "Try again" β
regenerate
Note: In the MCP server, all refinements cost 1 credit. The web app at postidentity.com offers the first 3 refinements free per session.
- π Web App: postidentity.com
- π¦ npm Package: @postidentity/mcp-server
- π Issues: GitHub Issues
- π§ Support: support@postidentity.com
Contributions are welcome! Please open an issue or submit a PR.
MIT Β© PostIdentity
Made with β€οΈ by the PostIdentity team