Kimi Code + iHatePosting

Post to social media from Kimi Code

Connect iHatePosting to Kimi Code, Moonshot AI's coding agent, with one block in ~/.kimi-code/mcp.json, and schedule social posts from your terminal.

Nothing is published unless you ask for it in that message.

Coding agents and editorsMoonshot AI

Kimi Code is Moonshot AI's coding agent for the terminal, and its desktop app shares the same MCP settings. One block in ~/.kimi-code/mcp.json connects it to iHatePosting's hosted server, so you can ask it to announce a release or schedule a thread without leaving your shell.

How do I connect iHatePosting to Kimi Code?

It takes about a minute. Nothing here needs a download, and the only thing you carry between the two apps is a key you can revoke whenever you like.

  1. 1Step 1

    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.

  2. 2Step 2

    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.

    Kimi Code — connector
    {
      "mcpServers": {
        "ihateposting": {
          "url": "https://ihateposting.com/mcp?client=kimi",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
  3. 3Step 3

    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

Every client reaches the same server, and then behaves like itself. These are the things that are true here and not somewhere else.

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 add in 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.json yourself, or type /mcp-config in a session and ask Kimi to add the server. kimi migrate carries 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 /new or restart kimi, then type /mcp to see whether ihateposting connected. Connected only means our server answered, and it answers even when the key is wrong or still reads YOUR_API_KEY; ask Kimi to run the whoami tool, and a wrong key comes back as iHatePosting 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.toml with a [[permission.rules]] entry whose decision is allow and whose pattern is one tool, such as mcp__ihateposting__list_posts. Do not allow mcp__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.json in 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 .env file. If the variable is missing, /mcp shows the server as failed instead of sending a wrong key.

Kimi Code also reads .mcp.json at the root of your git repository, the file Claude Code uses for project servers, and .kimi-code/mcp.json in the folder you start it from; when two define ihateposting, .kimi-code/mcp.json wins, 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

  • You add the connector once — by signing in, or with a key you create
  • Kimi Code reads which accounts you have connected, and each network's rules
  • It writes a version per network and checks it against those rules before sending
  • It saves a draft, schedules it, or publishes — exactly as your message said
  • It works alongside whatever other tools Kimi Code already has
tools Kimi Code can call
# reads — nothing changes
whoami            list_accounts
list_posts        get_post
get_platform_rules  get_analytics
list_media        list_pinterest_boards

# writes — marked as changing things,
# so you are asked first
create_post       update_post
validate_post     reschedule_post
retry_post        delete_post
upload_media

Cost, access and what to do when it breaks

What does it cost?

The connector costs nothing on top of iHatePosting. New accounts get a 90-day free trial with no credit card, and every network on this page is included in it. Paid plans are coming — you will be told what changes before it does.

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.

Frequently asked questions

Is there a kimi mcp add command?

Not 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.

Why does Kimi ask me before every iHatePosting tool?

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.

How do I check that my key works?

/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.

Can I keep my key out of mcp.json?

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.

One connection reaches every network

Connect your accounts in iHatePosting once. From then on Kimi Code can post to any of them, and we publish at the time you set — even after you close the chat.

  • Bluesky
  • X
  • LinkedIn
  • Facebook
  • Instagram
  • Threads
  • Pinterest
  • TikTok
  • YouTube
  • Mastodon
  • Telegram
  • Discord
  • Tumblr
  • Slack

Ready to post everywhere from Kimi Code?

Start your 90-day free trial — no credit card, about a minute to your first post.

Sign Up