-
Notifications
You must be signed in to change notification settings - Fork 273
Closed
Labels
Milestone
Description
I have created a basic MCP server using Go SDK as given in the example, updated the configuration file of claude_desktop_config.json file as per below:
{
"mcpServers": {
"cars": {
"command": "/Users/ohmpatel/c-mcp-servers/showroomv2/showroom",
"env": {}
}
},
"isUsingBuiltInNodeForMcp": false
}
but claude can not show detect the tool in conversation panel:
Below is what i do:
func main() {
server := mcp.NewServer(&mcp.Implementation{Name: "showroom", Version: "v1.0.0"}, nil)
mcp.AddTool(server, &mcp.Tool{
Name: "list-showroom-cars",
Description: "Retrieves a list of cars from the showroom with optional filtering by limit, currency, state, and offset."},
getshowroomcars)
// Run the server over stdin/stdout, until the client disconnects
if err := server.Run(context.Background(), mcp.NewStdioTransport()); err != nil {
log.Fatal(err)
}
}
func getshowroomcars(ctx context.Context, session *mcp.ServerSession, req *mcp.CallToolParamsFor[any]) (*mcp.CallToolResultFor[mcp.Content], error) {
return &mcp.CallToolResultFor[mcp.Content]{StructuredContent: &mcp.TextContent{
Text: "welcome to example mcp tool",
}}, nil
}