Skip to content

Encapsulate Daemon as MCP and add OpenTeam MCP Server module - #61

Open
techdou wants to merge 4 commits into
afumu:mainfrom
techdou:main
Open

Encapsulate Daemon as MCP and add OpenTeam MCP Server module#61
techdou wants to merge 4 commits into
afumu:mainfrom
techdou:main

Conversation

@techdou

@techdou techdou commented May 27, 2026

Copy link
Copy Markdown

Summary

Add OpenTeam MCP Server module (@afumu/openteam-mcp), enabling AI agents to interact with the OpenTeam local daemon via the Model Context Protocol. Agents can manage group chats, configure roles, post tasks, and read results through a standardized MCP tool interface.

Fixes #

Changes

  • Add packages/openteamcli/mcp/ package with @afumu/openteam-mcp definition, including @modelcontextprotocol/sdk and zod as dependencies
  • Implement MCP server entry point (src/index.ts) with 12 tools:
    • Daemon diagnostics: openteam_ping, openteam_status, openteam_doctor
    • Chat management: openteam_chat_list, openteam_chat_get, openteam_chat_create, openteam_chat_activate, openteam_chat_initialize
    • Role management: openteam_roles_batch_add (supports temporary roles and multiple AI sites: deepseek, chatgpt, gemini, claude, grok)
    • Task operations: openteam_task_post, openteam_task_read, openteam_task_wait
    • One-shot workflow: openteam_run_create_and_post (create chat → add roles → post task → wait for replies, with chat reuse strategies)
  • Add HTTP communication layer with token-based authentication (~/.openteam/control-token) and configurable command timeout
  • Add Cursor IDE MCP configuration (.cursor/mcp.json) for development environment integration
  • Add MCP config example file (mcp-config.example.json) for user reference
  • Add TypeScript build configuration targeting ES2022 / Node16 module resolution

Test results

npm run verify

Manual testing steps:

  1. cd packages/openteamcli/mcp && npm install && npm run build — verify TypeScript compiles without errors
  2. Start the OpenTeam daemon (openteamcli daemon start)
  3. Run the MCP server (node dist/index.js) and verify tool discovery via an MCP client
  4. Test openteam_ping and openteam_doctor to confirm daemon connectivity
  5. Test openteam_run_create_and_post end-to-end: create a chat with roles, post a task, and read replies

Risk / blast radius

Low — This PR adds a new self-contained package under packages/openteamcli/mcp/ with no modifications to existing code. The MCP server is opt-in and only activates when explicitly configured. The daemon HTTP layer depends on the local daemon being running, so it gracefully fails if unavailable.

Checklist

  • npm run verify passes locally
  • No API keys, tokens, or credentials in the diff
  • Related issue is linked above

techdou and others added 4 commits May 27, 2026 01:55
Co-authored-by: traeagent <traeagent@users.noreply.github.com>
Co-authored-by: traeagent <traeagent@users.noreply.github.com>
Co-authored-by: traeagent <traeagent@users.noreply.github.com>
feat: 添加 OpenTeam MCP Server 模块
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant