Discourse MCP server
95 operations38 webhooks
Run a Discourse forum: topics, posts, private messages, categories, tags, groups, users, badges, invites, notifications, search, uploads and backups (95 operations), plus signed webhooks.
Try Discourse with your agent
Connect Discourse, then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.
Using Corsair, show me what you can do in Discourse on my account, then run one read-only example and show me the result.
Discourse tools and triggers
Tools are what your agent can do in Discourse through Corsair's MCP server. Triggers are the Discourse events a routine can start from.
Users
- ActivateWrite
Activate a user. Needs an admin API key.
users.activate
- Admin GetRead-only
Get a user by id. Needs an admin API key.
users.adminGet
- Admin ListRead-only
List users. Needs an admin API key. (GET /admin/users.json)
users.adminList
- Admin List By FlagRead-only
List users by flag. Needs an admin API key.
users.adminListByFlag
- AnonymizeDestructive
Anonymize a user. Replaces the user's name, email and profile for good. Needs an admin API key.
users.anonymize
- Change PasswordDestructive
Change password. (PUT /users/password-reset/{token}.json)
users.changePassword
- CreateWrite
Creates a user. A forum with hide_email_address_taken on answers success without a user_id (and creates nothing) when the email is taken; with normalize_emails, plus addresses of one inbox count as the same email.
users.create
- DeactivateDestructive
Deactivate a user. Needs an admin API key.
users.deactivate
- DeleteDestructive
Delete a user. Needs an admin API key. Cannot be undone.
users.delete
- GetRead-only
Get a single user by username. (GET /u/{username}.json)
users.get
- Get By External IdRead-only
Get a user by external_id. (GET /u/by-external/{external_id}.json)
users.getByExternalId
- Get By Provider External IdRead-only
Get a user by identity provider external ID.
users.getByProviderExternalId
- Get EmailsRead-only
Get email addresses belonging to a user.
users.getEmails
- List ActionsRead-only
Get a list of user actions. (GET /user_actions.json)
users.listActions
- List DirectoryRead-only
Get a public list of users. (GET /directory_items.json)
users.listDirectory
- Log OutDestructive
Log a user out. Needs an admin API key. (POST /admin/users/{id}/log_out.json)
users.logOut
- MergeDestructive
Merge a user. Merge a user into another user. Requires admin permissions. The source user cannot be a staff member. The merge runs in the background and deletes the source user when complete. Moves everything the user posted to another user and deletes the first one. Needs an admin API key.
users.merge
- Refresh GravatarWrite
Refresh gravatar. (POST /user_avatar/{username}/refresh_gravatar.json)
users.refreshGravatar
- Send Password Reset EmailDestructive
Send password reset email. (POST /session/forgot_password.json)
users.sendPasswordResetEmail
- SilenceDestructive
Silence a user. Needs an admin API key. (PUT /admin/users/{id}/silence.json)
users.silence
- SuspendDestructive
Suspend a user. Needs an admin API key. (PUT /admin/users/{id}/suspend.json)
users.suspend
- UpdateWrite
Update a user. (PUT /u/{username}.json)
users.update
- Update AvatarWrite
Update avatar. (PUT /u/{username}/preferences/avatar/pick.json)
users.updateAvatar
- Update EmailDestructive
Update email. (PUT /u/{username}/preferences/email.json)
users.updateEmail
- Update UsernameDestructive
Update username. (PUT /u/{username}/preferences/username.json)
users.updateUsername
Topics
- BookmarkWrite
Bookmark topic. (PUT /t/{id}/bookmark.json)
topics.bookmark
- Create TimerWrite
Create topic timer. (POST /t/{id}/timer.json)
topics.createTimer
- DeleteDestructive
Remove a topic. Cannot be undone. (DELETE /t/{id}.json)
topics.delete
- GetRead-only
Get a single topic. (GET /t/{id}.json)
topics.get
- Get By External IdRead-only
Get topic by external_id. Discourse answers with a redirect to the topic's JSON on the forum's configured hostname; the client follows it and returns the topic.
topics.getByExternalId
- Get PostsRead-only
Get specific posts from a topic. (GET /t/{id}/posts.json)
topics.getPosts
- InviteDestructive
Invite to topic. (POST /t/{id}/invite.json)
topics.invite
- Invite GroupDestructive
Invite group to topic. (POST /t/{id}/invite-group.json)
topics.inviteGroup
- List LatestRead-only
Get the latest topics. (GET /latest.json)
topics.listLatest
- List TopRead-only
Get the top topics filtered by period. (GET /top.json)
topics.listTop
- Set Notification LevelWrite
Set notification level. (POST /t/{id}/notifications.json)
topics.setNotificationLevel
- UpdateWrite
Update a topic. (PUT /t/-/{id}.json)
topics.update
- Update StatusWrite
Update the status of a topic. (PUT /t/{id}/status.json)
topics.updateStatus
- Update TimestampWrite
Update topic timestamp. (PUT /t/{id}/change-timestamp.json)
topics.updateTimestamp
Groups
- Add MembersWrite
Add group members. (PUT /groups/{id}/members.json)
groups.addMembers
- CreateWrite
Create a group. Needs an admin API key. (POST /admin/groups.json)
groups.create
- DeleteDestructive
Delete a group. Needs an admin API key. Cannot be undone.
groups.delete
- GetRead-only
Get a group. (GET /groups/{name}.json)
groups.get
- Get By IdRead-only
Get a group by id. (GET /groups/by-id/{id}.json)
groups.getById
- ListRead-only
List groups. (GET /groups.json)
groups.list
- List MembersRead-only
List group members. (GET /groups/{name}/members.json)
groups.listMembers
- Remove MembersDestructive
Remove group members. Cannot be undone. (DELETE /groups/{id}/members.json)
groups.removeMembers
- UpdateWrite
Update a group. (PUT /groups/{id}.json)
groups.update
Posts
- CreateDestructive
Creates a new topic, a new post, or a private message. Creates a topic (title + raw), a reply (topic_id + raw) or a private message (archetype private_message + target_recipients); it is public on the forum and notifies watchers.
posts.create
- DeleteDestructive
delete a single post. Cannot be undone. (DELETE /posts/{id}.json)
posts.delete
- GetRead-only
Retrieve a single post. This endpoint can be used to get the number of likes on a post using the actions_summary property in the response. actions_summary responses with the id of 2 signify a like. If there are no actions_summary items with the id of 2, that means there are 0 likes.
posts.get
- ListRead-only
List latest posts across topics. (GET /posts.json)
posts.list
- List RepliesRead-only
List replies to a post. (GET /posts/{id}/replies.json)
posts.listReplies
- LockWrite
Lock a post from being edited. (PUT /posts/{id}/locked.json)
posts.lock
- Perform ActionDestructive
Like a post and other actions. (POST /post_actions.json)
posts.performAction
- UpdateWrite
Update a single post. (PUT /posts/{id}.json)
posts.update
Uploads
- Abort MultipartWrite
Abort multipart upload. This endpoint aborts the multipart upload initiated with /create-multipart. This should be used when cancelling the upload. It does not matter if parts were already uploaded into the external storage provider. Needs uploads stored on S3 (enable_direct_s3_uploads).
uploads.abortMultipart
- Batch Presign Multipart PartsRead-only
Generates batches of presigned URLs for multipart parts. Multipart uploads are uploaded in chunks or parts to individual presigned URLs, similar to the one generated by /generate-presigned-put. The part numbers provided must be between 1 and 10000, and a request can have at most 100 part numbers. Needs uploads stored on S3 (enable_direct_s3_uploads).
uploads.batchPresignMultipartParts
- Complete ExternalWrite
Completes a direct external upload. Completes an external upload initialized with /get-presigned-put. The file will be moved from its temporary location in external storage to a final destination in the S3 bucket. An Upload record will also be created in the database in most cases. Needs uploads stored on S3 (enable_direct_s3_uploads).
uploads.completeExternal
- Complete MultipartWrite
Complete multipart upload. Completes the multipart upload in the external store, and copies the file from its temporary location to its final location in the store. All of the parts must have been uploaded to the external storage provider. Needs uploads stored on S3 (enable_direct_s3_uploads).
uploads.completeMultipart
- CreateWrite
Creates an upload. (POST /uploads.json)
uploads.create
- Create MultipartWrite
Creates a multipart external upload. Creates a multipart upload in the external storage provider, storing a temporary reference to the external upload similar to /get-presigned-put. You must have the correct permissions and CORS settings configured in your external provider. We support AWS S3 as the default. Needs uploads stored on S3 (enable_direct_s3_uploads).
uploads.createMultipart
- Generate Presigned PutRead-only
Initiates a direct external upload. Direct external uploads bypass the usual method of creating uploads via the POST /uploads route, and upload directly to an external provider, which by default is S3. Needs uploads stored on S3 (enable_direct_s3_uploads): a local-storage forum answers 400 or 404.
uploads.generatePresignedPut
Badges
- CreateWrite
Create badge. Needs an admin API key. (POST /admin/badges.json)
badges.create
- DeleteDestructive
Delete badge. Needs an admin API key. Cannot be undone.
badges.delete
- GrantDestructive
Grant a badge to a user. (POST /user_badges.json)
badges.grant
- ListRead-only
List badges. Needs an admin API key. (GET /admin/badges.json)
badges.list
- List For UserRead-only
List badges for a user. (GET /user-badges/{username}.json)
badges.listForUser
- UpdateWrite
Update badge. Needs an admin API key. (PUT /admin/badges/{id}.json)
badges.update
Tags
- Create GroupWrite
Creates a tag group. (POST /tag_groups.json)
tags.createGroup
- GetRead-only
Get a specific tag. (GET /tag/{name}.json)
tags.get
- Get GroupRead-only
Get a single tag group. (GET /tag_groups/{id}.json)
tags.getGroup
- ListRead-only
Get a list of tags. (GET /tags.json)
tags.list
- List GroupsRead-only
Get a list of tag groups. (GET /tag_groups.json)
tags.listGroups
- Update GroupWrite
Update tag group. (PUT /tag_groups/{id}.json)
tags.updateGroup
Categories
- CreateWrite
Creates a category. (POST /categories.json)
categories.create
- GetRead-only
Show category. (GET /c/{id}/show.json)
categories.get
- ListRead-only
Retrieves a list of categories. (GET /categories.json)
categories.list
- List TopicsRead-only
List topics. (GET /c/{slug}/{id}.json)
categories.listTopics
- UpdateWrite
Updates a category. (PUT /categories/{id}.json)
categories.update
Backups
- CreateDestructive
Create backup. Needs an admin API key. (POST /admin/backups.json)
backups.create
- DownloadRead-only
Download backup. Returns the archive as a file. Needs the download token from the email backups.sendDownloadEmail sends. A forum that keeps backups in S3 redirects to the storage URL. Needs an admin API key.
backups.download
- ListRead-only
List backups. Needs an admin API key. (GET /admin/backups.json)
backups.list
- Send Download EmailDestructive
Send download backup email. Needs an admin API key.
backups.sendDownloadEmail
Events
- Export IcsRead-only
Export calendar events in iCalendar format. Needs the Discourse Calendar (post event) plugin: without it the route answers 404.
events.exportIcs
- ListRead-only
List calendar events. Needs the Discourse Calendar (post event) plugin: without it the route answers 404.
events.list
Invites
- CreateDestructive
Create an invite. A 429 here usually means the daily invite allowance (max_invites_per_day) is used up: it is not retried.
invites.create
- Create MultipleDestructive
Create multiple invites. (POST /invites/create-multiple.json)
invites.createMultiple
Notifications
- ListRead-only
Get the notifications that belong to the current user.
notifications.list
- Mark ReadWrite
Mark notifications as read. (PUT /notifications/mark-read.json)
notifications.markRead
Private Messages
- ListRead-only
Get a list of private messages for a user.
privateMessages.list
- List SentRead-only
Get a list of private messages sent for a user.
privateMessages.listSent
Site
- GetRead-only
Get site info. Can be used to fetch all categories and subcategories.
site.get
- Get Basic InfoRead-only
Get site basic info. Can be used to fetch basic info about a site.
site.getBasicInfo
Search
- QueryRead-only
Search for a term. (GET /search.json)
search.query
Connect Discourse to Claude, ChatGPT or Cursor
- 1
Connect Discourse in Corsair
Add your Discourse API key once in Corsair. Corsair stores the credential encrypted and makes the Discourse API calls for your agent, so it never goes into a prompt or a config file. Connect Discourse
If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs Discourse. On a ChatGPT personal plan, connect Discourse here first.
- 2
Add Corsair's MCP server to your agent
Every client uses the same address:
https://mcp.corsair.dev/mcpOpen Plugins → Add → Add custom connector, name it Corsair, paste the address, select Continue, then Add.Add a custom MCP server with the address and choose OAuth. Personal plans get read tools only.Add to CursorOr add this to~/.cursor/mcp.json. Cursor opens Corsair to sign in the first time it connects.{ "mcpServers": { "corsair": { "url": "https://mcp.corsair.dev/mcp" } } }Run this, then run/mcpin Claude Code to sign in.claude mcp add --transport http corsair https://mcp.corsair.dev/mcpCodex, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client
- 3
Sign in and choose what needs your approval
Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, Discourse's read and write operations run right away and its 25 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.
FAQ
Install corsair and @corsair-dev/discourse, add the Discourse plugin, and connect with an API key. Then call methods like corsair.discourse.api.backups.create() from your app. Corsair verifies webhooks, and keeps each tenant isolated.
Yes. Discourse requires an API key from your Discourse account or developer dashboard. Create credentials with access that matches what you automate, then paste them into Corsair or connect through managed auth in Hub.
Yes. One Corsair client can hit Discourse, GitHub, Notion, Stripe, and the rest. Trigger Discourse from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.
Teams use Corsair for run a Discourse forum: topics, posts, private messages, categories, tags, groups, users, badges, invites, notifications, search, uploads and backups (95 operations), plus signed webhooks. Common builds include sync jobs, admin tooling, and agents that call Discourse APIs from your backend. Webhook handlers react to Discourse events and fan out to Slack, email, or other plugins in the same tenant.
The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per Discourse API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.
We maintain @corsair-dev/discourse in the open repo. When Discourse ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.
No. Corsair does not read your Discourse data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store Discourse data on your behalf.
Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.
Yes. Put Discourse on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 25 destructive Discourse operations. You can change a link's mode at hub.corsair.dev/me.