Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: Ask a Question
url: https://github.com/mark3labs/mcp-go/discussions/categories/q-a
url: https://github.com/rickey17/mcp-go/discussions/categories/q-a
about: Ask any question about the project.
- name: Join the Community
url: https://discord.gg/RqSS2NQVsY
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[contact@mark3labs.com](mailto:contact@mark3labs.com).
[contact@rickey17.com](mailto:contact@rickey17.com).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ go version
```
5. Submit a pull request to the main branch.

Feel free to reach out if you have any questions or need help either by [opening an issue](https://github.com/mark3labs/mcp-go/issues) or by reaching out in the [Discord channel](https://discord.gg/RqSS2NQVsY).
Feel free to reach out if you have any questions or need help either by [opening an issue](https://github.com/rickey17/mcp-go/issues) or by reaching out in the [Discord channel](https://discord.gg/RqSS2NQVsY).
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<div align="center">
<img src="./logo.png" alt="MCP Go Logo">

[![Build](https://github.com/mark3labs/mcp-go/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mark3labs/mcp-go/actions/workflows/ci.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/mark3labs/mcp-go?cache)](https://goreportcard.com/report/github.com/mark3labs/mcp-go)
[![GoDoc](https://pkg.go.dev/badge/github.com/mark3labs/mcp-go.svg)](https://pkg.go.dev/github.com/mark3labs/mcp-go)
[![Build](https://github.com/rickey17/mcp-go/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/rickey17/mcp-go/actions/workflows/ci.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/rickey17/mcp-go?cache)](https://goreportcard.com/report/github.com/rickey17/mcp-go)
[![GoDoc](https://pkg.go.dev/badge/github.com/rickey17/mcp-go.svg)](https://pkg.go.dev/github.com/rickey17/mcp-go)

<strong>A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.</strong>

Expand All @@ -26,8 +26,8 @@ import (
"context"
"fmt"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

func main() {
Expand Down Expand Up @@ -106,7 +106,7 @@ MCP Go handles all the complex protocol details and server management, so you ca
## Installation

```bash
go get github.com/mark3labs/mcp-go
go get github.com/rickey17/mcp-go
```

## Quickstart
Expand All @@ -120,8 +120,8 @@ import (
"context"
"fmt"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Thank you for helping us improve the security of the project. Your contributions

## Reporting a Vulnerability

If you discover a security vulnerability within this project, please email the maintainers at [contact@mark3labs.com](mailto:contact@mark3labs.com).
If you discover a security vulnerability within this project, please email the maintainers at [contact@rickey17.com](mailto:contact@rickey17.com).
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"sync/atomic"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/client/transport"
"github.com/rickey17/mcp-go/mcp"
)

// Client implements the MCP client.
Expand Down
2 changes: 1 addition & 1 deletion client/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"fmt"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/rickey17/mcp-go/client/transport"
)

// NewStreamableHttpClient is a convenience method that creates a new streamable-http-based MCP client
Expand Down
6 changes: 3 additions & 3 deletions client/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"time"

"github.com/google/uuid"
"github.com/mark3labs/mcp-go/client/transport"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/client/transport"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

func TestHTTPClient(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions client/inprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package client
import (
"context"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/client/transport"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

// NewInProcessClient connect directly to a mcp server object in the same process
Expand Down
4 changes: 2 additions & 2 deletions client/inprocess_sampling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

// MockSamplingHandler implements SamplingHandler for testing
Expand Down
4 changes: 2 additions & 2 deletions client/inprocess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

func TestInProcessMCPClient(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion client/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package client
import (
"context"

"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/mcp"
)

// MCPClient represents an MCP client interface
Expand Down
2 changes: 1 addition & 1 deletion client/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"fmt"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/rickey17/mcp-go/client/transport"
)

// OAuthConfig is a convenience type that wraps transport.OAuthConfig
Expand Down
2 changes: 1 addition & 1 deletion client/oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/rickey17/mcp-go/client/transport"
)

func TestNewOAuthStreamableHttpClient(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions client/protocol_negotiation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/client/transport"
"github.com/rickey17/mcp-go/mcp"
)

// mockProtocolTransport implements transport.Interface for testing protocol negotiation
Expand Down
2 changes: 1 addition & 1 deletion client/sampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"context"

"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/mcp"
)

// SamplingHandler defines the interface for handling sampling requests from servers.
Expand Down
4 changes: 2 additions & 2 deletions client/sampling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/json"
"testing"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/client/transport"
"github.com/rickey17/mcp-go/mcp"
)

// mockSamplingHandler implements SamplingHandler for testing
Expand Down
2 changes: 1 addition & 1 deletion client/sse.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"net/url"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/rickey17/mcp-go/client/transport"
)

func WithHeaders(headers map[string]string) transport.ClientOption {
Expand Down
6 changes: 3 additions & 3 deletions client/sse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"testing"
"time"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/rickey17/mcp-go/client/transport"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

type contextKey string
Expand Down
2 changes: 1 addition & 1 deletion client/stdio.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"io"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/rickey17/mcp-go/client/transport"
)

// NewStdioMCPClient creates a new stdio-based MCP client that communicates with a subprocess.
Expand Down
4 changes: 2 additions & 2 deletions client/stdio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/mark3labs/mcp-go/client/transport"
"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/client/transport"
"github.com/rickey17/mcp-go/mcp"
)

func compileTestServer(outputPath string) error {
Expand Down
4 changes: 2 additions & 2 deletions client/transport/inprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"sync"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/server"
)

type InProcessTransport struct {
Expand Down
2 changes: 1 addition & 1 deletion client/transport/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/json"

"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/mcp"
)

// HTTPHeaderFunc is a function that extracts header entries from the given context
Expand Down
18 changes: 9 additions & 9 deletions client/transport/sse.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"sync/atomic"
"time"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/util"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/util"
)

// SSE implements the transport layer of the MCP protocol using Server-Sent Events (SSE).
Expand All @@ -36,12 +36,12 @@ type SSE struct {
headerFunc HTTPHeaderFunc
logger util.Logger

started atomic.Bool
closed atomic.Bool
cancelSSEStream context.CancelFunc
protocolVersion atomic.Value // string
onConnectionLost func(error)
connectionLostMu sync.RWMutex
started atomic.Bool
closed atomic.Bool
cancelSSEStream context.CancelFunc
protocolVersion atomic.Value // string
onConnectionLost func(error)
connectionLostMu sync.RWMutex

// OAuth support
oauthHandler *OAuthHandler
Expand Down Expand Up @@ -220,7 +220,7 @@ func (c *SSE) readSSE(reader io.ReadCloser) {
c.connectionLostMu.RLock()
handler := c.onConnectionLost
c.connectionLostMu.RUnlock()

if handler != nil {
// This is not actually an error - HTTP2 idle timeout disconnection
handler(err)
Expand Down
2 changes: 1 addition & 1 deletion client/transport/sse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"testing"
"time"

"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/mcp"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions client/transport/stdio.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"os/exec"
"sync"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/util"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/util"
)

// Stdio implements the transport layer of the MCP protocol using stdio communication.
Expand Down
2 changes: 1 addition & 1 deletion client/transport/stdio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"testing"
"time"

"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/mcp"
"github.com/stretchr/testify/require"
)

Expand Down
16 changes: 8 additions & 8 deletions client/transport/streamable_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"sync/atomic"
"time"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/util"
"github.com/rickey17/mcp-go/mcp"
"github.com/rickey17/mcp-go/util"
)

type StreamableHTTPCOption func(*StreamableHTTP)
Expand Down Expand Up @@ -605,7 +605,7 @@ func (c *StreamableHTTP) listenForever(ctx context.Context) {
connectCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
err := c.createGETConnectionToServer(connectCtx)
cancel()

if errors.Is(err, ErrGetMethodNotAllowed) {
// server does not support listening
c.logger.Errorf("server does not support listening")
Expand All @@ -621,7 +621,7 @@ func (c *StreamableHTTP) listenForever(ctx context.Context) {
if err != nil {
c.logger.Errorf("failed to listen to server. retry in 1 second: %v", err)
}

// Use context-aware sleep
select {
case <-time.After(retryInterval):
Expand Down Expand Up @@ -704,15 +704,15 @@ func (c *StreamableHTTP) handleIncomingRequest(ctx context.Context, request JSON
// Create a new context with timeout for request handling, respecting parent context
requestCtx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()

response, err := handler(requestCtx, request)
if err != nil {
c.logger.Errorf("error handling request %s: %v", request.Method, err)

// Determine appropriate JSON-RPC error code based on error type
var errorCode int
var errorMessage string

// Check for specific sampling-related errors
if errors.Is(err, context.Canceled) {
errorCode = -32800 // Request cancelled
Expand All @@ -731,7 +731,7 @@ func (c *StreamableHTTP) handleIncomingRequest(ctx context.Context, request JSON
errorMessage = err.Error()
}
}

// Send error response
errorResponse := &JSONRPCResponse{
JSONRPC: "2.0",
Expand Down
2 changes: 1 addition & 1 deletion client/transport/streamable_http_oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/mark3labs/mcp-go/mcp"
"github.com/rickey17/mcp-go/mcp"
)

func TestStreamableHTTP_WithOAuth(t *testing.T) {
Expand Down
Loading