@iris-eval/mcp-server 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Iris Eval Contributors
3
+ Copyright (c) 2026 Ian Parent
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,41 +1,103 @@
1
- # Iris — MCP-Native Agent Eval & Observability
1
+ # Iris — The Agent Eval Standard for MCP
2
2
 
3
+ [![GitHub stars](https://img.shields.io/github/stars/iris-eval/mcp-server?style=social)](https://github.com/iris-eval/mcp-server)
3
4
  [![npm version](https://img.shields.io/npm/v/@iris-eval/mcp-server)](https://npmjs.com/package/@iris-eval/mcp-server)
5
+ [![npm downloads](https://img.shields.io/npm/dw/@iris-eval/mcp-server)](https://npmjs.com/package/@iris-eval/mcp-server)
4
6
  [![CI](https://github.com/iris-eval/mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/iris-eval/mcp-server/actions/workflows/ci.yml)
5
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
8
+ [![Docker](https://img.shields.io/badge/Docker-ghcr.io-blue?logo=docker)](https://github.com/iris-eval/mcp-server/pkgs/container/mcp-server)
7
9
 
8
- Iris is an open-source [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that provides trace logging, quality evaluation, and drift detection for AI agents. Any MCP-compatible agent framework can discover and invoke Iris tools.
10
+ **Know whether your AI agents are actually good enough to ship.** Iris is an open-source MCP server that scores output quality, catches safety failures, and enforces cost budgets across all your agents. Any MCP-compatible agent discovers and uses it automatically no SDK, no code changes.
9
11
 
10
12
  ![Iris Dashboard](https://raw.githubusercontent.com/iris-eval/mcp-server/main/docs/assets/dashboard-overview.png)
11
13
 
14
+ ## The Problem
15
+
16
+ Your agents are running in production. Infrastructure monitoring sees `200 OK` and moves on. It has no idea the agent just:
17
+
18
+ - Leaked a social security number in its response
19
+ - Hallucinated an answer with zero factual grounding
20
+ - Burned $0.47 on a single query — 4.7x your budget threshold
21
+ - Made 6 tool calls when 2 would have sufficed
22
+
23
+ Iris evaluates all of it.
24
+
25
+ ## What You Get
26
+
27
+ | | |
28
+ |---|---|
29
+ | **Trace Logging** | Hierarchical span trees with per-tool-call latency, token usage, and cost in USD. Stored in SQLite, queryable instantly. |
30
+ | **Output Evaluation** | 12 built-in rules across 4 categories: completeness, relevance, safety, cost. PII detection, prompt injection patterns, hallucination markers. Add custom rules with Zod schemas. |
31
+ | **Cost Visibility** | Aggregate cost across all agents over any time window. Set budget thresholds. Get flagged when agents overspend. |
32
+ | **Web Dashboard** | Real-time dark-mode UI with trace visualization, eval results, and cost breakdowns. |
33
+
12
34
  ## Quickstart
13
35
 
14
- ```bash
15
- npm install -g @iris-eval/mcp-server
16
- iris-mcp
36
+ Add Iris to your Claude Desktop (or Cursor, Claude Code, Windsurf) MCP config:
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "iris-eval": {
42
+ "command": "npx",
43
+ "args": ["@iris-eval/mcp-server"]
44
+ }
45
+ }
46
+ }
17
47
  ```
18
48
 
19
- Or run directly:
49
+ That's it. Your agent discovers Iris and starts logging traces automatically.
50
+
51
+ Want the dashboard?
20
52
 
21
53
  ```bash
22
- npx @iris-eval/mcp-server
54
+ npx @iris-eval/mcp-server --dashboard
55
+ # Open http://localhost:6920
23
56
  ```
24
57
 
25
- ### Docker
58
+ ### Other Install Methods
26
59
 
27
60
  ```bash
61
+ # Global install
62
+ npm install -g @iris-eval/mcp-server
63
+ iris-mcp --dashboard
64
+
65
+ # Docker
28
66
  docker run -p 3000:3000 -v iris-data:/data ghcr.io/iris-eval/mcp-server
29
67
  ```
30
68
 
31
- ## Configuration
69
+ ## MCP Tools
70
+
71
+ Iris registers three tools that any MCP-compatible agent can invoke:
72
+
73
+ - **`log_trace`** — Log an agent execution with spans, tool calls, token usage, and cost
74
+ - **`evaluate_output`** — Score output quality against completeness, relevance, safety, and cost rules
75
+ - **`get_traces`** — Query stored traces with filtering, pagination, and time-range support
76
+
77
+ Full tool schemas and configuration: [iris-eval.com](https://iris-eval.com)
78
+
79
+ ## Cloud Tier (Coming Soon)
80
+
81
+ Self-hosted Iris runs on your machine with SQLite. As your team's eval needs grow, the cloud tier adds PostgreSQL, team dashboards, alerting on quality regressions, and managed infrastructure.
82
+
83
+ [Join the waitlist](https://iris-eval.com#waitlist) to get early access.
84
+
85
+ ## Examples
86
+
87
+ - [Claude Desktop setup](examples/claude-desktop/) — MCP config for stdio and HTTP modes
88
+ - [TypeScript](examples/typescript/basic-usage.ts) — MCP SDK client usage
89
+ - [LangChain](examples/langchain/observe-agent.py) — Agent instrumentation
90
+ - [CrewAI](examples/crewai/observe-crew.py) — Crew observability
91
+
92
+ ## Community
32
93
 
33
- Iris looks for config in this order (later overrides earlier):
94
+ - [GitHub Issues](https://github.com/iris-eval/mcp-server/issues) Bug reports and feature requests
95
+ - [GitHub Discussions](https://github.com/iris-eval/mcp-server/discussions) — Questions and ideas
96
+ - [Contributing Guide](CONTRIBUTING.md) — How to contribute
97
+ - [Roadmap](docs/roadmap.md) — What's coming next
34
98
 
35
- 1. Built-in defaults
36
- 2. `~/.iris/config.json`
37
- 3. Environment variables (`IRIS_*`)
38
- 4. CLI arguments
99
+ <details>
100
+ <summary><strong>Configuration & Security</strong></summary>
39
101
 
40
102
  ### CLI Arguments
41
103
 
@@ -61,107 +123,29 @@ Iris looks for config in this order (later overrides earlier):
61
123
  | `IRIS_API_KEY` | API key for HTTP authentication |
62
124
  | `IRIS_ALLOWED_ORIGINS` | Comma-separated allowed CORS origins |
63
125
 
64
- ## Security
126
+ ### Security
65
127
 
66
- When using the HTTP transport, Iris includes production-grade security:
128
+ When using HTTP transport, Iris includes:
67
129
 
68
- - **Authentication** — Set `IRIS_API_KEY` or `--api-key` to require `Authorization: Bearer <key>` on all endpoints (except `/health`). Recommended for any network-exposed deployment.
69
- - **CORS** Restricted to `http://localhost:*` by default. Configure with `IRIS_ALLOWED_ORIGINS`.
70
- - **Rate limiting** 100 requests/minute for dashboard API, 20 requests/minute for MCP endpoints. Configurable via `~/.iris/config.json`.
71
- - **Security headers** — Helmet middleware applies CSP, X-Frame-Options, X-Content-Type-Options, and other standard headers.
72
- - **Input validation** — All query parameters validated with Zod schemas. Malformed requests return 400.
73
- - **Request size limits** Body payloads limited to 1MB by default.
74
- - **Safe regex** User-supplied regex patterns in custom eval rules are validated against ReDoS attacks.
75
- - **Structured logging** — JSON logs to stderr via pino. Never writes to stdout (reserved for stdio transport).
130
+ - API key authentication with timing-safe comparison
131
+ - CORS restricted to localhost by default
132
+ - Rate limiting (100 req/min API, 20 req/min MCP)
133
+ - Helmet security headers
134
+ - Zod input validation on all routes
135
+ - ReDoS-safe regex for custom eval rules
136
+ - 1MB request body limits
76
137
 
77
138
  ```bash
78
- # Production deployment example
139
+ # Production deployment
79
140
  iris-mcp --transport http --port 3000 --api-key "$(openssl rand -hex 32)" --dashboard
80
141
  ```
81
142
 
82
- ## MCP Tools
83
-
84
- ### `log_trace`
85
-
86
- Log an agent execution trace with spans, tool calls, and metrics.
87
-
88
- **Input:**
89
- - `agent_name` (required) — Name of the agent
90
- - `input` — Agent input text
91
- - `output` — Agent output text
92
- - `tool_calls` — Array of tool call records
93
- - `latency_ms` — Execution time in milliseconds
94
- - `token_usage` — `{ prompt_tokens, completion_tokens, total_tokens }`
95
- - `cost_usd` — Total cost in USD
96
- - `metadata` — Arbitrary key-value metadata
97
- - `spans` — Array of span objects for detailed tracing
98
-
99
- ### `evaluate_output`
100
-
101
- Evaluate agent output quality using configurable rules.
102
-
103
- **Input:**
104
- - `output` (required) — The text to evaluate
105
- - `eval_type` — Type: `completeness`, `relevance`, `safety`, `cost`, `custom`
106
- - `expected` — Expected output for comparison
107
- - `trace_id` — Link evaluation to a trace
108
- - `custom_rules` — Array of custom rule definitions
109
-
110
- ### `get_traces`
111
-
112
- Query stored traces with filters and pagination.
113
-
114
- **Input:**
115
- - `agent_name` — Filter by agent name
116
- - `framework` — Filter by framework
117
- - `since` — ISO timestamp lower bound
118
- - `until` — ISO timestamp upper bound
119
- - `min_score` / `max_score` — Score range filter
120
- - `limit` — Results per page (default 50)
121
- - `offset` — Pagination offset
122
-
123
- ## MCP Resources
124
-
125
- - `iris://dashboard/summary` — Dashboard summary statistics
126
- - `iris://traces/{trace_id}` — Full trace detail with spans and evals
127
-
128
- ## Claude Desktop
129
-
130
- Add Iris to your Claude Desktop MCP config:
131
-
132
- ```json
133
- {
134
- "mcpServers": {
135
- "iris-eval": {
136
- "command": "npx",
137
- "args": ["@iris-eval/mcp-server"]
138
- }
139
- }
140
- }
141
- ```
142
-
143
- Then ask Claude to "log a trace" or "evaluate this output" — Iris tools are automatically available.
144
-
145
- See [examples/claude-desktop/](examples/claude-desktop/) for more configuration options.
146
-
147
- ## Web Dashboard
148
-
149
- Start with `--dashboard` flag to enable the web UI at `http://localhost:6920`.
150
-
151
- ## Examples
152
-
153
- - [Claude Desktop setup](examples/claude-desktop/) — MCP config for stdio and HTTP modes
154
- - [TypeScript](examples/typescript/basic-usage.ts) — MCP SDK client usage
155
- - [LangChain](examples/langchain/observe-agent.py) — Agent instrumentation
156
- - [CrewAI](examples/crewai/observe-crew.py) — Crew observability
143
+ </details>
157
144
 
158
- ## Community
145
+ ---
159
146
 
160
- - [GitHub Issues](https://github.com/iris-eval/mcp-server/issues) — Bug reports and feature requests
161
- - [GitHub Discussions](https://github.com/iris-eval/mcp-server/discussions) — Questions and ideas
162
- - [Contributing Guide](CONTRIBUTING.md) — How to contribute
163
- - [Roadmap](../docs/roadmap.md) — What's coming next
147
+ If Iris is useful to you, [consider starring the repo](https://github.com/iris-eval/mcp-server) — it helps others find it.
164
148
 
165
- ## License
149
+ [![Star on GitHub](https://img.shields.io/github/stars/iris-eval/mcp-server?style=social)](https://github.com/iris-eval/mcp-server)
166
150
 
167
- MIT
151
+ MIT Licensed.