Claude MCP: How to Add a Server for Social Posting

Claude MCP setup for a posting agent: add a server in Claude Code or the Claude app, pick a scope, gate each tool and keep every post a draft first.

Claude MCP: How to Add a Server for Social Posting

You asked Claude to post yesterday's slideshow and it answered that it cannot reach TikTok. That is expected: Claude MCP is how Claude reaches tools outside its own chat, and until a server is added, it has none. In Claude Code you add one with claude mcp add --transport http <name> <url>; in the Claude app you add it as a custom connector under Customize, then Connectors.

Adding the server takes two minutes; deciding what it may do without asking you is the part that protects your accounts. This guide walks through both: where the server goes, which scope to pick, how to sign in, how to limit each tool, and why a posting agent should send drafts before it sends anything public.

If the protocol itself is new to you, start with what an MCP server is and come back for the setup.

What You'll Need Before Adding a Claude MCP Server

Three things, and one decision.

The first is a Claude surface. Claude Code, the terminal agent, takes servers from the command line. The Claude app, on the web, desktop and mobile, takes remote servers as connectors. The Claude Desktop app also runs local servers packaged as desktop extensions.

The second is the server's address. A remote server is a URL, usually ending in /mcp. A local server is a command your machine runs, such as an npx package.

The third is a way to authenticate. Most hosted servers sign you in through the browser with OAuth. Some take a fixed API key or token instead, sent as a request header.

The decision is how much the agent may do alone. Write that down before you connect anything that can publish, because every later step turns that answer into a setting.

Step 1: Pick Where Claude Runs

The same server can sit in several places, and each one behaves a little differently.

SurfaceHow you add a serverWhere it livesReaches your local network
Claude Code CLIclaude mcp add~/.claude.json or .mcp.jsonYes
Claude app (web, desktop, mobile)Customize > Connectors > Add > Custom > WebYour Claude accountNo, it connects from Anthropic's cloud
Claude Desktop, localA .mcpb desktop extensionYour computerYes

The last column matters more than it looks. According to Anthropic's connectors help page, custom connectors are reached from Anthropic's cloud infrastructure, not from your machine, even when you use the desktop app. A server behind a firewall or on a private network will fail as a connector and still work in Claude Code.

A posting agent that runs on a schedule, reads files from a repo and calls tools in a loop usually lives in Claude Code. A person asking for one post at a time usually lives in the Claude app.

Step 2: Add the Server With claude mcp add

Run the command in your terminal, not inside a running claude session. You are configuring the server before the conversation starts.

The safest first test is a server that needs no sign-in. The Claude Code docs use their own documentation server for exactly this:

claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp

--transport http says the server is hosted at a URL rather than started as a local process. claude-code-docs is a name you make up; Claude Code uses it to label the server's tools and to find the server in later commands. The command answers with a line like Added HTTP MCP server claude-code-docs ... to local config.

A posting server follows the same shape. If it authenticates with a fixed token instead of a browser sign-in, pass the token at add time:

claude mcp add --transport http posting https://mcp.example.com/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Add a local server

A local server is a program Claude Code starts on your machine. Put its environment variables in --env and separate the server's own command with --:

claude mcp add --transport stdio --env POSTING_API_KEY=YOUR_KEY posting-local \
  -- npx -y your-posting-server

Leave out the -- and Claude Code reads the server's flags as its own, so the server never starts the way you typed it.

Then check the result with claude mcp list. A healthy server shows ✔ Connected.

Step 3: Choose the Scope: Local, Project or User

Every claude mcp add writes to one of three scopes, and the default is the narrowest.

Local is the default. The server is private to you and active only in the project where you ran the command, stored in ~/.claude.json under that project's entry. Start Claude Code in another folder and the server is gone, which surprises almost everyone once.

Project scope writes the server to .mcp.json in the project root, a file you commit. Teammates who clone the repo get a prompt to approve the server before it connects, so a repository cannot launch processes on someone's machine without consent.

User scope stores the server under the top-level mcpServers key in ~/.claude.json and loads it in every project you open, still private to you.

claude mcp add --scope user --transport http claude-code-docs https://code.claude.com/docs/mcp

For a posting agent, project scope is usually right when a team shares the repo that drives the posts, and the token stays out of the file. Write ${POSTING_TOKEN} in .mcp.json and keep the value in each person's environment, so the key never reaches git.

Step 4: Sign In and Pass the Key

Right after adding, a hosted server often shows ! Needs authentication. That is the normal state, not an error.

Start a Claude Code session, type /mcp, select the server, press Enter and choose Authenticate. Your browser opens the service's sign-in page; approve it there, and the status turns to connected.

For a server that takes a fixed key, the --header flag from Step 2 is the whole sign-in. If the server connects but lists no tools, it is usually missing an environment variable such as an API key. Add it with --env KEY=value or in the env field of its .mcp.json entry.

Use a key for each agent

Give every agent its own key, even when they post to the same account. When one agent misbehaves, you revoke one key and the others keep working, and the logs on the other side tell you which agent sent which request.

This is how the Viral Slide Post REST API is built: an account can hold several named, scoped, rate-limited API keys, so each agent gets one. Viral Slide Post is in waitlist stage. Today its dashboard and REST API make slides and AI video clips and send them to TikTok; the MCP server, open source skills, Instagram publishing and scheduled posting are coming. Until then, an agent in Claude Code calls the REST API like any other, with its key in an X-API-Key header, and the agent writes every slide's text itself.

Step 5: Add a Remote Server in the Claude App

In the Claude app, a remote MCP server is a custom connector. Open Customize, then Connectors, select Add, hover over Custom and choose Web. Give it a name, paste the server's URL and select Continue.

Claude then shows the authentication settings it detected. Review them, and change them only if your server needs something different. If the server takes an API key instead of OAuth, add it under Request headers, and Claude sends it with every request. Then select Add and connect it like any directory connector.

Custom connectors are available on the Free, Pro, Max, Team and Enterprise plans, and Free users are limited to one. On a Team plan, only Owners and Primary Owners can add one for the organization.

A connector you add here also follows you into Claude Code: connectors added at claude.ai load automatically in the CLI when you sign in with the same account.

Install a local server as a desktop extension

For a local server in Claude Desktop, the packaged route is a .mcpb file, described in Anthropic's guide to desktop extensions. Go to Settings, then Desktop app, and select Manage next to Extensions. Under Advanced settings, the Extension Developer section has Install Extension, which takes the file.

Fields the extension marks as sensitive, such as an API key, are encrypted in the operating system's secure storage, the Keychain on macOS. If you already configured servers in Claude Desktop's own config file, claude mcp add-from-claude-desktop copies them into Claude Code on macOS and WSL.

Step 6: Decide Which Tools Run Without Asking

A connected server hands Claude every tool it exposes. Some only read, such as listing accounts or fetching analytics. Some publish. Those two groups deserve different rules.

In Claude Code, permission rules name MCP tools as mcp__<server>__<tool>, and mcp__<server>__* covers every tool from one server. The permissions reference spells out the order: deny rules first, then ask, then allow, and the first match wins. A rule like this in .claude/settings.json lets reads through and stops at anything that publishes:

{
  "permissions": {
    "allow": ["mcp__posting__list_*", "mcp__posting__get_*"],
    "ask": ["mcp__posting__publish_*"]
  }
}

The tool names here are placeholders. Run /mcp, select the server and read its real tool list before you write the rule.

Two details save time. An allow rule with a wildcard works only after a literal mcp__<server>__ prefix, so "mcp__*" in an allow list approves nothing. And these rules are enforced by Claude Code, not by the model, so a line in CLAUDE.md asking Claude to be careful is guidance, while a rule here is a gate.

Step 7: Make Drafts the Default for Social Posting

The platforms already push you toward this. TikTok's Direct Post reference states that all content posted by unaudited clients is restricted to private viewing until the API client passes an audit. The privacy level a post asks for also has to be one of the options TikTok returned for that creator, or the request fails.

So a direct post from an agent can land private, fail, or go public under your name with nobody having read it. A draft has none of those problems: it waits in the account for a person to check the text, the cover and the order, then publish.

Viral Slide Post makes that choice per post. Each TikTok post goes out as Save as draft, which lands it in the account's TikTok inbox, or Post to TikTok for a direct post. An agent working through the REST API can send drafts while an account is new, and choose a direct post only once you trust what it writes.

Read MCP or a REST API if you are still choosing how your agent should reach a posting service at all.

Tips for Better Results With a Posting Agent

Small habits keep an agent from posting the same carousel twice or posting at the wrong account.

  • Name the account in every request. "Draft this slideshow for the study app account" leaves less to guess than "post this".
  • Ask for a preview first. Have the agent list the slide text and the caption before it calls any publish tool, so you approve the content, not only the tool call.
  • Keep posting servers out of user scope unless every project you open should be able to post. Project or local scope keeps a test repo from reaching your real accounts.
  • Trust the server before you connect it. Anthropic warns that a malicious MCP server can carry hidden instructions meant to steer Claude, so connect only servers from organizations you trust.

Troubleshooting Common Claude MCP Problems

Most failures show up in claude mcp list or the /mcp panel, and the status tells you where to look.

/mcp says no servers are configured

You most likely added the server from a different folder. Local scope ties a server to the project where you ran the command, so re-add it where you are now, or add it with --scope user. Claude Code reads only ~/.claude.json and <project>/.mcp.json; files such as ~/.claude/mcp.json are never read.

The server fails to connect

Run claude mcp get <name> for the error detail, which often names the problem, such as a missing header or a rejected token. For a remote server, curl -I <url> from your terminal tells you whether it is reachable: a 404 or 405 still means the server is up, and a 401 or 403 means it wants authentication.

Edits to .mcp.json do nothing

Claude Code reads .mcp.json when a session starts, so exit and start a new one. A malformed entry is skipped while the others load, and claude mcp list shows a warning naming the field. If you rejected a project server earlier, claude mcp reset-project-choices brings the prompt back.

The connector works in Claude Code but not in the app

The app connects from Anthropic's cloud, so the server has to be reachable on the public internet. A server on localhost or a company network will only work in Claude Code or as a desktop extension.

What to Remember

Claude MCP is a one-line setup and a longer decision. Add the server with claude mcp add in Claude Code or as a custom connector in the Claude app, and know which of the two reaches your local network.

Pick the scope on purpose: local for a test, project for a shared repo with the token kept in the environment, user only for servers every project should see. Give each agent its own key.

Then gate the tools. Let reads run, make anything that publishes ask, and send drafts until an account and an agent have earned direct posting. The platforms restrict unaudited posting anyway, and a draft costs you one tap.

Your agent can post this. To TikTok.

Your AI agent writes the slides, we render them and send them to TikTok as a draft or a post.

  • REST API
  • Dashboard
  • MCP soon