GooseTeam
by: cliffhall
Look, a flock of geese! An MCP server and protocol for Goose agent collaboration.
📌Overview
Purpose: To enable collaboration among AI agents through a structured protocol and extension that facilitates task management and messaging.
Overview: GooseTeam provides a robust framework that allows AI agents to work together efficiently by following defined protocols. It includes both natural language instructions and a mermaid chart for streamlined interaction. The system features an MCP (Model Context Protocol) server extension, which supports agent registration, message handling, task management, and allows for seamless collaboration among multiple agents.
Key Features:
-
Protocol Formats: Offers two formats—natural language for human readability and mermaid markdown for structured flowcharts, enabling flexibility in conveying agent instructions.
-
MCP Server Extension: Facilitates agent registration, task assignment, and message management, allowing agents to communicate effectively and manage collaborative projects.
-
Agent Operations: Includes functionalities like waiting for specified periods before acting and managing tasks dynamically through a project coordinator, enhancing operational efficiency.
GooseTeam
Enabling Goose Agents to Collaborate
Protocol
An operational procedure for agents to follow, expressed in two flavors:
- Natural Language: Streamlined, human-readable instructions about how to behave and use the tools.
- Mermaid Markdown: A concise flowchart for expected behavior, described in an efficient text format.
Extension
Goose extension (MCP Server) that provides tools for the agents to use for tasks and messaging.
- Agent Registration: Facilitates agent registration with unique ID assignments and message sending.
- Message Management: Stores messages from agents, making them available for retrieval.
- Task Management: Project Coordinator role creates and assigns tasks and roles to other agents.
- Agent Waiting: Allows connected agents to wait for a specified period before taking another action.
- Remote Server: With an MCP Proxy, multiple agents can connect to the same MCP server, necessary for collaboration.
Work in Progress
Current focus is on Goose CLI integration, so you must have it installed. Other agent platforms could integrate easily. The protocol and the MCP server are not tightly coupled to goose, only the npm agent:
scripts and the protocol preamble.
New: Behavioral Control with Mermaid Markdown!
Agent protocol expressed as a mermaid chart (example online)
See if your favorite LLM can follow it using the agent:chart
script to launch your agent!
How to Run
Configure Goose
- Run
goose configure
- Choose Add Extension
- Choose Remote Extension
- Enter
goose-team
for name - Enter
http://localhost:3001/sse
for SSE endpoint URI
Run these npm scripts in order:
- Clone this repo to your local machine and install dependencies
npm run build
- to build the server from sourcenpm run mcp-proxy
to start an SSE proxy to talk to a single instance of the goose-team MCP servernpm run inspector
to launch the MCP inspector in a browser- Click connect, then list_tools, then add_message, then send a message from Human describing a task or project
npm run agent
to launch an agent that will read the protocol and instructions, assign itself as project coordinator, and create tasks- In the inspector, click list_tasks to see tasks
- Launch additional agents with
npm run agent
to assign tasks by the Project Coordinator
Troubleshooting
How Well Goose Team Works Depends on the Model
Test if your model will work by running:
npm run build
npm run mcp-proxy
npm run agent:test
(launches a simple agent: says hello in different languages, waits 2 seconds, repeats)
Currently, the models that stay in the loop are:
google/gemini-2.0-flash-001
(via openrouter.ai)openai/gpt-4o
If your configured model stops with "message loop ended," it may not handle tool use well. Try different models.
MCP Tools
Agents
-
register_agent
Registers a new agent, providing unique ID and random color. -
list_agents
Lists all registered agents. -
agent_leave
Allows an agent to leave the team. -
agent_wait
Allows an agent to wait for a specified number of seconds before next action.
Messages
-
add_message
Send a new message; stored on the server. -
recent_messages
Retrieve the three most recent messages. -
list_messages
Retrieve all messages. -
clear_messages
Clear all messages.
Tasks
-
add_task
Add a new task with description. -
list_tasks
List all tasks. -
assign_task
Assign a task to an agent. -
complete_task
Mark a task as complete.
Developer Setup
Install Dependencies
cd /path/to/GooseTeam/
npm install
Build
npm run build
STDIO Server - Proxied
npm run stdio:proxy
Launches an SSE-based MCP proxy on port 3001 at /sse
.
SSE Server - Direct
npm run sse:direct
Launches an SSE-wrapped MCP server on port 3001 at /sse
.
Inspector
npm run inspector
Runs the Model Context Protocol Inspector UI at http://localhost:5173
- Set Transport Type to SSE
- Set URL to http://localhost:3001/sse
- Click Connect (green light and "Connected" message should appear)
- Click List Tools
Agent - Protocol as Text
npm run agent:text
Run an agent using natural language instructions (instructions/protocol-as-text.md
).
- First agent assumes Project Coordinator role.
- Connect to server with Inspector first and send a message from "Human" describing goals.
Agent - Protocol as Chart
npm run agent:chart
Run an agent using Mermaid markdown instructions (instructions/protocol-as-chart.md
).
- First agent assumes Project Coordinator role.
- Connect to server with Inspector first and send a message from "Human" describing goals.
Agent Wait Test
npm run agent:wait:test
Tests the model's ability to stay in the loop by repeatedly checking messages.
- Have MCP Proxy running first.
- If ends with "outgoing message queue empty," model is unsuitable.
Code Formatting and Checks
npm run format
— runs Prettier to format code.npm run typecheck
— runs TypeScript type checks.npm run lint
— runs ESLint to check for syntax issues.npm run lint:fix
— runs ESLint to fix syntax issues.npm run test
— runs unit tests.
Links
- MCP Specification: Model Context Protocol specifications
- Server Reference: We follow a modular approach demonstrated in the GitHub MCP server.
- Inspiration: Iterated from Aaron Goldsmith's Gist and Building a team of AI agents.