Skip to content

Commit 4978c7e

Browse files
Add MCP servers configuration example in README
1 parent fda32a9 commit 4978c7e

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ The `llm` section supports multiple providers with provider-specific configurati
115115

116116
- **OpenAI**:
117117
- `apiKey`: OpenAI API key (can use OPENAI_API_KEY env variable)
118+
- `endpoint`: OpenAI API endpoint (default: https://api.openai.com/v1)
118119

119120
- **OpenRouter**:
120121
- `apiKey`: OpenRouter API key (can use OPENROUTER_API_KEY env variable)
@@ -131,6 +132,43 @@ The `genTitleLLM` section allows separate configuration for title generation, de
131132
- `command`: Command to run server
132133
- `args`: Arguments for the server command
133134

135+
#### Example MCP Server Configurations
136+
137+
**SSE Server Example:**
138+
```yaml
139+
mcpSSEServers:
140+
filesystem:
141+
url: https://yoursseserver.com
142+
maxPayloadSize: 1048576 # 1MB
143+
```
144+
145+
**StdIO Server Examples:**
146+
147+
1. Using the [official filesystem MCP server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem):
148+
```yaml
149+
mcpStdIOServers:
150+
filesystem:
151+
command: npx
152+
args:
153+
- -y
154+
- "@modelcontextprotocol/server-filesystem"
155+
- "/path/to/your/files"
156+
```
157+
This example can be used directly as the official filesystem mcp server is an executable package that can be run with npx. Just update the path to point to your desired directory.
158+
159+
2. Using [go-mcp filesystem MCP server](https://github.com/MegaGrindStone/go-mcp/tree/main/servers/filesystem):
160+
```yaml
161+
mcpStdIOServers:
162+
filesystem:
163+
command: go
164+
args:
165+
- run
166+
- github.com/your_username/your_app # Replace with your app
167+
- -path
168+
- "/data/mcp/filesystem" # Path to expose to MCP clients
169+
```
170+
For this example, you'll need to create a new Go application that imports the `github.com/MegaGrindStone/go-mcp/servers/filesystem` package. The flag naming (like `-path` in this example) is completely customizable based on how you structure your own application - it doesn't have to be called "path". [This example](https://github.com/MegaGrindStone/go-mcp/blob/main/example/filesystem/main.go) is merely a starting point showing one possible implementation where a flag is used to specify which directory to expose. You're free to design your own application structure and command-line interface according to your specific needs.
171+
134172
### Example Configuration Snippet
135173
```yaml
136174
port: 8080
@@ -140,9 +178,9 @@ systemPrompt: You are a helpful assistant.
140178
llm:
141179
provider: anthropic
142180
model: claude-3-5-sonnet-20241022
181+
maxTokens: 1000
143182
parameters:
144183
temperature: 0.7
145-
maxTokens: 1000
146184
147185
genTitleLLM:
148186
provider: openai

0 commit comments

Comments
 (0)