Skip to content

Deployment ​

Two ways to run these servers: locally over stdio, where your AI client spawns the process itself, and on a host over HTTP, where one server serves a team or a CI runner. This page covers the second one: starting it, preparing the index, systemd and Docker, a reverse proxy with TLS, and the security settings that actually matter.

Never deployed anything to a server? Start with From scratch: it walks from an empty machine to a working URL step by step and explains what each step is for. The rest of the page is the reference for what happens there.

The view server (vue-codebase-view-mcp) is a different case — it is a Vite dev server that executes the target project's code. See Preview on a remote host before exposing it.

Two scenarios ​

Local, stdioOn a host, HTTP
Who starts the processthe AI client, per sessionyou (systemd, Docker, a screen session)
Transportthe process's stdin/stdoutstreamable HTTP at one endpoint
Addressnone — no port is involvedhttp://host:3333/mcp by default
Authenticationnone needed (the client owns the process)Authorization: Bearer <token>
Indexbuilt or loaded per sessionbuilt once, reused by every client
Good forone developer on one machinea team, a shared CI index, a locked-down runner

Both scenarios run the same code; only transport differs. HTTP is available for the indexer only — the view server speaks stdio.

From scratch: an empty machine to a working URL ​

This section is written for a frontend developer who has never deployed anything to a server. It goes from an empty machine to an address you can paste into an AI client's configuration. The commands are for Ubuntu/Debian — on other distributions the package names differ, the steps do not.

The Linux commands and the proxy configuration here were not run on a live machine (the authoring environment is macOS). Everything that belongs to the servers themselves — flags, environment variables, exit codes, endpoint responses — is captured from real runs of this repository.

Step 0 — Do you need this at all ​

The honest answer: if you work alone, no. A local stdio server is enough — the client starts it itself, the index is built on your machine, and there is nothing to maintain. Deploying to a host makes sense when:

  • several people need the index, and rebuilding it on every machine is wasted work;
  • the project is large and index --mode full takes minutes instead of seconds;
  • a CI runner needs the tools, or an assistant works on a schedule;
  • the code must not live on a developer's machine but may live on a company host.

In every other case go straight to the Quick Start.

Step 1 — The machine ​

A "server" here is an ordinary Linux virtual machine you reach over SSH. You rent one from any provider (Hetzner, DigitalOcean, AWS Lightsail, Yandex Cloud, Timeweb — examples, not recommendations).

ParameterWhat to pick
ImageUbuntu 24.04 LTS or Debian 12 — the commands below are written for them
Resources2 vCPU / 4 GB is a sensible minimum. index --mode full keeps a TypeScript program for the whole project in memory, so a large monorepo needs more
Diskthe project + node_modules + the index snapshot; 20 GB is plenty
AccessSSH by key, not by password
Networka public IPv4 and the ability to point a DNS record at the domain

If your company already has an internal platform (Kubernetes, an internal PaaS), deploy there instead: the artifact is the same (the Docker image from the Docker section), and the platform handles steps 1–3 and 8 (the machine, access, Node, the domain and TLS).

Step 2 — SSH and a separate user ​

SSH is an encrypted remote terminal: you type commands locally and they run on the host.

bash
ssh root@203.0.113.10          # the address from the provider's panel

The first connection asks whether to trust the host fingerprint — answer yes. Then create an unprivileged user: the server is going to read your code, and it does not need root for that.

bash
adduser --disabled-password --gecos "" vue-mcp     # no password: key-based login only
mkdir -p /home/vue-mcp/.ssh && cp ~/.ssh/authorized_keys /home/vue-mcp/.ssh/
chown -R vue-mcp:vue-mcp /home/vue-mcp/.ssh && chmod 700 /home/vue-mcp/.ssh
usermod -aG sudo vue-mcp                            # sudo rights to install packages
su - vue-mcp                                        # everything below runs as this user

If the provider gave you password access instead of a key, put your public key (~/.ssh/id_ed25519.pub from your own machine) into /home/vue-mcp/.ssh/authorized_keys and check the login: ssh vue-mcp@203.0.113.10.

Step 3 — Node.js ≥ 20 ​

bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v        # v22.x.x
npm -v

If you prefer nvm, use it — there is no difference: both servers only need Node ≥ 20. You do not have to install the packages globally: npx vue-codebase-mcp … downloads them itself, but on a server it is more predictable to pin the version (step 4).

Step 4 — The project on the server ​

The indexer answers about your project, so the project has to be on the host. Two ways:

bash
# a) from git — preferred: updating becomes git pull
sudo mkdir -p /srv/projects && sudo chown vue-mcp:vue-mcp /srv/projects
git clone git@gitlab.example.com:team/ui-library.git /srv/projects/ui-library
cd /srv/projects/ui-library && npm ci

# b) from your machine — when the repository is not reachable from the host
rsync -az --delete --exclude node_modules --exclude .git \
  ~/programming/ui-library/ vue-mcp@203.0.113.10:/srv/projects/ui-library/

npm ci is not optional: type resolution in full mode builds a real TypeScript program from the project's tsconfig.json. Without the dependencies installed, imported types (including vue) cannot be resolved and part of the API ends up incomplete.

The project itself can stay read-only — the server writes into exactly one directory, .vue-codebase-mcp.cache/, where the snapshot lives.

Step 5 — The index snapshot ​

bash
cd /srv/projects/ui-library
npx vue-codebase-mcp index --root . --mode full
echo "exit code: $?"

The exit code is how you know the build was real: 0 built and not empty, 2 project root not found (the snapshot was not written), 3 index is empty. The report goes to stdout, so … --json > report.json saves a machine-readable version.

Details and codes: Preparing the index on the host.

Step 6 — First run and a check ​

Generate a token first and start the server by hand, in a plain terminal — that way you see any error immediately:

bash
export MCP_AUTH_TOKEN="$(openssl rand -hex 24)"
echo "$MCP_AUTH_TOKEN"     # save it: the clients will need it

npx vue-codebase-mcp serve --root /srv/projects/ui-library \
  --transport http --host 127.0.0.1 --port 3333 --lang en

stdout prints vue-codebase-mcp: MCP available at http://127.0.0.1:3333/mcp (with --lang ru — MCP доступен на …). Open a second SSH connection to the same host and probe the endpoint:

bash
# no token — 401 as expected
curl -sS -o /dev/null -w "%{http_code}\n" -X POST http://127.0.0.1:3333/mcp \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'

# with the token — 200 and an SSE body with the handshake result
curl -sS -X POST http://127.0.0.1:3333/mcp \
  -H "Authorization: Bearer $MCP_AUTH_TOKEN" \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'

Note that the server is bound to 127.0.0.1, so it listens on the host only. That is deliberate — a reverse proxy is what faces the internet (step 8). This is also why you check it from the inside.

Stop the server with Ctrl+C once the answers arrive.

Step 7 — Keeping the process alive ​

A server started in a terminal dies with the SSH session. You need a supervisor — a program that keeps the process running and restarts it after a failure.

OptionWhen to choose itDescribed in
systemdan ordinary Linux host; recommended: restart on failure, a journal, a timersystemd
Dockeryou have a container registry or an internal platformDocker
PM2the team already uses it for Node applicationsbelow
screen / tmuxexperiments only: no restart, no journal—

With systemd the order is this (the unit files in full are in the systemd section):

bash
sudo nano /etc/systemd/system/vue-codebase-mcp.service   # copy the unit from the systemd section
sudo systemctl daemon-reload
sudo systemctl enable --now vue-codebase-mcp.service
systemctl status vue-codebase-mcp.service                # active (running)
journalctl -u vue-codebase-mcp -f                        # live log, Ctrl+C to leave

PM2 does the same, only the process is described by a command rather than a unit:

bash
sudo npm install -g pm2

# PM2 inherits the environment of the shell that runs `pm2 start`
export MCP_AUTH_TOKEN="<the token from step 6>"
pm2 start "npx vue-codebase-mcp serve --root /srv/projects/ui-library --transport http --host 127.0.0.1 --port 3333 --lang en" \
  --name vue-codebase-mcp

pm2 save       # remember the process list
pm2 startup    # prints a command you still have to run: start after a reboot
pm2 logs vue-codebase-mcp

After changing environment variables restart the process with pm2 restart vue-codebase-mcp --update-env, otherwise it keeps the old environment.

Keep the token in an environment variable or in a file with 600 permissions, not in your shell history: history and ps aux are visible to everyone who reaches the host.

Step 8 — Domain, HTTPS and the firewall ​

Clients connect over https://, so you need a domain and a certificate. The scheme is the same as for any web application: the server listens on a local port, and a reverse proxy accepts the public traffic, terminates TLS and forwards the requests to 127.0.0.1:3333. For a frontend developer it is the analogue of server.proxy in vite.config, at machine level.

  1. DNS. Create an A record mcp.internal.example → the host's IP and wait for it to propagate (dig +short mcp.internal.example).

  2. The proxy. The short path is Caddy: it obtains and renews Let's Encrypt certificates by itself.

    text
    # /etc/caddy/Caddyfile
    mcp.internal.example {
      reverse_proxy /mcp 127.0.0.1:3333 {
        flush_interval -1
      }
    }
    bash
    sudo caddy reload --config /etc/caddy/Caddyfile

    The nginx + certbot variant is in Reverse proxy and TLS.

  3. Allow the Host. The server validates the Host header and answers 403 Invalid Host to a domain it does not know. Add the public name to the service's environment: MCP_ALLOWED_HOSTS=mcp.internal.example. This is the most common cause of "the server works but does not answer through the proxy".

  4. Firewall. Only SSH and HTTPS should be public — the MCP port stays closed because the server is bound to 127.0.0.1:

    bash
    sudo ufw allow OpenSSH
    sudo ufw allow 443/tcp
    sudo ufw enable
    sudo ufw status

Check from the outside, from your own machine:

bash
curl -sS -o /dev/null -w "%{http_code}\n" https://mcp.internal.example/mcp
# 401 — meaning the proxy, TLS and the route all work: the request simply had no token

Step 9 — Clients and updates ​

The address and the token go into the client's configuration — the shapes for Qwen Code, Cursor and Claude Desktop are in Connecting clients. The check is the same as locally: ask the assistant to list the tools; a working indexer answers with ten of them.

Maintenance then comes down to three things:

  • rebuilding the index. A running serve picks up edits on the fly, but it does not rewrite the snapshot on disk, and only a full build brings back the exact types of an edited file. So the snapshot is rebuilt on a schedule or in CI: the timer in the systemd section or the cron entry in Preparing the index;
  • updating the package. npm install -g vue-codebase-mcp@latest (or rebuild the image), then systemctl restart vue-codebase-mcp and index --mode full again;
  • rotating the token. Change MCP_AUTH_TOKEN, restart the service, update the clients' configurations. The server does not know who connects — there is one token for everybody and no access log.

When it does not work ​

SymptomWhat to check
curl: (7) Failed to connect from the hostis the process alive? systemctl status vue-codebase-mcp, ss -ltnp | grep 3333
401 Unauthorizedthe Authorization: Bearer <token> header matches the service's MCP_AUTH_TOKEN
403 Invalid Hostthe domain is not in MCP_ALLOWED_HOSTS
403 Invalid Originthe request comes from a browser with a foreign Origin; curl and MCP clients never do that
404 MCP endpoint is /mcpthe client calls the wrong path — the endpoint is /mcp
502 Bad Gateway from the proxythe proxy is fine but the server is not listening on 127.0.0.1:3333
Timeout from outside, works insidefirewall or proxy: sudo ufw status, is the proxy listening on 443
The server starts but says the index is emptythere is no snapshot: run step 5; exit code 3 means the location patterns matched nothing
Answers are half in the wrong language--lang wins over MCP_*_LANG and language in the config — see Language

Logs are the first place to look: journalctl -u vue-codebase-mcp -n 100 under systemd, docker compose logs under Docker, pm2 logs vue-codebase-mcp under PM2. MCP_LOG_LEVEL=debug sets the verbosity.

Running over HTTP ​

bash
MCP_AUTH_TOKEN=demo-token-123 \
  npx vue-codebase-mcp serve --root /srv/projects/ui-library \
  --transport http --host 127.0.0.1 --port 3399 --lang en

Real stdout (in HTTP mode stdout is free — the protocol no longer occupies it):

text
vue-codebase-mcp: MCP available at http://127.0.0.1:3399/mcp

Real stderr:

text
[vue-codebase-mcp] info: Loaded index snapshot from 2026-11-20T17:46:24.193Z: 12 entities, 10 documents
[vue-codebase-mcp] info: Index: full, 12 entities, 10 documents
[vue-codebase-mcp] info: Watching 7 patterns
[vue-codebase-mcp] info: vue-codebase-mcp: HTTP transport at http://127.0.0.1:3399/mcp

Configuration keys ​

In .vue-codebase-mcp.json (a schema comment in the config schema; values support ${ENV_VAR} substitution):

KeyDefaultPurpose
transport.typestdiostdio or http
transport.host127.0.0.1Bind address
transport.httpPort3333Port
transport.httpPath/mcpEndpoint path
transport.authToken—Bearer token; empty means no authentication

Inside the process these become transport.{type, host, port, path, authToken} — that is what npx vue-codebase-mcp config --root <path> prints.

Environment variables ​

VariablePurpose
MCP_TRANSPORThttp switches the transport on; any other value leaves the default stdio
MCP_PORTPort, used when transport.httpPort is not set
MCP_AUTH_TOKENBearer token, used when transport.authToken is not set
MCP_ALLOWED_HOSTSComma-separated extra allowed values of the Host header (an ingress domain)
MCP_LOG_LEVELerror, warn, info (default), debug

Precedence, highest first: CLI flags (--transport, --host, --port) → configuration file → environment → defaults. The token follows the same order: transport.authToken wins over MCP_AUTH_TOKEN.

What the endpoint actually does ​

Measured against the server started above (token demo-token-123, MCP_ALLOWED_HOSTS=mcp.internal.example):

RequestStatusBody
POST /mcp without Authorization401Unauthorized
GET /wrong-path404MCP endpoint is /mcp
POST /mcp initialize with the token200SSE event: message + the JSON-RPC result
POST /mcp tools/list with the token200SSE with all 10 tools and their schemas
initialize with Host: evil.example403{"jsonrpc":"2.0","error":{"code":-32000,"message":"Invalid Host: evil.example"},"id":null}
initialize with Origin: http://evil.example403{"jsonrpc":"2.0","error":{"code":-32000,"message":"Invalid Origin: evil.example"},"id":null}
initialize with Host: mcp.internal.example200allowed because of MCP_ALLOWED_HOSTS

A real successful handshake:

text
event: message
data: {"result":{"protocolVersion":"2025-06-18","capabilities":{"tools":{"listChanged":true},"resources":{"listChanged":true}},"serverInfo":{"name":"vue-codebase-mcp","version":"0.1.0"}},"jsonrpc":"2.0","id":1}

Two details that matter for infrastructure:

  • responses are SSE (content-type: text/event-stream) and the server already sends x-accel-buffering: no and cache-control: no-cache, no-transform, so nginx will not buffer them;
  • the handshake returns no mcp-session-id header — this transport is stateless, so a proxy does not need sticky sessions.

Check the endpoint with curl:

bash
curl -sS -X POST https://mcp.internal.example/mcp \
  -H "Authorization: Bearer demo-token-123" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'

Preparing the index on the host ​

Build the snapshot before starting the server, and in full mode — a light index has no resolved types, so prop controls and the API table stay nearly empty:

bash
npx vue-codebase-mcp index --root /srv/projects/ui-library --mode full --json

Exit codes let CI tell success from an empty build: 0 built and not empty, 1 bad arguments or a fatal error, 2 project root not found (the snapshot is not written), 3 index is empty.

A running serve does pick up edits on the fly: the file watcher re-reads a changed file with the syntactic parser and marks the entity stale. It does not, however, rewrite the snapshot on disk, and the exact (full) types of an edited file are lost until the next build. So a rebuild still belongs on a schedule or in CI — a cron entry or a systemd timer plus a service restart is the predictable option:

text
# /etc/cron.d/vue-codebase-mcp — rebuild every night at 03:10
10 3 * * * vue-mcp /usr/bin/npx vue-codebase-mcp index --root /srv/projects/ui-library --mode full >> /var/log/vue-mcp-index.log 2>&1

Snapshot format v1 → v2

The snapshot format was raised to v2 (the index mode is stored inside it). A v1 snapshot is ignored with a snapshotFormatMismatch warning and rebuilt — one slow start per project, no data loss. After upgrading the package, run index --mode full once per project instead of letting the first client wait.

systemd ​

Two units: a oneshot rebuild with a timer, and the server itself. Runs as an unprivileged user, no root.

ini
# /etc/systemd/system/vue-codebase-mcp.service
[Unit]
Description=vue-codebase-mcp (HTTP)
After=network-online.target

[Service]
User=vue-mcp
Group=vue-mcp
WorkingDirectory=/srv/projects/ui-library
Environment=MCP_AUTH_TOKEN=demo-token-123
Environment=MCP_ALLOWED_HOSTS=mcp.internal.example
Environment=MCP_LOG_LEVEL=info
ExecStart=/usr/bin/npx vue-codebase-mcp serve --root /srv/projects/ui-library \
  --transport http --host 127.0.0.1 --port 3333 --lang en
Restart=on-failure
RestartSec=3
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/srv/projects/ui-library/.vue-codebase-mcp.cache

[Install]
WantedBy=multi-user.target
ini
# /etc/systemd/system/vue-codebase-mcp-index.service
[Unit]
Description=Rebuild the vue-codebase-mcp index

[Service]
Type=oneshot
User=vue-mcp
Group=vue-mcp
ExecStart=/usr/bin/npx vue-codebase-mcp index --root /srv/projects/ui-library --mode full
ini
# /etc/systemd/system/vue-codebase-mcp-index.timer
[Unit]
Description=Nightly index rebuild

[Timer]
OnCalendar=*-*-* 03:10:00
Persistent=true

[Install]
WantedBy=timers.target
bash
sudo systemctl daemon-reload
sudo systemctl enable --now vue-codebase-mcp.service vue-codebase-mcp-index.timer
systemctl status vue-codebase-mcp.service

ReadWritePaths is the only directory the service needs to write: the project itself can stay read-only. These units were not started on a real machine while writing this page (the authoring environment is macOS) — treat them as a reviewed template and check journalctl -u vue-codebase-mcp on your first start.

Docker ​

dockerfile
# Dockerfile
FROM node:24-slim

RUN useradd --create-home --uid 1001 vue-mcp
WORKDIR /app

# The packages are installed globally: the container needs no server sources, only the project on a volume.
RUN npm install --global vue-codebase-mcp vue-codebase-view-mcp

USER vue-mcp
ENV MCP_TRANSPORT=http \
    MCP_PORT=3333 \
    MCP_LOG_LEVEL=info

EXPOSE 3333
# Entry point is the HTTP transport; the project and the snapshot arrive on volumes.
ENTRYPOINT ["vue-codebase-mcp", "serve", "--root", "/project"]
yaml
# compose.yaml
services:
  vue-codebase-mcp:
    build: .
    restart: unless-stopped
    ports:
      - "127.0.0.1:3333:3333" # not published externally: local reverse proxy only
    environment:
      MCP_AUTH_TOKEN: ${MCP_AUTH_TOKEN}
      MCP_ALLOWED_HOSTS: mcp.internal.example
    volumes:
      - /srv/projects/ui-library:/project:ro
      - index-cache:/project/.vue-codebase-mcp.cache

  index-rebuild:
    build: .
    entrypoint: ["vue-codebase-mcp", "index", "--root", "/project", "--mode", "full"]
    volumes:
      - /srv/projects/ui-library:/project:ro
      - index-cache:/project/.vue-codebase-mcp.cache

volumes:
  index-cache:

The project is mounted read-only; only the cache volume is writable. Publish the port on 127.0.0.1 and put a reverse proxy in front of it — see below. These files were not built here (Docker is not installed in the authoring environment); the flags and environment variables they use are the verified ones.

Reverse proxy and TLS ​

Bind the server to 127.0.0.1 and terminate TLS at the proxy. nginx:

nginx
server {
  listen 443 ssl;
  server_name mcp.internal.example;

  ssl_certificate     /etc/letsencrypt/live/mcp.internal.example/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/mcp.internal.example/privkey.pem;

  location /mcp {
    proxy_pass http://127.0.0.1:3333/mcp;
    proxy_http_version 1.1;

    # Authorization must reach the server: do not override it at the proxy.
    proxy_set_header Authorization $http_authorization;
    proxy_set_header Host $host;

    # Responses are SSE: disable buffering and raise the timeouts.
    proxy_buffering off;
    proxy_cache off;
    proxy_read_timeout 300s;
    proxy_send_timeout 300s;
  }
}

Caddy does the same in four lines, with automatic certificates:

text
mcp.internal.example {
  reverse_proxy /mcp 127.0.0.1:3333 {
    flush_interval -1
  }
}

Notes:

  • Host must be allowed. The server validates the Host header against localhost names, the configured transport.host, and MCP_ALLOWED_HOSTS. Behind a proxy that rewrites Host to the public domain, add that domain to MCP_ALLOWED_HOSTS — otherwise every request gets 403 Invalid Host.
  • Do not terminate the bearer token at the proxy. The server compares Authorization with transport.authToken itself; if the proxy consumes and drops the header, every request becomes 401.
  • Long operations. index --mode full is a CLI command, not an HTTP request, so proxy timeouts do not apply to it. Tool calls are fast (they read an in-memory index); the only slow HTTP path is a server started without a snapshot, which builds a light index at startup.
  • Internal network only. The indexer can serve source files. Keep the endpoint on a private network or a VPN, and require the token even there.

Security ​

  • Token. MCP_AUTH_TOKEN (or transport.authToken) turns on a strict Authorization: Bearer <token> check; anything else is 401. There is no user database and no rate limiting — it is one shared secret.
  • Host and Origin. Validated on every request; localhost names are always allowed, 0.0.0.0 is never treated as an allowed host. This is DNS-rebinding protection, not authentication.
  • Bind address. The default is 127.0.0.1. --host 0.0.0.0 publishes the server on every interface — only do that behind a proxy that enforces the token and TLS.
  • Source exposure. resources.exposeSourceCode defaults to true: file:// resources and the preview interface serve project sources. On a shared host, set it to false, or accept that any client with the token can read the code.

    What the flag closes

    With exposeSourceCode: false the server refuses file:// resources and both branches of get_source — by path and by entity name — answering [tools.sourceDisabled]. The index still exposes entity names, their API and the file paths (get_entity_details, get_project_overview), so treat the flag as "do not serve file contents", not as "hide the project structure". See Indexer tools.

  • Path guards. Reads cannot escape the project roots (.. and symlinks are rejected: [tools.pathOutsideRoots]). Never served: .env*, .npmrc, .git/, node_modules/, .ssh/, .aws/, private keys, files with secret/credentials in the name ([tools.deniedPath]). Extensions are limited by resources.allowedFileExtensions ([tools.extensionNotAllowed]); add patterns to resources.denyPaths to widen the block list.
  • Absolute paths. The preview HTTP API returns none (project.root was removed from the manifest). The indexer's get_project_overview answer and the index://overview resource do contain absolute paths of the host — harmless locally, worth knowing on a shared server.

Connecting clients to a remote server ​

Qwen Code — httpUrl plus headers, in .qwen/settings.json (or ~/.qwen/settings.json):

json
{
  "mcpServers": {
    "vue-codebase": {
      "httpUrl": "https://mcp.internal.example/mcp",
      "headers": { "Authorization": "Bearer demo-token-123" },
      "timeout": 15000
    }
  }
}

or from the command line:

bash
qwen mcp add --transport http vue-codebase https://mcp.internal.example/mcp \
  --header "Authorization: Bearer demo-token-123"

Cursor — .cursor/mcp.json in the project or a global one, with url and headers. Claude Desktop and other stdio-first clients need a local bridge (for example npx mcp-remote <url> --header "Authorization: Bearer …") or a local stdio server instead; check your client's documentation for the current shape.

Verify the connection the same way in any client: ask it to list the tools, or run the curl above. A working indexer answers with 10 tools; a working view server with 4.

Preview on a remote host ​

vue-codebase-view-mcp has no HTTP transport, and that is deliberate. Its preview command starts a Vite dev server that compiles and executes the target project's code and serves its sources — with no authentication of its own.

Recommended: run the preview locally, and reach a remote project through an SSH tunnel:

bash
# the indexer runs on the remote host over HTTP; you start the preview on your own machine
ssh -L 5299:localhost:5299 deploy@mcp.internal.example
npx vue-codebase-view-mcp preview --root /srv/projects/ui-library --port 5299 --no-open
# then open http://localhost:5299/__vue-view__/ locally

If you still expose it (--host 0.0.0.0 plus a proxy), know the risks: anyone who reaches the port can read every source file the server is allowed to serve and can make the host compile arbitrary project code. Put it behind an authenticating proxy (VPN, SSO, mTLS), bind it to an internal interface, and set resources.exposeSourceCode: false to hide sources from the interface. The remote scenario that is supported is a shared indexer over HTTP — that is what the rest of this page describes.

Next ​

MIT Licensed