The MCP server has no metrics
I maintainer di solito rispondono entro 1 giorno
@rupesh-kumar-sah ci sta già lavorando.
Dal 17/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Background
src/metrics.ts knows nothing about MCP. There is no count of tool calls, no
duration, no error breakdown — so the agent surface is entirely invisible on the
dashboard that covers every other part of the service.
Once L213 and L214 give agents something worth calling, "which tools are
actually used" becomes the question that decides what to build next, and there
will be no data to answer it.
What to build
- A counter of tool calls by tool name and outcome. Tool names are a fixed,
server-defined set, so this label is safely bounded — unlike the GraphQL
operation names in #374. - A histogram of tool call duration by tool.
- A counter of errors by the
MCP_ERROR_CODESvalue, which is already a closed
set and is exactly the right label domain. - Register on the existing registry so everything appears at
/metrics.
Acceptance criteria
- Tool calls are counted by name and outcome
- Duration is recorded per tool
- Errors are counted by error code
- All labels come from closed sets
- Metrics appear on the existing
/metricsendpoint
Drips Wave · Complexity: Easy · 100 points
Repo: Divinity-Labs/Lens. The MCP server is src/mcp/server.ts
(BazaarMcpServer) with error codes in src/mcp/codes.ts. It is started by
npm run mcp:server → examples/mcp-server/run.ts, and there is an agent
example at examples/mcp-server/agent.ts. Tests are tests/mcp.test.ts.
Run the tests: npm test. The tests are vitest, not jest. A single file
is npx vitest run tests/mcp.test.ts.
Load test (prices) is already failing on main. Not your PR.
This surface signs with a real mainnet key. examples/mcp-server/run.ts
requires MCP_AGENT_SECRET_KEY_MAINNET and builds a signer for
stellar:pubnet. Anything you change here can move real money, so prefer
failing closed, and never log, echo or test with a real secret key.
Never elide an address, a contract id or a key in code, comments or
fixtures. A previous batch shortened a contract id and five contributors
invented plausible-looking ids to fill the gap. Write it in full or not at all.
An agent is the least able caller to notice a wrong answer. It will reason
over whatever it is handed, confidently. Prefer a structured error over a
best-effort result.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 71
- Merge medio
- 1g 6h
- PR unite (30g)
- 58
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Divinity-Labs/Lens
-
Webhook retries have no jitter, so failures synchroniseForse già presa @Richard-tobi l’ha presa 3 giorni fa. Apertaarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
Divinity-Labs/Lens#341 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SSRF guard re-resolves DNS at connect time, so rebinding is still possibleForse già presa @sparkysolutions10-pixel l’ha presa oggi. Apertaarea:security help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Divinity-Labs/Lens#515 ·
I maintainer di solito rispondono entro 1 giorno
-
Admin routes are public and that is load-bearingForse già presa @sparkysolutions10-pixel l’ha presa oggi. Apertaarea:security difficulty:easy help wanted points:100
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
Divinity-Labs/Lens#514 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
A caller cannot see their own usageForse già presa @sparkysolutions10-pixel l’ha presa oggi. Apertaarea:api-quality difficulty:intermediate help wanted points:150
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Divinity-Labs/Lens#513 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
The key is accepted only as a bearer token, and nothing says soForse già presa @krsnak l’ha presa 1 giorno fa. Apertaarea:docs difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#512 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Divinity-Labs/Lens
Issue simili
-
area: aria/combobox gemini-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
angular/components#33973 ·
I maintainer di solito rispondono entro 1 giorno
-
bug priority: P2
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
[bug] status, list and push crash with an uncaught NotInitializedError stack trace when teamai is not initializedForse già presa @jay23606 l’ha presa oggi. Apertabug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Tencent/teamai-cli#1227 ·
I maintainer di solito rispondono entro 1 giorno
-
[Tool]: YapAperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
withkarann/aifoxx#417 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
sindresorhus/eslint-plugin-unicorn#3921 ·
I maintainer di solito rispondono entro 1 giorno