@wayofmono/wayofteams-tools

pi extension: full WayOfTeams MCP integration (legacy + v2 domain-split) with REST dual path — client-first, per-user JWT

Packages

Package details

extension

Install @wayofmono/wayofteams-tools from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@wayofmono/wayofteams-tools
Package
@wayofmono/wayofteams-tools
Version
0.1.8
Published
Sep 4, 2026
Downloads
1,376/mo · 59/wk
Author
zerwiz
License
MIT
Types
extension
Size
200 KB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@wayofmono/wayofteams-tools

WayOfTeams MCP + REST tools, as a pi extension

Connect the pi coding agent to your WayOfTeams workspace — tickets, plans, docs, standups, kanban, knowledge, memory and more — over the internet, for any tenant, with a single install.

Install · Configure · Commands · Interactive Group Manager · Presets · How it works

pi-package · MCP · REST · client-first · interactive

Why this extension

Pi doesn't ship a built-in MCP client, and generic MCP bridges can't do WayOfTeams' Bearer auth. wayofteams-tools is ours: a first-class MCP client and a direct REST client, built client-first so your whole team can drive WayOfTeams from pi.

  • Full surface — the WayOfTeams MCP exposes ~269 tools across 12 domains: tickets, plans, docs, standups, kanban, ideas, skills, templates, thoughts, knowledge, rules, memory/anchor, agents (orchestration + multi-agent), versions, and more.
  • MCP + REST dual path — talks MCP first; falls back to the REST adapter (/api/v1/tools) and direct REST endpoints when MCP is unavailable, so the chat keeps working.
  • Both endpoint families — supports the legacy /mcp monolith and the v2 /mcp/v2 domain-split surfaces, auto-probing the healthiest.
  • Client-first auth — per-user JWT, resolved from env → pi settings → token file. Never hardcoded, never shared.
  • Entitlement-aware — access denials surface as recoverable messages ("access expired", "tier missing"), not cryptic network errors.
  • Multi-agent ready — registers your agent identity on startup and exposes the coordinator / work-registry / messaging tools (WOTEAMS-322).
  • Interactive Group Manager — press Ctrl+Shift+W for a collapsible panel above the editor to enable/disable tool groups visually.

Requirements

  • pi (0.84+) — loads this extension via jiti, no build step.
  • A WayOfTeams account and an MCP token (get it from your WayOfTeams → Settings → MCP dashboard).

Install

pi install npm:@wayofmono/wayofteams-tools

That's it. pi discovers the package, loads src/index.ts, and the tools appear in the session (new sessions auto-load it; run /reload to pick up changes in an existing one).

From this monorepo during development:

pi install ./packages/@wayofmono/wayofteams-tools

Configure

The extension resolves a token in this order (first hit wins) — never hardcoded:

  1. Environment variableWAYOFTEAMS_MCP_TOKEN

  2. pi settings.json (~/.pi/agent/settings.json):

    {
      "wayofteams": {
        "token": "<your-jwt>",
        "endpoint": "auto",          // "auto" | "v2" | "legacy" | "rest"
        "enabledGroups": [...],      // optional: override default enabled groups
        "disabledGroups": [...]      // optional: explicitly disable groups
      }
    }
    
  3. Token file~/.config/opencode/.wayofteams-mcp-token

The easiest way is the /wayofteams-login command (see below) — it verifies the token live against the server, then persists it to settings.json for you.

Security: tokens are per-user JWTs. A WayOfTeams founders/superadmin token would bypass all entitlements by design — always use a token scoped to your own profile.

Commands

Command What it does
/wayofteams status Active surface, endpoint, tool count, token state
/wayofteams endpoint Re-probe surfaces (v2 → legacy → REST) and reconnect
/wayofteams-login <token> Verify a token live, save it, reconnect
/wayofteams-groups <subcommand> Manage tool groups (see below)
/wayofteams-presets (Reserved) Interactive preset selector

Tool Group Management: /wayofteams-groups

Subcommand Description
/wayofteams-groups list Show all 13 groups with ✓/✗/○ status
/wayofteams-groups enable <group> Enable one group
/wayofteams-groups disable <group> Disable one group
/wayofteams-groups reset Reset to defaults (7 primary groups)
/wayofteams-groups enable-all Enable ALL 13 groups
/wayofteams-groups disable-all Disable ALL (only discovery tools active)
/wayofteams-groups enable-multiple <g1,g2,g3> Enable multiple (comma-separated)
/wayofteams-groups disable-multiple <g1,g2,g3> Disable multiple
/wayofteams-groups preset <name> Apply a preset (see below)

Presets

Preset Groups Enabled Use Case
minimal tickets Lowest context, just ticket work
standard tickets, kanban, team, agents, knowledge, memory, admin Default (7 primary groups)
full All 13 groups Maximum context
team-only team, agents Coordination only
knowledge-only knowledge, memory Research/docs only
google-gmail-only google-gmail Just Gmail
google-drive-only google-drive Just Drive
google-docs-only google-docs Just Docs
google-sheets-only google-sheets Just Sheets
google-calendar-only google-calendar Just Calendar
google-all All 5 Google services Full Google Workspace

Usage: /wayofteams-groups preset minimal

Interactive Group Manager

Press Ctrl+Shift+W to toggle a collapsible panel above the editor:

● WayOfTeams Groups (7/13)
  ✓ tickets: Tickets & Plans (enabled)
  ✓ kanban: Kanban Boards (enabled)
  ✓ team: Team & Standups (enabled)
  ✓ agents: Multi-Agent Orchestration (enabled)
  ✓ knowledge: Knowledge Base (enabled)
  ✓ memory: Memory & Anchors (enabled)
  ✓ admin: Admin & Skills (enabled)
  ○ google-gmail: Google Gmail (default-off)
  ○ google-drive: Google Drive (default-off)
  ○ google-docs: Google Docs (default-off)
  ○ google-sheets: Google Sheets (default-off)
  ○ google-calendar: Google Calendar (default-off)
  ○ obsidian: Obsidian Sync (default-off)

└─ ↑↓ navigate  Enter toggle  P presets  C collapse  Q quit

Keyboard Controls

Key Action
/ / j / k Navigate groups
Enter Toggle selected group (enable/disable)
C Collapse/expand panel
P Open preset menu (shows available presets)
Q / Esc Close panel

Visual Status

Symbol Color Meaning
green Enabled
red Disabled
dim Default-off (not in enabled/disabled lists)

Tool Groups (13 total)

Group Tools Domain Default
tickets tickets_*, plans_* core
kanban kanban_*, boards_*, cards_* collab
team standups_*, notifications_*, team_* collab
agents agent_*, coordinator_*, work_*, claim_*, conflicts_* agents
knowledge docs_*, knowledge_*, personal_*, templates_*, ideas_*, versions_*, thoughts_* knowledge
memory anchors_*, memory_*, context_*, pr_review_* memory
admin skills_*, rules_*, config_*, deploy_* admin
google-gmail google_gmail_*, gmail_* google-gmail
google-drive google_drive_*, drive_* google-drive
google-docs google_docs_*, docs_* google-docs
google-sheets google_sheets_*, sheets_* google-sheets
google-calendar google_calendar_*, calendar_* google-calendar
obsidian obsidian_* obsidian

How it works

pi session
   │
   ├─ load @wayofmono/wayofteams-tools (via jiti)
   │    └─ register control-plane + discovery tools (safe during load)
   │    └─ resolve token (env → settings → file)  [no hardcode]
   │    └─ probe surfaces: v2 gateway → legacy /mcp → REST adapter
   │         └─ pick healthiest, register its tool set
   │    └─ register /wayofteams commands
   │    └─ register `Ctrl+Shift+W` shortcut for group manager widget
   │
   └─ session_start
        ├─ activate discovery/status tools (runtime is now bound)
        ├─ register agent identity (update_my_work)
        ├─ bind UI context for group manager widget
        └─ ready: model calls tools; matching tools activate on demand
  • Dynamic tool loading — only the discovery/status tools start active; when the model needs a specific tool, search_tools/get_tool_schema results activate it additively via pi.setActiveTools (keeps the prompt small instead of flooding 269 schemas).
  • Multi-agent — registers update_my_work on start and exposes agent_register, agent_list, agent_claim_files, agent_check_conflicts, agent_send_message, agent_coordinator_status so pi agents cooperate with others.
  • Context budget aware — enable only the tool groups you need. The model only sees schemas for enabled groups.

What the model can do

After setup you can ask pi things like:

  • "List my open tickets and their priorities."
  • "Create a feature ticket about — write the description as markdown."
  • "Show today's standups for the team."
  • "Search the knowledge base for ."
  • "What cards are on the kanban board?"
  • "Download the latest published version notes."
  • "Disable Google services, I don't need them right now."

The model discovers the exact tools via search_tools and calls them directly.

Development

Requires Node 22+, and (optionally) pi for the live-load smoke test.

# from the womono monorepo root
pnpm install
pnpm --filter @wayofmono/wayofteams-tools test     # vitest (28 tests)
pnpm --filter @wayofmono/wayofteams-tools typecheck
pnpm --filter @wayofmono/wayofteams-tools build    # tsc -> dist/

# smoke-load the extension exactly as pi does (must print "... loaded ...")
cd packages/@wayofmono/wayofteams-tools
echo "list connected tools" | pi -p -e ./src/index.ts

Tests cover the pure modules (src/schema.ts, src/token.ts, src/server.ts, src/client/*) — no pi runtime required. Rebuild dist/ before publishing.

Package layout

Area Files Notes
Entry src/index.ts registration-only during load; activation deferred to session_start (pi's runtime-not-initialized contract)
Clients src/client/mcp.ts, src/client/rest.ts pure JSON-RPC / REST, unit-testable
Surface src/server.ts legacy + v2 catalog, auto-probe order
Auth src/token.ts, src/config.ts JWT resolution + settings I/O
Registry src/registry.ts registerTool bridge + dynamic activation
Tools src/tools/{router,control,fallbacks}.ts discovery, control-plane, REST fallbacks
Widgets src/widgets/group-manager.ts interactive overlay for group management
Schema src/schema.ts JSON Schema → TypeBox (pure)

License

MIT © WayOf / WayOfMono