feat(mcp): add native /mcp for cost control#4168
Draft
alex-alecu wants to merge 9 commits into
Draft
Conversation
Contributor
Code Review SummaryStatus: 4 Issues Found | Recommendation: Address before merge Fix these issues in Kilo Cloud Overview
Issue Details (click to expand)WARNING
Files Reviewed (31 files)
Reviewed by gpt-5.4-20260305 · Input: 181K · Output: 19.9K · Cached: 2.4M Review guidance: REVIEW.md from base branch |
Contributor
Author
|
Manual test passed. Tested:
Verified:
|
Make the usage-cost convenience tool strict-compatible for common total-cost prompts so GPT can complete with one handler call. Route advanced cost shapes through query_kilo_dataset and cover real MCP schema serialization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kilo now has a standard MCP endpoint for admins to read their own Kilo stats without setting custom headers. It uses the normal browser sign-in and OAuth flow, then gives MCP clients one read-only stats tool. Access is limited to Kilo org admins for the first rollout, and each query can only look at the signed-in user's last 60 days.
Verification
/mcpwithout a token and confirm it returns a401OAuth challenge.tools/list.query_kilo_datasetformicrodollar_usagewith a count metric and confirm it returns a structured result.Visual Changes
N/A
Reviewer Notes
This adds new OAuth tables and keeps the first rollout behind the Kilo org admin gate. The MCP tool returns aggregate and time series stats only, not raw rows.