Agent Cost Analyzer
Read-only analysis of AI coding agent costs, caching and sessions from local logs
Agent Cost Analyzer is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Web, Self-hosted
- Runs
- Locally
- Version
- 1.2.0
- Listing updated
Similar MCP servers
Install
Run in a terminal
claude mcp add agent-cost-analyzer -- npx -y agent-cost-analyzerAdd to claude_desktop_config.json
{
"mcpServers": {
"agent-cost-analyzer": {
"command": "npx",
"args": [
"-y",
"agent-cost-analyzer"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"agent-cost-analyzer": {
"command": "npx",
"args": [
"-y",
"agent-cost-analyzer"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"agent-cost-analyzer": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agent-cost-analyzer"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"agent-cost-analyzer": {
"command": "npx",
"args": [
"-y",
"agent-cost-analyzer"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"agent-cost-analyzer": {
"command": "npx",
"args": [
"-y",
"agent-cost-analyzer"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
About Agent Cost Analyzer
The README says this package reads the session logs that GitHub Copilot Chat, Claude Code and the pi coding agent already write on your machine, then breaks each session down turn by turn to show where tokens and money go. It can run as a local web app opened in your browser, or as a read-only MCP server over stdio so an MCP client can answer spending questions in chat.
Nothing leaves your machine: the README states the app sends no data anywhere and makes no network calls of its own, apart from npm itself. A Learn mode with sample sessions is included for people who do not yet have logs to analyse.
It suits developers and team leads who use AI coding assistants and want to understand token usage, caching and session cost before changing how they work. The package is MIT licensed and has no dependencies, according to the README.
What it does
- Turn-by-turn session breakdown
- Shows each session's turns so token and cost use can be traced step by step.
- Local log reading
- Reads existing session logs from Copilot Chat, Claude Code and the pi agent on your machine.
- Read-only MCP server
- Exposes the same analysis over stdio so an MCP client can answer spending questions.
- Browser app on localhost
- Starts a web app bound to 127.0.0.1 and opens it in your browser.
- Learn mode samples
- Includes sample sessions so the tool is usable before you have any data.
- No network calls
- The README says the app sends no data and makes no network call of its own.
Good for
- Finding which coding sessions drove the most token spend in a week
- Checking how much prompt caching is saving across agent sessions
- Comparing cost patterns between Copilot Chat, Claude Code and pi
- Asking an MCP-enabled chat client to summarise recent agent spending
- Exploring the tool with sample sessions before connecting real logs
Pricing
Open source
Free, MIT licensed open source run locally.
Agent Cost Analyzer FAQ
Which agent logs does Agent Cost Analyzer read?
The README says it reads session logs from GitHub Copilot Chat, Claude Code and the pi coding agent.
Does Agent Cost Analyzer send my data anywhere?
According to the README, the app sends no data anywhere and makes no network call of its own; npx itself contacts the npm registry.
What Node.js version is required?
The README says Node.js 22.18 or newer is needed.
Can Agent Cost Analyzer modify my files?
The MCP server is described as read-only, and the only place the app writes is its own settings folder.
How do I add Agent Cost Analyzer to Claude Code?
Run this command in your terminal: claude mcp add agent-cost-analyzer -- npx -y agent-cost-analyzer
What are the best alternatives to Agent Cost Analyzer?
The closest alternatives to Agent Cost Analyzer are TokenTrace, mcpwatch, Actvt, Widal.Code and AGASTHY.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.
