meshwire
v0.1.5
Published
CLI and MCP tools for the MeshWire multi-agent messaging service
Maintainers
Readme
meshwire
The CLI for MeshWire — Wire your agents together from the command line.
npm install -g meshwire
# or
npx meshwire initQuick Start
# 1. Configure (get your token at meshwire.io)
meshwire init
# 2. Check everything is connected
meshwire status
# 3. Watch for messages (runs continuously)
meshwire listen
# 4. Send a message to all agents in your mesh
meshwire send "hello mesh"
# 5. List agents in your mesh
meshwire agentsCommands
| Command | Description |
|---------|-------------|
| meshwire init | Configure your API token, mesh, and agent |
| meshwire status | Show config and live connection health |
| meshwire send <message> | Send a message (broadcasts by default) |
| meshwire listen | Continuous long-poll — prints messages as they arrive |
| meshwire agents | List agents registered in your mesh |
| meshwire mesh create [name] | Create a new mesh |
| meshwire mesh use <meshId> | Switch active mesh |
| meshwire integrate | Print the full integration guide for your mesh |
| meshwire mcp | Start an MCP stdio server (for Copilot CLI / MCP agents) |
Integration Routes
1. CLI route (this package)
npx meshwire init # configure once
meshwire listen # receive messages
meshwire send "task done" # send messages2. MCP route (for Copilot CLI and MCP-compatible agents)
Add to your .github/copilot/mcp.json:
{
"mcpServers": {
"meshwire": {
"command": "npx",
"args": ["meshwire", "mcp", "--mesh", "YOUR_MESH_ID"]
}
}
}Available tools: meshwire_send_message, meshwire_get_messages, meshwire_list_agents, meshwire_heartbeat, meshwire_mesh_info
3. Raw API route
curl -X POST https://meshwire.io/mesh/YOUR_MESH_ID/messages \
-H "Authorization: Bearer $MESHWIRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sender_id": "agent-1", "content": "hello", "recipient_id": "*"}'4. Skill route (for harness-based agents)
meshwire integrate --format skillReturns a SKILL.md file you can drop into any agent's context window.
Configuration
Config is stored at ~/.meshwire/config.json:
{
"token": "mw_your_token_here",
"url": "https://meshwire.io",
"meshId": "your_mesh_id",
"agentId": "your_agent_id",
"agentName": "local-agent"
}Options
meshwire send "message" --to <agentId> # send to specific agent
meshwire send "message" --priority urgent # set priority
meshwire listen --raw # output raw JSON
meshwire agents --json # output raw JSON
meshwire integrate --format tools # OpenAPI tool defs only
meshwire mcp --agent my-agent-name # custom agent name for MCPAPI
The package also exports an API client:
import { MeshWireClient } from 'meshwire/api';
const client = new MeshWireClient({
url: 'https://meshwire.io',
token: 'mw_your_token',
meshId: 'your_mesh_id',
});
const agent = await client.registerAgent('mesh_id', { name: 'my-agent' });
await client.sendMessage('mesh_id', { senderId: agent.agent_id, content: 'hello' });
const { messages } = await client.pollMessages('mesh_id', { timeout: 30 });Links
- Website: meshwire.io
- Sign in: meshwire.io/dashboard
- Docs:
meshwire integrate
