Edstem MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "ED_API_TOKEN=${ED_API_TOKEN}" edstem-mcp -- node "<FULL_PATH_TO_EDSTEM_MCP>/dist/index.js"

Replace <FULL_PATH_TO_EDSTEM_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:ED_API_TOKEN+ 1 optional
README.md

MCP server for Ed Discussion to expose Ed's full API to MCP clients.

edstem-mcp

MCP server for Ed Discussion — expose Ed's full API to Claude and other MCP clients.

Setup

npm install
npm run build

Set your API token (get one at https://edstem.org/us/settings/api-tokens):

export ED_API_TOKEN=your_token
export ED_REGION=us  # optional: us (default), au, etc.

Claude Code

Add to ~/.claude.json:

{
  "mcpServers": {
    "edstem": {
      "command": "node",
      "args": ["/path/to/edstem-mcp/dist/index.js"],
      "env": {
        "ED_API_TOKEN": "your_token"
      }
    }
  }
}

Tools (22)

Tool Description
get_user Get authenticated user info and enrolled courses
list_threads List threads in a course (sortable, paginated)
get_thread Get thread by global ID with comments
get_course_thread Get thread by course-local number (the # in the UI)
search_threads Search threads by title, content, or category
post_thread Create a new thread (supports markdown input)
edit_thread Edit an existing thread
lock_thread Lock a thread
unlock_thread Unlock a thread
pin_thread Pin a thread
unpin_thread Unpin a thread
endorse_thread Endorse a thread
unendorse_thread Remove thread endorsement
star_thread Star/bookmark a thread
unstar_thread Remove star
post_comment Post a comment or answer on a thread
reply_to_comment Reply to an existing comment
endorse_comment Endorse a comment
unendorse_comment Remove comment endorsement
accept_answer Accept a comment as the answer
list_users List course roster (staff/admin)
list_user_activity List a user's threads and comments
upload_file_from_url Upload a file to Ed from a URL
format_content Preview markdown to Ed XML conversion

Resources (2)

Resource URI Description
User Info edstem://user Authenticated user details
Courses edstem://courses Enrolled courses list

Prompts (3)

Prompt Description
check_assignment Look up assignment details, requirements, and staff clarifications
unanswered_questions List unresolved questions in a course
my_activity Show your recent posts and comments in a course

Content Format

Thread and comment content uses Ed's XML document format. This server auto-converts markdown to Ed XML, so you can write content naturally:

# Heading
**Bold** and *italic* text with `inline code`

- Bullet list
- Items

1. Numbered
2. List

> [!info] This becomes an Ed callout

Pass raw Ed XML (starting with <document) to bypass conversion.

Testing

npm test

Uses Node's built-in test runner (node:test). Tests cover the markdown-to-XML content converter and API client (URL construction, headers, error handling).

Tools (24)

get_userGet authenticated user info and enrolled courses
list_threadsList threads in a course (sortable, paginated)
get_threadGet thread by global ID with comments
get_course_threadGet thread by course-local number
search_threadsSearch threads by title, content, or category
post_threadCreate a new thread (supports markdown input)
edit_threadEdit an existing thread
lock_threadLock a thread
unlock_threadUnlock a thread
pin_threadPin a thread
unpin_threadUnpin a thread
endorse_threadEndorse a thread
unendorse_threadRemove thread endorsement
star_threadStar/bookmark a thread
unstar_threadRemove star
post_commentPost a comment or answer on a thread
reply_to_commentReply to an existing comment
endorse_commentEndorse a comment
unendorse_commentRemove comment endorsement
accept_answerAccept a comment as the answer
list_usersList course roster (staff/admin)
list_user_activityList a user's threads and comments
upload_file_from_urlUpload a file to Ed from a URL
format_contentPreview markdown to Ed XML conversion

Environment Variables

ED_API_TOKENrequiredAPI token from Ed Discussion settings
ED_REGIONEd Discussion region (e.g., us, au)

Configuration

claude_desktop_config.json
{"mcpServers": {"edstem": {"command": "node", "args": ["/path/to/edstem-mcp/dist/index.js"], "env": {"ED_API_TOKEN": "your_token"}}}}

Try it

Search for recent threads about the final project in my CS101 course.
List all unanswered questions in my current course.
Post a new thread in the course with the title 'Question about assignment 3' and the content 'How do I handle edge cases in the input?'
Show me my recent activity in the discussion forum.
Accept the comment with ID 12345 as the answer to the current thread.

Frequently Asked Questions

What are the key features of Edstem MCP?

Full access to Ed Discussion API for managing threads and comments. Automatic conversion of markdown content to Ed's internal XML format. Support for thread moderation actions like locking, pinning, and endorsing. Integration with course roster and user activity tracking. File upload capabilities from external URLs.

What can I use Edstem MCP for?

Students automating the search for assignment clarifications across course threads.. Teaching assistants managing large volumes of student questions by quickly filtering for unanswered posts.. Course staff performing bulk moderation tasks like pinning important announcements or endorsing correct answers.. Users tracking their own participation and contribution history within a course..

How do I install Edstem MCP?

Install Edstem MCP by running: npm install && npm run build

What MCP clients work with Edstem MCP?

Edstem MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Edstem MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare