Use cases
Real-world examples of how teams and agents use mog to install skills, connect to services, and automate workflows.
mog connects two worlds: a package marketplace where you install curated skills and MCP servers, and an agent network where agents discover and transact with live services. Here are common patterns for both.
Equip a coding agent with best practices
Install a skill that teaches your AI assistant how to write tests the way your team does:
mog install acme/react-testing-skill --wire
The --wire flag ensures the skill is active in your editor immediately — no manual config. The agent now follows the patterns in the skill whenever it writes or reviews React tests.
Why this matters: Instead of pasting guidelines into every prompt, the skill is always available as context. Update the package when your patterns change, and every developer on the team gets the new version via mog update.
Standardize tooling across a team
Use an organization to share a wallet and approved packages:
mog org create my-team "My Team"
mog org invite alice@company.io --role member
mog org invite bob@company.io --role admin
Set up a spend policy so every team member's agent can install packages autonomously within limits:
{
"maxPerPurchaseCents": 1000,
"dailyLimitCents": 5000,
"vendorAllowlist": ["trusted-vendor", "internal-tools"],
"blockedTypes": []
}
New team members run mog org switch my-team && mog install and get the same packages, same versions, billed to the team wallet.
Add an MCP server to your project
Give your AI assistant access to external tools — a database, an API, a browser — by installing an MCP server package:
mog install acme/postgres-mcp-server --env DATABASE_URL=postgres://...
One command. The CLI writes the correct config to .cursor/mcp.json, .mcp.json, .gemini/settings.json, .codex/config.toml, ~/.openclaw/openclaw.json (mcp.servers), or Windsurf’s global MCP file depending on your target. Restart the editor (or OpenClaw gateway) and the tools are available.
Build an autonomous purchasing agent
An agent that discovers, evaluates, and installs skills on its own:
import { execSync } from 'child_process'
const query = 'kubernetes deployment patterns'
const searchResult = JSON.parse(
execSync(`mog search "${query}" --target cursor --json`).toString()
)
for (const pkg of searchResult.data.results) {
if (pkg.price === 'free' || pkg.priceCents <= 500) {
execSync(`mog install ${pkg.name} --auto-buy --max-price 500 --wire --json`)
}
}
With a spend policy attached to the token, the agent can never exceed its budget — even if the code has a bug.
Connect an agent to live business services
Use the SDK to let your agent discover and interact with services on the mog network:
import { MogClient } from '@mog/sdk'
const mog = new MogClient({ token: process.env.MOG_TOKEN! })
// Find a verified service that can convert PDFs
const { services } = await mog.discover({
tool: 'pdf_to_json',
verified: true,
sort: 'trusted',
})
// Call the tool directly (metered, pay-per-call from wallet)
const result = await mog.callTool(services[0].vendor, services[0].slug, {
tool: 'pdf_to_json',
input: { url: 'https://example.com/invoice.pdf' },
maxCostCents: 25,
})
The agent doesn't need to know the service's internal API. mog handles discovery, authentication, metering, and settlement.
Multi-turn agent-to-business sessions
For complex interactions — booking travel, negotiating quotes, completing multi-step workflows — open a session:
const { session } = await mog.openSession({
vendor: 'acme',
slug: 'travel-agent',
intent: 'book_travel',
context: { destination: 'Tokyo', budgetCents: 150000 },
})
// Request a quote
await mog.send(session.id, {
type: 'quote.request',
payload: { dates: '2026-04-01/2026-04-10', travelers: 2 },
})
// Wait for the vendor's response
const { messages } = await mog.history(session.id)
// If a checkout is required, handle it
const { found, payload } = await mog.checkout(session.id)
if (found) {
console.log('Complete payment at:', payload.checkoutUrl)
}
Sessions carry structured messages — intents, quotes, tool calls, checkout events, receipts — so both sides can parse and act on them programmatically.
Keep CI in sync with the lockfile
Add mog to your CI pipeline so every build has the right packages:
- name: Install mog packages
run: |
npm install -g mogmd
mog install --json
env:
MOG_TOKEN: ${{ secrets.MOG_TOKEN }}
The lockfile (mog.lock.json) pins exact versions and SHA-256 hashes. If someone adds a package locally and pushes the updated lockfile, CI installs the same thing.
See CI/CD & automation for the full guide.
Publish and monetize a skill
Turn your expertise into a distributable package:
name: my-org/nextjs-performance
version: 1.0.0
type: skill
description: Next.js performance optimization patterns — RSC, streaming, caching, image optimization.
targets:
- cursor
- claude-code
- codex
- gemini-cli
- windsurf
- generic
license: MIT
mog publish --dir ./my-skill --price 4.99
The scan pipeline validates your package, and once approved it's live on the marketplace. Set your own price, and mog handles Stripe payouts via Connect.
See Selling on mog for the full seller guide.
Distribute a premium MCP server
Package a hosted MCP server with subscription billing:
name: my-org/analytics-mcp
version: 1.0.0
type: mcp
description: Real-time analytics MCP server — query dashboards, generate reports, set alerts.
targets:
- cursor
- claude-code
- codex
- gemini-cli
- windsurf
- generic
mcp:
transport: http
url: "https://mcp.my-org.dev/analytics"
headers:
Authorization: "Bearer {env:ANALYTICS_API_KEY}"
env:
- name: ANALYTICS_API_KEY
description: "API key from my-org.dev dashboard"
required: true
secret: true
Users subscribe monthly or annually, and the MCP config is installed with a single command. You handle the server; mog handles distribution, billing, and authentication.
See MCP Servers and Subscriptions for details.