Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ To set up MCP in Cursor, follow their guide:

👉 [Cursor Documentation on Model Context Protocol](https://docs.cursor.com/context/model-context-protocol)

> [!IMPORTANT]
> Cursor **does not support MCP resources** yet.
This MCP server uses resources heavily, so **it will not work in Cursor** unless you explicitly disable resource usage.

To make it work, you **must** set the following environment variable:

```
FIREBOLT_MCP_DISABLE_RESOURCES=true
```

#### Using SSE Transport

By default, the MCP Server uses STDIO as the transport mechanism.
Expand Down
1 change: 0 additions & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func NewServer(
"tool call finished",
slog.Any("id", id),
slog.String("tool", message.Params.Name),
slog.Any("any", result.Result),
)
})
hooks.AddOnError(func(ctx context.Context, id any, method mcp.MCPMethod, message any, err error) {
Expand Down
6 changes: 4 additions & 2 deletions pkg/tools/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ func (t *Docs) Handler(ctx context.Context, request mcp.CallToolRequest) (*mcp.C
val, ok := request.GetArguments()["articles"]
if ok && val != nil {
articleIDs = val.([]any)
} else {
// Default articles to return if none specified
}

// Default articles to return if none specified
if len(articleIDs) == 0 {
articleIDs = append(
articleIDs,
resources.DocsArticleOverview, // General Firebolt overview
Expand Down
12 changes: 8 additions & 4 deletions pkg/tools/tools.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package tools

import "github.com/mark3labs/mcp-go/mcp"
import (
"github.com/mark3labs/mcp-go/mcp"
)

// textOrResourceContent returns a text content if disableResources is true, otherwise returns an embedded resource.
func textOrResourceContent(disableResources bool, i mcp.ResourceContents) mcp.Content {

if disableResources {
textResource, ok := i.(mcp.TextResourceContents)
if ok {
return mcp.NewTextContent(textResource.Text)
switch resource := i.(type) {
case mcp.TextResourceContents:
return mcp.NewTextContent(resource.Text)
case *mcp.TextResourceContents:
return mcp.NewTextContent(resource.Text)
}
}

Expand Down