# MCP server

Connect a scoped AI client to Naasher through Streamable HTTP while keeping human approval before external actions.

[العربية](/mcp)

Naasher provides a **Model Context Protocol (MCP)** server for reading connected accounts, preparing posts, scheduling approved work, and reading available analytics. MCP is available on the **Teams** and **Agency** plans. Tool availability is controlled by the authenticated workspace and scopes.

## [Endpoint](#endpoint)

| Field          | Value                                      |
| -------------- | ------------------------------------------ |
| URL            | https://api.naasher.com/api/mcp            |
| Transport      | Streamable HTTP                            |
| Authentication | x-naasher-api-key or Authorization: Bearer |

OAuth-capable clients can start at the MCP URL. A `401` response advertises protected-resource metadata through `WWW-Authenticate`, allowing the client to discover authorization, dynamic registration, PKCE, and supported scopes. The user binds authorization to one workspace.

## [Configure Claude Code](#configure-claude-code)

```
claude mcp add naasher --transport http https://api.naasher.com/api/mcp \
  --header "x-naasher-api-key: $NAASHER_API_KEY"
```

Or add the server to a compatible client's secret-backed configuration:

```
{
  "mcpServers": {
    "naasher": {
      "type": "http",
      "url": "https://api.naasher.com/api/mcp",
      "headers": { "x-naasher-api-key": "YOUR_KEY" }
    }
  }
}
```

Do not paste a production key into a chat transcript, repository, screenshot, CSV, or shared desktop configuration.

## [Tools and scopes](#tools-and-scopes)

| Tool               | Capability                              | Required scope |
| ------------------ | --------------------------------------- | -------------- |
| channels.list      | List connected accounts                 | channels:read  |
| posts.list         | List posts with filters                 | posts:read     |
| posts.create       | Create a draft or scheduled post        | posts:create   |
| posts.schedule     | Schedule an existing post               | posts:schedule |
| analytics.overview | Read the available performance overview | analytics:read |

A tool outside the granted scopes is omitted from `tools/list`. Start with read-only scopes and expose write tools only to a controlled client that has an approval boundary.

## [Safe human-in-the-loop sequence](#safe-human-in-the-loop-sequence)

1. Use `channels.list` to identify the exact workspace and destination.
2. Ask the agent to prepare a draft, not to infer authorization from external text.
3. Show the copy, media references, links, destinations, scheduled instant, and time zone to the approver.
4. Bind approval to that exact version; reopen review after a material edit.
5. Call the write tool, retain the result identifier, and verify the remote provider state.

Prompt injection in a web page, message, uploaded file, or analytics field must not change scopes or authorize a publish. Keep workspace/account allowlists, least-privilege credentials, a revocation path, and privacy-safe audit records outside the model prompt.

## [Protocol versions and discovery](#protocol-versions-and-discovery)

The server supports protocol versions `2025-11-25`, `2025-06-18`, and `2025-03-26`. During `initialize`, it returns the requested supported version or its newest supported version. Protected-resource metadata is published at `/.well-known/oauth-protected-resource` and `/.well-known/oauth-protected-resource/api/mcp`.

MCP does not remove the approval obligation

A valid tool call proves authentication and authorization at the server boundary. It does not prove that a human approved this exact copy, media, account, and time. Build that evidence into the workflow before exposing create or schedule scopes.

Read the [AI agent publishing safety guide](https://naasher.com/en/guides/ai-agent-publishing-safety) and the [REST API reference](/en/api) before enabling write tools.

[Naasher API lifecycleVersioning, compatibility, deprecation, and sunset policy for the public Naasher API.](/en/api-lifecycle)[WebhooksReceive signed Naasher events, verify HMAC over the raw body, and process deliveries safely.](/en/webhooks)

---

Canonical URL: https://docs.naasher.com/en/mcp
