Skip to content

Commit 61b9784

Browse files
authored
docs: make code examples in the README correct as per spec (#268)
1 parent 1c99eaf commit 61b9784

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Discuss the SDK on [Discord](https://discord.gg/RqSS2NQVsY)
1818

1919
</div>
2020

21+
2122
```go
2223
package main
2324

@@ -31,10 +32,11 @@ import (
3132
)
3233

3334
func main() {
34-
// Create MCP server
35+
// Create a new MCP server
3536
s := server.NewMCPServer(
3637
"Demo 🚀",
3738
"1.0.0",
39+
server.WithToolCapabilities(false),
3840
)
3941

4042
// Add tool
@@ -116,7 +118,6 @@ package main
116118

117119
import (
118120
"context"
119-
"errors"
120121
"fmt"
121122

122123
"github.com/mark3labs/mcp-go/mcp"
@@ -128,8 +129,7 @@ func main() {
128129
s := server.NewMCPServer(
129130
"Calculator Demo",
130131
"1.0.0",
131-
server.WithResourceCapabilities(true, true),
132-
server.WithLogging(),
132+
server.WithToolCapabilities(false),
133133
server.WithRecovery(),
134134
)
135135

@@ -181,6 +181,7 @@ func main() {
181181
}
182182
}
183183
```
184+
184185
## What is MCP?
185186

186187
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:

0 commit comments

Comments
 (0)