Skip to content

mcp: HasPrompts capability advertised but no prompts registered #3689

@Elvand-Lie

Description

@Elvand-Lie

Bug

The MCP server declares HasPrompts: true in its capabilities (pkg/mcp/mcp.go, line 84), but no prompts are registered anywhere in the codebase:

&mcp.ServerOptions{
    Instructions:       instructions(s.readonly),
    HasPrompts:         true,   // no prompts are registered
    HasResources:       true,
    HasTools:           true,
    InitializedHandler: ...,
}

Per the MCP specification, when a server declares prompts capability, clients may call prompts/list and expect results.

Impact

  • MCP clients that enumerate prompts will get an empty list, which is misleading
  • Some clients may present empty prompt UI or make unnecessary protocol round-trips
  • Incorrectly signals to MCP clients that the server supports a feature it does not

Fix

Set HasPrompts to false until prompts are actually implemented:

 &mcp.ServerOptions{
     Instructions:       instructions(s.readonly),
-    HasPrompts:         true,
+    HasPrompts:         false,
     HasResources:       true,
     HasTools:           true,
     InitializedHandler: ...,
 }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions