Skip to content
Open
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ t/plugin/grpc-web/grpc-web-server
t/plugin/grpc-web/node_modules/
pack
pack-v*-linux.tgz*
t/plugin/mcp/servers/
t/node_modules/

# release tar package
*.tgz
Expand Down
4 changes: 4 additions & 0 deletions ci/init-common-test-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ sleep 3s
docker exec -i localstack sh -c "awslocal secretsmanager create-secret --name apisix-key --description 'APISIX Secret' --secret-string '{\"jack\":\"value\"}'"
sleep 3s
docker exec -i localstack sh -c "awslocal secretsmanager create-secret --name apisix-mysql --description 'APISIX Secret' --secret-string 'secret'"

# prepare filesystem mcp server
sleep 3s
./ci/prepare_filesystem_mcp.sh
44 changes: 44 additions & 0 deletions ci/prepare_filesystem_mcp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"

VERSION="2025.7.1"
URL="https://github.com/modelcontextprotocol/servers/archive/refs/tags/${VERSION}.tar.gz"

WORKDIR="$(mktemp -d)"
DEST_DIR="${REPO_ROOT}/t/plugin/mcp/servers"

curl -L "${URL}" | tar -xz -C "${WORKDIR}"

rm -rf "${DEST_DIR}"
mkdir -p "$(dirname "${DEST_DIR}")"

cp -R "${WORKDIR}/servers-${VERSION}" "${DEST_DIR}"

(
cd "${DEST_DIR}"
npm install
npm run build -w @modelcontextprotocol/server-filesystem
)

echo "[OK] filesystem MCP ready: ${DEST_DIR}"
10 changes: 4 additions & 6 deletions t/plugin/mcp-bridge.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
use t::APISIX;

# This test cannot be executed normally at the moment, so it will be temporarily skipped and fixed in a later PR.
plan(skip_all => 'skip test case');
use t::APISIX 'no_plan';

repeat_each(1);
no_long_string();
Expand Down Expand Up @@ -74,8 +71,8 @@ property "args" validation failed: wrong type: expected array, got string
"plugins": {
"mcp-bridge": {
"base_uri": "/mcp",
"command": "pnpm",
"args": ["dlx", "@modelcontextprotocol/server-filesystem@2025.7.1", "/"]
"command": "node",
"args": ["t/plugin/mcp/servers/src/filesystem/dist/index.js", "/"]
}
},
"uri": "/mcp/*"
Expand All @@ -90,6 +87,7 @@ property "args" validation failed: wrong type: expected array, got string
}
--- response_body
passed
--- wait: 2



Expand Down
Loading