Discourse MCP server for AI agents

Read and search a Discourse forum, post topics and replies, send private messages, and manage categories, groups, users and notifications.

DiscourseAPI_KEY

Runs with your users' own Discourse accounts. Credentials stay on prompt-tm.com.

31 tools · 0 triggers

Auth
API key
Tools
31
Triggers
0
Category
Communication

Tools and triggers

  • Get the site info

    DISCOURSE_GET_SITE_BASIC_INFO

    Returns the forum's title, description, logo URLs and login settings. Works without sign-in.read-only

  • List latest topics

    DISCOURSE_LIST_LATEST_TOPICS

    Lists the most recently active topics. Sorted by `order`, descending unless `ascending` is `true`.read-only

  • List top topics

    DISCOURSE_LIST_TOP_TOPICS

    Lists the top topics of a period (`all`, `yearly`, `quarterly`, `monthly`, `weekly`, `daily`).read-only

  • Get a topic

    DISCOURSE_GET_TOPIC

    Returns a topic with its first posts, category, tags and participants.read-only

  • Update a topic

    DISCOURSE_UPDATE_TOPIC

    Changes a topic's title or category, or other fields inside `topic`.destructive

  • Change a topic's status

    DISCOURSE_UPDATE_TOPIC_STATUS

    Closes, pins, archives or hides a topic (or reverses it with `enabled` set to `false`).

  • Delete a topic

    DISCOURSE_REMOVE_TOPIC

    Deletes a topic and its posts. Admins can restore a deleted topic in the forum.destructive

  • Create a topic, post or message

    DISCOURSE_CREATE_TOPIC_POST_PM

    Creates a new topic (`title` and `raw`), a reply in an existing topic (`topic_id` and `raw`), or a private message (`archetype` `private_message` and `target_recipients`). The post appears as the Api-Username user.

  • List latest posts

    DISCOURSE_LIST_POSTS

    Lists the latest posts across all topics. Pass `before` (a post ID) to page back.read-only

  • Get a post

    DISCOURSE_GET_POST

    Returns one post by ID. `actions_summary` entries with `id` 2 are likes; without one the post has no likes.read-only

  • Edit a post

    DISCOURSE_UPDATE_POST

    Replaces a post's text (`post.raw`) and can add an edit reason.destructive

  • Delete a post

    DISCOURSE_DELETE_POST

    Deletes a post. Set `force_destroy` to remove it for good instead of marking it deleted (admins only).destructive

  • Search the forum

    DISCOURSE_SEARCH

    Searches topics and posts. `q` takes a search term and filters such as `#category`, `@username` or `tags:x`.read-only

  • List categories

    DISCOURSE_LIST_CATEGORIES

    Lists the forum's categories with their IDs, slugs and topic counts.read-only

  • Get a category

    DISCOURSE_GET_CATEGORY

    Returns one category by ID.read-only

  • List a category's topics

    DISCOURSE_LIST_CATEGORY_TOPICS

    Lists the topics in one category.read-only

  • Create a category

    DISCOURSE_CREATE_CATEGORY

    Creates a category. Needs an admin or a user allowed to create categories.

  • List tags

    DISCOURSE_LIST_TAGS

    Lists the forum's tags with their topic counts.read-only

  • Get a user

    DISCOURSE_GET_USER

    Returns a user's profile by username.read-only

  • List users (directory)

    DISCOURSE_LIST_USERS_PUBLIC

    Lists users from the public directory, ordered by `order` over a `period`.read-only

  • List users (admin)

    DISCOURSE_ADMIN_LIST_USERS

    Lists users with admin details. Needs an admin key; `show_emails` adds email addresses.read-only

  • Get a user (admin)

    DISCOURSE_ADMIN_GET_USER

    Returns a user by numeric ID with admin details. Needs an admin key.read-only

  • List groups

    DISCOURSE_LIST_GROUPS

    Lists the groups the user can see.read-only

  • Get a group

    DISCOURSE_GET_GROUP

    Returns one group by its name.read-only

  • List group members

    DISCOURSE_LIST_GROUP_MEMBERS

    Lists the members of a group, by group name.read-only

  • Add group members

    DISCOURSE_ADD_GROUP_MEMBERS

    Adds users to a group by username. Needs the group's owner or an admin.

  • Remove group members

    DISCOURSE_REMOVE_GROUP_MEMBERS

    Removes users from a group by username. Needs the group's owner or an admin.destructive

  • List notifications

    DISCOURSE_GET_NOTIFICATIONS

    Lists the notifications of the Api-Username user.read-only

  • Mark notifications as read

    DISCOURSE_MARK_NOTIFICATIONS_AS_READ

    Marks one notification (`id`) or, without `id`, all of them as read.

  • Bookmark a topic

    DISCOURSE_BOOKMARK_TOPIC

    Bookmarks a topic for the Api-Username user.

  • List a user's private messages

    DISCOURSE_LIST_USER_PRIVATE_MESSAGES

    Lists the private messages of a user, by username.read-only

Try Discourse now

Sign in, connect your account and run any of these in the playground, or ask your agent through the router.

Try it free

Connect via MCP

Create an MCP server for Discourse in the dashboard, then add its URL to your client. This is the Claude Code command; the client guide has the others.

terminal
claude mcp add --transport http discourse \
  "https://www.prompt-tm.com/mcp/<server id>?user_id=<your user>" \
  --header "x-api-key: ptm_…"

Connect via REST

Run a tool with one request. The response is { data, error, successful, log_id } for every tool.

terminal
curl -X POST https://www.prompt-tm.com/api/v3/tools/execute/DISCOURSE_GET_SITE_BASIC_INFO \
  -H "x-api-key: $PROMPT_TM_KEY" -H "content-type: application/json" \
  -d '{ "user_id": "alice", "arguments": {} }'

Discourse questions