You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This approach to organizing code facilitates integration with the all-in-one MCP server plugin. The all-in-one plugin combines multiple MCP servers into a single plugin, reducing the overhead of deploying multiple plugins on the gateway.
152
+
153
+
### All-in-One Integration
154
+
155
+
The all-in-one plugin packages multiple MCP servers into a single WASM binary. Each MCP server maintains its own identity and configuration, but they share the same plugin instance. Here's an example of how multiple MCP servers are integrated in the all-in-one plugin:
The configuration for the all-in-one plugin follows the same pattern as individual MCP server plugins. The `name` field in the server configuration is used to identify and route requests to the appropriate MCP server within the all-in-one plugin.
180
+
131
181
## Main Entry Point
132
182
133
183
The main.go file is the entry point for your MCP server. It registers your tools and resources:
When deploying your MCP server as a Higress plugin, you need to configure it in the Higress configuration. Here's an example configuration:
207
+
208
+
```yaml
209
+
server:
210
+
# MCP server name - MUST match the name used in mcp.AddMCPServer() in your code
211
+
name: my-mcp-server
212
+
# MCP server configuration
213
+
config:
214
+
apiKey: your-api-key-here
215
+
# Optional: If configured, acts as a whitelist - only tools listed here can be called
216
+
tools:
217
+
- my_tool
218
+
- another_tool
219
+
```
220
+
221
+
> **Important**: The `name` field in the server configuration must exactly match the server name used in the `mcp.AddMCPServer()` call in your code. This is how the system identifies which MCP server should handle the request.
222
+
157
223
## Dependencies
158
224
159
225
Your MCP server must use a specific version of the wasm-go SDK that supports Go 1.24's WebAssembly compilation features:
0 commit comments