Extending teamfuse
Adding MCP servers, role-scoped skills, custom guardrails, optional patterns like Gmail intake, browser-driven roles, and swapping the messaging layer entirely.
Extending the template
Adding an MCP server
Edit the agent's .mcp.json. Add a new entry under mcpServers. For
a stdio server:
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GH_TOKEN}" }
}
For a remote server:
"custom-remote": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://your.endpoint/mcp",
"--header", "Authorization: Bearer ${YOUR_TOKEN}"
]
}
Add the env var to agents/<id>/.env and to .env.example. Restart
the agent so the wrapper respawns claude with the new config.
Adding a skill
Skills are reusable procedures an agent can invoke. Put them under
agents/<id>/.claude/skills/<skill-name>/SKILL.md. The wrapper's
session-settings.json auto-grants Skill(<name>) and
Skill(<name> *) permissions and denies any skill not in the agent's
own folder.
A minimal skill:
---
description: Short description used by Claude to decide when to fire.
trigger_keywords: [keyword1, keyword2]
---
# Skill body
Steps, examples, conventions. The skill body is loaded into context
only when Claude invokes it, so it can be long.
Custom guardrails
Call the admin MCP tool:
admin_list_guardrail_providers()
admin_set_agent_guardrails({
alias: "@pm-bot",
guardrails: ["pii-redactor", "profanity-filter"]
})
Guardrails apply to outbound AgentDM messages only. Failures block delivery, so an over-aggressive guardrail will make your agent look mute. Test in a staging account first.
Adding a Gmail intake (optional pattern)
Some companies want their PM to triage an inbound support mailbox. This template does not ship the Gmail integration, because the OAuth setup is per-operator and because the triage rules are company-shaped. Here is the outline if you want to add it:
- Install the Gmail MCP server of your choice in
@pm-bot's.mcp.json. - Add
GMAIL_*credentials toagents/pm-bot/.env. - Store the OAuth client JSON and token JSON under
agents/pm-bot/google/. Add both to.gitignore. - Write
agents/sop/gmail-triage-rules.mdwith your routing rules (bugs to eng, feature requests to backlog, legal to the operator, etc.). - Update
agents/pm-bot/CLAUDE.mdwith a step in the polling loop that callsread_emailsevery N ticks and routes per the SOP.
Adding a browser-driven role (paid ads, admin panels)
The template already has chrome: true wired in for the marketing
agent. The wrapper passes --chrome to claude when CHROME=1 is in
the environment (the supervisor sets it based on the
agents.config.json flag). Caveats:
- Only one agent at a time can have
chrome: true. They all share the host's Chrome instance. - Claude-in-Chrome is the extension providing the browser. The operator must be logged into the target sites in that Chrome profile for the agent to pick up their sessions.
Swapping the messaging layer
If you do not want to use AgentDM:
- Replace the
agentdmentry in every.mcp.jsonwith your chosen server (Slack MCP, Discord MCP, a custom one). - Rewrite each
CLAUDE.mdto call the equivalent tools. The shape changes (post_message,read_channel, etc.). - Remove the bootstrap skill's AgentDM admin calls and replace them with provisioning for the new layer.
- Update
docs/agentdm-integration.mdto point at the new layer.
The streaming agent loop, the SOPs, the control plane, and the agent directory contract all survive the swap unchanged. AgentDM is replaceable, the rest of the template is not about it.
Per-repo CLAUDE.md
If the eng agent edits multiple repos, put a lightweight CLAUDE.md
in each repo's root with repo-specific conventions (ESM vs CommonJS,
test runner, which files to always regenerate). The eng agent's
top-level CLAUDE.md in agents/eng-bot/ tells it to look for those.