fix(mcp): two SDK-default list methods answer cacheScope "public", and logging/setLevel answers without a logging capability

Open
#131 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
api

Research direction

Start with the cache-control middleware in internal/mcp/server.go around lines 924-946, where listRes.CacheScope is set to "private", and compare it with the go-sdk default handlers for prompts/list, resources/templates/list and logging/setLevel. First decide the intended behavior; the issue leaves this open. Done means the behavior is pinned by a wire-oracle scenario, the middleware comments match it, and the mcp-server spec has a delta.

Written by the indexing model from the issue text.

Description

area:mcp bug priority:low spec-needed
What happens
  • go-sdk's default handlers for prompts/list and resources/templates/list answer {"ttlMs":0,"cacheScope":"public", ...: []}. The cache-control middleware in internal/mcp/server.go (:924-946, where it sets listRes.CacheScope = "private") and its comments say that every codegraph response is cacheScope: "private".
  • logging/setLevel answers {}, but initialize advertises no logging capability.

No test or wire-oracle transcript pins either behavior. The mcp-server spec leaves both out on purpose.

What you expected instead
  • The two list methods answer private, like the four methods the middleware corrects, or the middleware comments name the methods it covers.
  • logging/setLevel answers method-not-found, or initialize advertises the logging capability.
Evidence

Probed on main on 2026-10-17 with a stdio session: initialize, then each method in turn.

Acceptance criteria
  • The behavior of prompts/list, resources/templates/list and logging/setLevel is decided, and a wire-oracle scenario pins it.
  • The middleware comments match the behavior.
  • The fix PR adds the requirement to the mcp-server spec through a delta.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UNqdnC3q6U362BvyfxuKCF

Dominant language
Go
Stars
0
Forks
0
Avg merge
5h 16m
Merged PRs (30d)
107

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from seanb4t/codegraph-go

All issues in seanb4t/codegraph-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.