devin4discord docs
devin4discord connects a Discord server to a Devin organization. Members ask for work in chat, Devin does it, and the conversation stays in a Discord thread. This page covers setup and every feature.
Getting started
You need two things: Administrator in the Discord server, and a Devin organization with API access.
- Create a service user in Devin. Go to Settings โ Devin API โ Service users, create one and copy its key (it starts with
cog_and is only shown once). Give its role:UseDevinSessions: start tasksViewOrgSessions: follow themManageOrgSessions: send replies, stop and sleepImpersonateOrgSessionsandViewOrgMembership: only if you use Run as Devin users
- Add the bot. Sign in on the home page and click Add to Discord next to your server. Discord asks for View Channels, Send Messages, Send Messages in Threads, Create Public Threads, Create Private Threads, Read Message History, Add Reactions and Embed Links. Keep them all.
- Connect Devin. Click Configure, paste the key and your organization ID (
org-โฆ, shown on the same Devin API page), and save. The key is checked with a read-only call first. - Decide who can use it on the Permissions page. Out of the box, only members with Administrator can start tasks.
- Try it. In a channel, send
@Devin say hi. A thread opens and Devin answers there.
Starting a task
There are four ways to start one. They all do the same thing.
| How | Good for |
|---|---|
Mention: @Devin fix the login redirect | Asking in the flow of a conversation. The thread opens on your message. |
| React to a message with ๐ค | Handing over someone else's bug report as-is. |
| Right-click a message โ Apps โ Send to Devin | Same as the reaction, without leaving a visible emoji. |
/devin start task:โฆ file:โฆ | A fresh request, with an optional file attached. |
Devin gets the message text, its images and files, a link back to the message and who asked. With a mention, it also gets the message you replied to and the last few messages in the channel (up to 50, set on the Channels page).
That extra context is marked untrusted: Devin reads it as background and is told never to follow instructions in it. Only the person who asked gives orders. Role mentions and @everyone don't trigger the bot.
If the server isn't connected to Devin yet, or you don't have permission, the bot replies privately and nothing is started.
Task threads
Every task gets its own thread. The bot posts Devin's messages, PR links and status changes there, and adds whoever asked to the thread.
- Pings: the person who asked is pinged when Devin opens a PR or is waiting on an answer. Nothing else pings.
- Replying: just type in the thread. Messages from members allowed to reply go to Devin, images included, and get a ๐จ reaction once delivered.
- Side chat: start a message with
//and it stays in Discord. - Busy threads: turn on Only forward messages that @mention Devin on the Channels page. Then only messages with
@Devinreach Devin. - Mentions inside a thread are replies to that task, not new tasks.
Stop and sleep
Sleep pauses Devin. The next reply in the thread wakes it up where it left off. Use it when you're waiting on something and don't want it to keep running.
Stop ends the Devin session for good. The thread stays, but stops syncing.
Use the Stop / Sleep buttons on the bot's first message in the thread, @Devin stop / @Devin sleep, or /devin stop / /devin sleep. The bot says who did it in the thread and in the audit log.
The person who started a task can always stop or sleep it. Anyone else needs Manage tasks.
Slash commands
| Command | Does |
|---|---|
/devin start task:โฆ file:โฆ | Start a task. The file is optional. |
/devin status | In a task thread: its status and PRs. |
/devin list | Recent tasks, only from threads you can see. |
/devin stop | In a task thread: stop the task for good. |
/devin sleep | In a task thread: pause it until the next reply. |
Permissions and limits
Access is set per Discord role on the Permissions page.
| Permission | Lets the role |
|---|---|
| Start tasks | Use @Devin, ๐ค, Send to Devin and /devin start, and reply in their own task threads. |
| Reply to tasks | Have their messages in any task thread forwarded to Devin. |
| Manage tasks | Stop, sleep and reply to any task. |
| Change settings | Use this site for the server. |
Each role can also have limits: ACUs per task, tasks per day per member and tasks running at once per member. Empty means no limit. Sleeping tasks count as running; stopped and finished ones don't. A member with several roles gets the most generous value of each.
Members with Discord's Administrator permission have their own row. They can do everything with no limits until you change that row. They, and members with Manage Server, can always change settings, so nobody gets locked out.
Only Discord Administrators can change the Devin connection, role permissions and MCP settings. Other members with Change settings can view them, and on the Channels page they can only change channels Discord lets them view.
Channels
- Allowed: where tasks can be started. Threads inside an allowed channel count too. None ticked means every channel the bot can see.
- Task channel: where threads open. By default that's the channel the request came from. Pick one channel (say
#devin-tasks) to keep them all in one place. - Context messages: how many earlier channel messages (0โ50) go along with an @Devin mention. Default 10.
- Only forward messages that @mention Devin: see Task threads.
The bot's Discord role still decides what it can actually see. If it can't view a channel in Discord, nothing here changes that.
Devin settings
- API key and organization ID: see Getting started. Leave the key field empty when saving to keep the current one. Remove key disconnects the server.
- Default repos:
owner/repo, one per line. Every task starts with them so Devin is in the right code from the start. - Run as Devin users: by default every task is created by the service user. Map a Discord member to their Devin user (
123456789012345678 user-โฆ, one per line) and their tasks and replies are made as them in Devin. Only Discord Administrators can edit this list, each Devin user is checked to be in the org, and every change is audited. - Extra instructions: added to every task's prompt, for example "open PRs as drafts" or your branch naming. When empty, this is used: Work out what is being asked, fix it and open a pull request. If it is unclear or not actionable, say why and what you need.
Tasks are tagged discord, discord-guild:<id> and discord-user:<id> in Devin, so you can filter them there.
MCP server for Devin
The bot forwards messages in both directions on its own. The MCP server is extra: it lets Devin use Discord directly during a task, for example to re-read the thread, look at a linked message or post a summary in #changelog.
- On the MCP page, click Generate token and copy it. It's shown once, and generating a new one revokes the old one.
- In Devin, go to Customize โ MCPs โ Add MCP โ Add custom MCP. Transport HTTP, URL from the MCP page, authentication Auth Header with key
Authorizationand valueBearer <token>. - Click Test tools.
| Tool | Does |
|---|---|
read_task_thread | Read the task's own thread |
post_to_task_thread | Post in it (not after the task is stopped) |
add_reaction | React to a message in it |
list_channels | List the channels it may read and post in |
read_channel | Read a channel allowed under Read, or a public thread in it; for a forum, list its posts |
get_message | Read one message, for example from a link |
post_to_channel | Post in a channel allowed under Post; in a forum, start a post (with a title and tags) or reply in one |
What it can reach: the Read and Post lists on the MCP page. Read follows the Channels page's Allowed list when nothing is ticked (and only channels @everyone can see when that's empty too). Post is off until you tick something. Switch Read or Post to Bot's Discord permissions to follow the bot's role instead: every channel and public thread it can read (or post in), including new ones. Private threads are never readable or postable. Posts never ping anyone.
Task threads need more than the token: each task started while a token exists gets its own task key in its prompt, so a Devin session can only work in its own thread.
Anyone with the token can read and post where it's allowed. Keep it in Devin only, and generate a new one if it leaks.
Audit log
Every settings change, task start, stop and sleep is logged with who did it and when (UTC). Open it from the Audit log tab of a server. Anyone who can change settings can read it.
Security and your data
- Devin keys are encrypted before they're stored and never shown again, not even to admins.
- MCP tokens and task keys are stored as hashes only.
- Messages aren't stored by the bot. They're sent to Devin as part of the task and live in your Devin session. The bot keeps each task's title, thread and session link, and its PR links.
- Untrusted context: channel history, replied-to messages and everything read through MCP is wrapped as untrusted. Devin is told to treat it as information, never as instructions.
- Usage runs on your Devin organization and counts toward its ACUs. Use role limits to keep it in check.
- Sign-in uses Discord OAuth. The site only sees your username, avatar and the list of servers you're in.
The code is open: fmflex/devin4discord on GitHub.
Troubleshooting
- The bot doesn't react when I mention it.
- Check that the server has a Devin key saved, the channel is on the Allowed list (or the list is empty), your role has Start tasks, and the bot's role can view and send messages in that channel. In most of these cases the bot replies privately with the reason.
- My server isn't listed on the site.
- You need Administrator, Manage Server or a role with Change settings. The list is loaded when you sign in, so sign out and back in after getting a new role or adding the bot.
- Replies in the thread don't reach Devin.
- Your role needs Reply to tasks (or Start tasks, for your own tasks). Check that the message doesn't start with
//and that Only forward messages that @mention Devin is off, or mention Devin. Stopped tasks don't take replies. - The bot says I've reached my limit.
- One of your role's limits kicked in: tasks per day or tasks running at once. Stop or finish a task, or ask an admin to raise the limit.
- Saving the Devin key fails.
- Make sure it's a service user key, the organization ID matches, and the service user has the roles listed in Getting started.
Still stuck? Open an issue on GitHub.