Kimi Code + iHatePosting
Post to social media from Kimi Code
Connect Kimi Code to iHatePosting and ask it to write, schedule and publish posts to 15 social networks. iHatePosting's hosted MCP server gives Kimi Code 16 tools to create, reschedule and check posts, with you approving everything in one calendar. Setup takes about a minute and is included in the free 90-day trial.
Connect iHatePosting to Kimi Code, Moonshot AI's coding agent, with one block in ~/.kimi-code/mcp.json, and post to 15 networks. Free 90-day trial.
How do I connect iHatePosting to Kimi Code?
Create an iHatePosting API key
Sign in, open Settings → Developers and create a key. It starts with pk_live_, and the same page can show it again whenever you need it.
Add iHatePosting to Kimi Code
Add to ~/.kimi-code/mcp.json for every project. On Windows that file is %USERPROFILE%\.kimi-code\mcp.json, and if you set KIMI_CODE_HOME it is the mcp.json in that folder instead. If the file already has an mcpServers object, add only the ihateposting entry inside it. Kimi Code loads MCP servers only when a session starts, so run /new or restart kimi after you save. The Kimi Code desktop app reads this same file. A project's .kimi-code/mcp.json works too, but do not commit it with your key inside. Replace YOUR_API_KEY with your key.
{
"mcpServers": {
"ihateposting": {
"url": "https://ihateposting.com/mcp?client=kimi",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Ask it to post
Tell Kimi Code what you want to say and where. It saves a draft in iHatePosting unless you ask for the post to go out now or at a set time.
What is different about Kimi Code
- Leave out a transport line. Kimi Code reads an entry with a url and no transport as Streamable HTTP, the only kind of server ours is; transport set to sse would switch it to the older SSE transport, which never connects here.
- There is no
kimi mcp addin Kimi Code: that command, and the file~/.kimi/mcp.json, belong to the old Python kimi-cli, which Moonshot AI has archived. Edit~/.kimi-code/mcp.jsonyourself, or type/mcp-configin a session and ask Kimi to add the server.kimi migratecarries servers over from the old CLI, but not their sign-ins. - Kimi Code reads MCP servers only when a session starts. After you save, type
/newor restart kimi, then type/mcpto see whether ihateposting connected. Connected only means our server answered, and it answers even when the key is wrong or still readsYOUR_API_KEY; ask Kimi to run the whoami tool, and a wrong key comes back asiHatePosting API 401. - In its default mode, Always Ask, Kimi Code asks before every iHatePosting tool call; only its own read-only tools run unasked. Choose Approve for this session and Kimi stops asking about that one tool until the session ends, or allow single tools for good in
~/.kimi-code/config.tomlwith a [[permission.rules]] entry whose decision is allow and whose pattern is one tool, such asmcp__ihateposting__list_posts. Do not allowmcp__ihateposting__*, which would let Kimi publish and delete without asking. - Ask When Needed mode (
/yolo, or kimi--yolo) and Never Ask mode (/auto) run MCP tool calls without asking, so in those modes Kimi can publish or delete a post with no prompt. A post it creates is still saved as a draft unless you ask for it to go out now or at a set time. - Your key sits in
mcp.jsonin plain text. To keep it out of the file, replace the headers line with "bearerTokenEnvVar": "IHATEPOSTING_API_KEY" and set that variable in the environment kimi starts from; Kimi Code reads no.envfile. If the variable is missing,/mcpshows the server as failed instead of sending a wrong key. - Kimi Code also reads
.mcp.jsonat the root of your git repository, the file Claude Code uses for project servers, and.kimi-code/mcp.jsonin the folder you start it from; when two define ihateposting,.kimi-code/mcp.jsonwins, then.mcp.json, then your global file. Kimi expands no${VAR}in a header, so an entry that relies on one for Claude Code is sent as that literal text and every tool answers 401. Keep a key out of any file you commit. Kimi lists project servers in its trust prompt before it loads them in a new folder.
Limits. Kimi Code comes with a Kimi membership: Plus and above on the current plans, or Andante and above on the legacy ones; the Go tier has no coding quota. It can also run on a Kimi Platform API key, or on another provider set up in ~/.kimi-code/config.toml. It runs on macOS, Linux and Windows, where it needs Git for Windows for its Git Bash shell. These steps are for the kimi CLI and the Kimi Code desktop app, which read the same mcp.json; the Kimi Code extension for VS Code manages its servers from its gear menu, under MCP Servers.
Moonshot AI's own documentation: Model Context Protocol in Kimi Code CLI
Nothing goes out unless you say so
Every post Kimi Code writes is saved as a draft in iHatePosting unless you ask for it to be published now or at a set time. Publishing, rescheduling, retrying and deleting are marked as actions that change things, so clients that honour those markings ask you before they run them. Deleting a post in iHatePosting never removes one that is already live on a network.
What is the iHatePosting MCP?
MCP — the Model Context Protocol — is the standard way an assistant plugs into an app it does not own. Our server exposes the accounts you have connected to Kimi Code as tools, so it can draft, check and schedule without you opening a dashboard.
How Kimi Code uses it
tools Kimi Code can call
Read and check 9 tools
whoamilist_accountslist_postsget_postget_analyticsget_platform_ruleslist_medialist_pinterest_boardsvalidate_post
Write 7 tools
create_postupdate_postreschedule_postdelete_postretry_postupload_mediaopen_upload_widget
Cost, access and what to do when it breaks
What does it cost?
The connector costs nothing on top of iHatePosting. iHatePosting has one plan: $15/month billed annually, or $19/month billed monthly, with unlimited social accounts. It is free for 90 days, no credit card needed, and everything is included during the trial: unlimited accounts, unlimited posts, every feature.
How is access secured?
Either you sign in to iHatePosting and approve access, or you create an API key in Settings → Developers. That page can show your key again whenever you need it. Whichever route you take, it reaches only the accounts you have already connected, and you can revoke it at any time without touching the accounts themselves.
Something not working?
- It cannot see any accounts: connect them in iHatePosting first, then ask it to list them again.
- You regenerated your key and it still fails: Regenerate revokes the old key the moment you press it, and a client that is already running keeps sending the old one until you genuinely restart it.
- A post failed: open it in iHatePosting — the failure names the network and repeats what that network actually said.
One connection reaches every network
Frequently asked questions
Start free for 90 daysNot in Kimi Code. That command belonged to the old Python kimi-cli. Add the block to ~/.kimi-code/mcp.json yourself, or type /mcp-config in a session and ask Kimi to add the server.
Always Ask, the default mode, asks before every tool call except Kimi's own read-only tools. Choose Approve for this session to stop it asking about that one tool until the session ends, or allow single tools for good with a [[permission.rules]] entry in ~/.kimi-code/config.toml. Do not allow mcp__ihateposting__*, which includes publishing and deleting.
/mcp shows only that our server answered, and it answers even when the key is wrong. Ask Kimi to run the whoami tool: a wrong key, or one that still reads YOUR_API_KEY, comes back as iHatePosting API 401.
Yes. Replace the headers line with "bearerTokenEnvVar": "IHATEPOSTING_API_KEY" and set that variable in the environment kimi starts from. Kimi Code reads no .env file, and if the variable is missing /mcp shows the server as failed.
Yes. The connector costs nothing on top of iHatePosting, and iHatePosting is free for 90 days, no credit card needed. After that it is $15/month billed annually, or $19 month-to-month, with unlimited accounts.
Any account you have connected in iHatePosting, across 15 networks: Instagram, Facebook, LinkedIn, X, Threads, TikTok, YouTube, Pinterest, Bluesky, Mastodon, Telegram, Discord, Slack, Tumblr and Google Business Profile.
Yes. Put the date and time in the prompt — for example "schedule this for Friday at 9:00 AM" — and Kimi Code schedules the post for then. iHatePosting reads the time in your account's timezone, and you can ask Kimi Code to move a scheduled post to a new time.