pixiu-mcp-gateway
Creates and validates dubbo-go-pixiu MCP gateway conf.yaml. Use for MCP server filters, tools/list, tools/call, Mcp-Session-Id, MCP auth, Nacos MCP registry, or exposing backend HTTP APIs as MCP tools. Do not use for LLM model proxying.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 574
- Forks
- 195
01 前言 Front Matter
- name
- pixiu-mcp-gateway
- description
- Creates and validates dubbo-go-pixiu MCP gateway conf.yaml. Use for MCP server filters, tools/list, tools/call, Mcp-Session-Id, MCP auth, Nacos MCP registry, or exposing backend HTTP APIs as MCP tools. Do not use for LLM model proxying.
03 SKILL.md 正文
pixiu-mcp-gateway
Purpose
Generate a complete or embeddable MCP gateway conf.yaml that exposes backend HTTP APIs as MCP tools.
When to use
-
Use when:
- Exposing backend HTTP APIs as MCP tools through the Pixiu MCP gateway, in static or Nacos dynamic mode, or configuring resources/templates/prompts, OAuth/JWT protection, or Streamable HTTP/SSE.
-
Do not use for:
- LLM model proxying or implementing a new MCP-related filter.
Inputs
<HARD-GATE> Do not generate YAML, write code, create files, or take any implementation action until the user has provided all required inputs. This is a first principle.
If any required input is missing, this turn must only ask for the missing fields in the current input group; do not generate examples, defaults, YAML, code, or final output.
Even if configuration information seems inferable, obvious, or implied by context, you must still ask the user to confirm it. Do not proceed until the user confirms it. </HARD-GATE>
-
Choose tool source (required):
- Required:
tool_mode:staticorregistry
- Required:
-
listener(required):- Defaults:
address.socket_address.address: 0.0.0.0address.socket_address.port: 8888
- Defaults:
-
route_config(required):- Defaults:
routes[].match.prefix: /mcproutes[].route.cluster: mcp-route(route cluster name)
- Defaults:
-
dgp.filter.mcp.mcpserver(required):- Defaults:
config.endpoint: /mcpconfig.server_info.name: Pixiu MCP Serverconfig.server_info.version: 1.0.0config.server_info.description: MCP Server powered by Apache Dubbo-go-pixiuconfig.server_info.instructions: Use the provided tools to interact with backend services.
- Defaults:
-
Static tools (required when
tool_mode: static):- Required:
tools[].nametools[].request.path- Endpoint under
static_resources.clusters[]for each backend cluster referenced by a tool:clusters[].endpoints[].socket_address.addressclusters[].endpoints[].socket_address.port
- Optional:
tools[].descriptiontools[].args[]
- Defaults (
tools[].clusterandclusters[].namereference the same name; changing one requires changing the other):tools[].cluster: mcp-backendclusters[].name: mcp-backendtools[].request.method: GETtools[].request.timeout: 30stools[].args[].type: string
- Required:
-
Registry tools (required when
tool_mode: registry):- Required:
registries.nacos.address
- Optional:
registries.nacos.groupregistries.nacos.namespaceregistries.nacos.usernameregistries.nacos.password
- Defaults:
adapters[].id: mcp-nacosadapters[].name: dgp.adapter.mcpserverregistries.nacos.protocol: nacosregistries.nacos.timeout: 5sregistries.nacos.group: DEFAULT_GROUP
- Required:
-
resources[](optional):- Required:
resources[].nameresources[].uriresources[].source.type
- Conditionally required by
resources[].source.type:resources[].source.contentforinlineresources[].source.pathforfileresources[].source.urlforurlresources[].source.templatefortemplate
- Optional:
resources[].descriptionresources[].mime_type
- Required:
-
resource_templates[](optional):- Required:
resource_templates[].nameresource_templates[].uri_template
- Optional:
resource_templates[].titleresource_templates[].descriptionresource_templates[].mime_typeresource_templates[].parameters[]resource_templates[].annotations
- Required:
-
prompts[](optional):- Required:
prompts[].nameprompts[].messages[].roleprompts[].messages[].content
- Optional:
prompts[].titleprompts[].descriptionprompts[].arguments[]
- Required:
-
dgp.filter.http.auth.mcp(optional):- Required:
resource_metadata.resourceresource_metadata.authorization_servers[]providers[].nameproviders[].issuerproviders[].jwks
- Defaults:
resource_metadata.path: /.well-known/oauth-protected-resourceproviders[].audience: defaults toresource_metadata.resourcerules[].cluster: defaults toroute_config.routes[].route.cluster
- Required:
Workflow
- Check required Inputs first:
- Read existing config and already provided user information first; do not ask again for information already present or stated.
- Ask one
Inputsgroup at a time. Each time, output only that group's required fields, with a short explanation after each field. - If the current group's required fields are incomplete, ask only for the missing fields and do not move to the next group.
- After the current group's required fields are complete, ask whether to fill that group's optional fields; if yes, list those optional fields with short explanations.
- After optional fields are skipped or completed, apply that group's defaults and output default-value information; defaults must not override existing config or user input.
- When field shape or behavior is uncertain, read current source before generating YAML:
pkg/common/constant/key.go.pkg/model/mcpserver.go.pkg/filter/mcp/mcpserver/plugin.go,filter.go,handlers.go, andtransport/.- Read
pkg/filter/auth/mcp/config.goandfilter.gowhen auth is required. - Read
pkg/adapter/mcpserver/registrycenter.goandpkg/adapter/mcpserver/registry/nacos/when Nacos is required.
- Choose static or registry path by
tool_mode: static writes tools into the MCP filter; registry uses the MCP server adapter. - Generate listener, route, and filters: route the MCP endpoint to the route cluster, and put the auth filter before the MCP server when needed.
- Generate tool backend: write static tool backend clusters under
static_resources.clusters[]; map args withpath,query, orbody.
Output format
- Show the relevant YAML fragments.
Validation
- Verify
dgp.filter.http.auth.mcprules[].clustermatches the MCP route cluster, such asmcp-route, not a tool backend cluster. - Verify MCP filter-chain order:
dgp.filter.http.auth.mcp->dgp.filter.mcp.mcpserver->dgp.filter.http.httpproxy; ignore missing filters within this order chain. - Verify every static tool
clusterhas a same-name cluster declaration understatic_resources.clusters[]. - Verify
dgp.filter.mcp.mcpserver.config.endpointexactly matches the path in the client call URL. - When
resources[]is configured, verify the user has been told about the currentresources/readruntime limitation: it returns placeholder content and does not read real data fromsource; do not claim clients can read actual content fromsource.content/path/url/template.
Examples
Static mode (conf.yaml):
static_resources:
listeners:
- name: net/http
protocol_type: HTTP
address:
socket_address:
address: 0.0.0.0
port: 8888
filter_chains:
filters:
- name: dgp.filter.httpconnectionmanager
config:
route_config:
routes:
- match:
prefix: /mcp
route:
cluster: mcp-route
http_filters:
- name: dgp.filter.http.auth.mcp
config:
resource_metadata:
path: /.well-known/oauth-protected-resource
resource: http://localhost:8888/mcp
authorization_servers:
- http://localhost:9000
providers:
- name: local
issuer: http://localhost:9000
jwks: http://localhost:9000/.well-known/jwks.json
audience: http://localhost:8888/mcp
rules:
- cluster: mcp-route
- name: dgp.filter.mcp.mcpserver
config:
endpoint: /mcp
server_info:
name: demo-mcp
version: "1.0.0"
description: Demo MCP server for user APIs
instructions: Use the exposed tools to query and create users.
tools:
- name: search_users
description: Search users by status
cluster: users
request:
method: GET
path: /users
timeout: 5s
args:
- name: status
type: string
in: query
description: User status filter
required: false
default: active
enum:
- active
- disabled
resources:
- name: service-status
uri: pixiu://service/status
description: Current service status
mime_type: application/json
source:
type: inline
content: '{"status":"ok"}'
resource_templates:
- name: user-profile
uri_template: pixiu://users/{id}
title: User profile
description: User profile by ID
mime_type: application/json
parameters:
- name: id
type: string
description: User ID
required: true
annotations:
audience:
- assistant
priority: 0.7
prompts:
- name: summarize_user
title: Summarize user
description: Summarize a user profile
arguments:
- name: id
description: User ID
required: true
messages:
- role: user
content: "Summarize user {{id}}."
- name: dgp.filter.http.httpproxy
clusters:
- name: mcp-route
endpoints:
- socket_address:
address: 127.0.0.1
port: 8080
- name: users
endpoints:
- socket_address:
address: 127.0.0.1
port: 8080
Registry mode example (conf.yaml):
static_resources:
listeners:
- name: net/http
protocol_type: HTTP
address:
socket_address:
address: 0.0.0.0
port: 8888
filter_chains:
filters:
- name: dgp.filter.httpconnectionmanager
config:
route_config:
routes:
- match:
prefix: /mcp
route:
cluster: mcp-route
http_filters:
- name: dgp.filter.mcp.mcpserver
config:
endpoint: /mcp
server_info:
name: demo-mcp
version: "1.0.0"
description: Demo MCP server with Nacos-managed tools
instructions: Tool definitions are loaded from Nacos.
- name: dgp.filter.http.httpproxy
clusters:
- name: mcp-route
endpoints:
- socket_address:
address: 127.0.0.1
port: 8080
adapters:
- id: mcp-nacos
name: dgp.adapter.mcpserver
config:
registries:
nacos:
protocol: nacos
address: "127.0.0.1:8848"
timeout: "5s"
group: DEFAULT_GROUP
04 同仓库更多 Skills
pixiu-llm-gateway
Creates and validates dubbo-go-pixiu LLM gateway conf.yaml. Use for LLM proxy/tokenizer/kvcache filters, llm_meta, vLLM, LMCache, retry/fallback, or Nacos LLM discovery. Do not use for MCP gateway config.
pixiu-http-to-dubbo
Creates and debugs dubbo-go-pixiu HTTP-to-Dubbo route YAML. Use for api_config.yaml/conf.yaml routes, direct Dubbo URLs, registry-backed Dubbo, mappingParams, mapType, parameterTypes, opt.types/opt.values, or generic-invoke errors. Do not use for non-Dubbo HTTP proxy routes or new registry adapter implementation.
pixiu-filter-author
Creates and debugs dubbo-go-pixiu HTTP/Network filters. Use when adding, registering, or wiring Pixiu filters, or when a filter compiles but does not run. Do not use for adapter or protocol-listener SPI work.