Ed Discussions MCP Server

Ed Discussions MCP Server

Enables AI assistants to interact with Ed Discussions (EdStem) course discussions, manage threads, comments, and facilitate Q&A, with tools for analytics and read status control.

Category
访问服务器

README

Ed Discussions MCP Server

A comprehensive Model Context Protocol (MCP) server for Ed Discussions (EdStem) platform, enabling AI assistants to interact with course discussions, manage threads, comments, and facilitate Q&A.

Status

Functional - Core MCP server with 16 tools implemented and tested

Features

Implemented Tools (16)

System Tools

  • ed_health_check - Check API connectivity and authentication

User Tools

  • ed_get_current_user - Get authenticated user information

Course Tools

  • ed_list_courses - List all enrolled courses
  • ed_get_course - Get detailed course information

Thread Tools

  • ed_list_threads - List threads with filtering and sorting
  • ed_get_thread - Get thread details (with optional mark_as_read control)
  • ed_create_thread - Create new question/post/announcement
  • ed_update_thread - Update thread content or settings
  • ed_delete_thread - Delete a thread
  • ed_mark_thread_read - Mark a thread as read
  • ed_mark_thread_unread - Mark a thread as unread

Comment Tools

  • ed_list_comments - List all comments (thread + answer replies) with participant metadata
  • ed_create_comment - Add comment to thread
  • ed_update_comment - Update/endorse comment
  • ed_delete_comment - Remove comment

Analytics Tools

  • ed_course_activity_stats - Generate student-only leaderboards for activity, answers, hearts, questions, and posts

Setup

Prerequisites

  • Node.js 18+
  • Ed Discussions account with API access
  • API token from your institution's Ed instance

Installation

  1. Get your Ed API token:

    • Log into Ed Discussions
    • Navigate to: https://us.edstem.org/settings/api-tokens
    • Generate a new token
  2. Clone and configure:

git clone https://github.com/yourusername/mcp-ed.git
cd mcp-ed
  1. Create .env file:
ED_API_TOKEN=your-token-here
ED_DOMAIN=edstem.org
ED_REGION=us  # or your region (au, uk, etc.)
  1. Install and build:
npm install
npm run build
  1. Test connection:
node build/testConnection.js  # Test API connection
node build/testMCPServer.js   # Test MCP server

Usage

With Claude Desktop

Add to your Claude Desktop configuration (%APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "ed-discussions": {
      "command": "node",
      "args": ["/path/to/mcp-ed/build/index.js"],
      "env": {
        "ED_API_TOKEN": "your-token-here",
        "ED_DOMAIN": "edstem.org",
        "ED_REGION": "us"
      }
    }
  }
}

Standalone Server

npm start  # Runs the MCP server on stdio

Using the Inspector

npx @modelcontextprotocol/inspector build/index.js

API Examples

List courses

{
  "name": "ed_list_courses",
  "arguments": {}
}

Get threads from a course

{
  "name": "ed_list_threads",
  "arguments": {
    "course_id": "81559",
    "limit": 10,
    "sort": "new",
    "filter": "unread"
  }
}

Get thread without marking as read

{
  "name": "ed_get_thread",
  "arguments": {
    "course_id": "81559",
    "thread_id": "6873464",
    "mark_as_read": false  // Prevents marking thread as seen
  }
}

Generate course activity stats

{
  "name": "ed_course_activity_stats",
  "arguments": {
    "course_id": "81559",
    "max_entries": 20
  }
}

Create a new thread

{
  "name": "ed_create_thread",
  "arguments": {
    "course_id": "81559",
    "type": "question",
    "title": "Help with assignment",
    "content": "I'm having trouble with...",
    "category": "Assignments",
    "is_anonymous": false
  }
}

Development

Project Structure

mcp-ed/
├── src/
│   ├── index.ts           # MCP server implementation
│   ├── edClient.ts        # Ed API client
│   ├── testConnection.ts  # API connection tester
│   └── testMCPServer.ts   # MCP server tester
├── build/                 # Compiled JavaScript
├── .env                   # API credentials (git-ignored)
└── package.json

Scripts

npm run build       # Compile TypeScript
npm run dev:watch   # Development mode with auto-rebuild
npm run test        # Run tests
npm run lint        # Lint code
npm start          # Run MCP server

Testing

The server includes comprehensive test suites:

  • testConnection.ts - Tests Ed API connectivity
  • testMCPServer.ts - Tests all MCP tools

Architecture

Built on the Model Context Protocol SDK, following the successful patterns from the Canvas LMS MCP implementation:

  • TypeScript for type safety
  • Axios for HTTP requests
  • MCP SDK for protocol implementation
  • Modular design for easy extension

Read Status Control

The Ed MCP Server provides fine-grained control over thread read status:

  • Read without marking: Set mark_as_read: false when calling ed_get_thread
  • Default behavior: Threads are marked as read when accessed (preserves normal Ed behavior)
  • Manual control: Use ed_mark_thread_read and ed_mark_thread_unread tools
  • Preserves privacy: Reading threads without marking them prevents others from knowing you've read them

Security

  • API tokens are stored in environment variables
  • Never commit .env files
  • Supports anonymous posting where allowed
  • Respects course privacy settings

Roadmap

Near-term

  • [ ] Add search functionality
  • [ ] Implement file upload support
  • [ ] Add bulk operations
  • [ ] Create notification system

Long-term

  • [ ] WebSocket support for real-time updates
  • [ ] Analytics and reporting tools
  • [ ] LMS integration features
  • [ ] Advanced filtering and sorting

Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Test thoroughly
  4. Submit a pull request

Support

  • Issues: https://github.com/yourusername/mcp-ed/issues
  • Discussions: Use GitHub Discussions for questions

License

MIT - See LICENSE file for details

Acknowledgments

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选