Skip to main content
Glama
README.md
# @aegis-ai/mcp-outcomes

An MCP (Model Context Protocol) server for tracking decisions and their outcomes. Record what you tried, whether it worked, and get data-driven recommendations over time.

## Install

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "outcomes": {
      "command": "bunx",
      "args": ["@aegis-ai/mcp-outcomes"]
    }
  }
}
```

Or with npx:

```json
{
  "mcpServers": {
    "outcomes": {
      "command": "npx",
      "args": ["-y", "@aegis-ai/mcp-outcomes"]
    }
  }
}
```

### Manual

```bash
git clone https://github.com/aegis-ai-coop/mcp-outcomes.git
cd mcp-outcomes
bun install
bun src/index.ts
```

## Tools

### record_outcome

Record a decision and its result.

```json
{
  "decision": "Used Redis caching for session storage",
  "context": "infrastructure",
  "outcome": "Reduced p99 latency from 200ms to 15ms",
  "success": true,
  "tags": ["caching", "redis", "performance"]
}
```

### query_outcomes

Search past outcomes by tags, date range, text, or success status.

```json
{
  "tags": ["performance"],
  "success": true,
  "limit": 20
}
```

```json
{
  "text": "caching",
  "start_date": "2025-01-01",
  "end_date": "2025-06-30"
}
```

### get_stats

Returns success rates, per-tag breakdowns, trend analysis, and recommendations. No parameters required.

```json
{}
```

Example response:

```json
{
  "total_outcomes": 47,
  "overall_success_rate": 0.72,
  "by_tag": {
    "caching": { "total": 12, "successes": 10, "failures": 2, "success_rate": 0.83 },
    "refactoring": { "total": 8, "successes": 3, "failures": 5, "success_rate": 0.38 }
  },
  "recent_trend": {
    "last_10_success_rate": 0.80,
    "last_30_success_rate": 0.70
  },
  "recommendations": [
    "Tag \"refactoring\" has a 38% success rate across 8 outcomes. Consider changing your approach.",
    "Tag \"caching\" performs well at 83% success across 12 outcomes. Keep using this approach.",
    "Recent performance is improving: last 10 at 80% vs last 30 at 70%. Current approach is working."
  ]
}
```

### list_recent

List the N most recent outcomes.

```json
{
  "count": 5
}
```

## Data Storage

Outcomes are stored in `~/.mcp-outcomes/data.json`. The file is created automatically on first use.

## Features

- Record decisions with context, outcomes, tags, and optional metadata
- Full-text search across decisions, contexts, and outcomes
- Filter by tags, date ranges, and success/failure
- Per-tag success rate breakdown
- Trend analysis comparing recent vs historical performance
- Automatic recommendations based on patterns in your data
- Local JSON storage with no external dependencies

## License

MIT - AEGIS AI Cooperative