Vite · Capability

Vite JavaScript API — Dev Server

Vite JavaScript API — Dev Server. 4 operations. Lead operation: Serve File System File. Self-contained Naftiko capability covering one Vite business surface.

Run with Naftiko ViteDev Server

What You Can Do

GET
Servefilesystemfile — Serve File System File
/v1/fs/{filepath}
GET
Getviteclient — Get Vite Client Script
/v1/vite/client
GET
Openineditor — Open File in Editor
/v1/open-in-editor
GET
Pingdevserver — Ping Dev Server
/v1/vite-ping

MCP Tools

serve-file-system-file

Serve File System File

read-only idempotent
get-vite-client-script

Get Vite Client Script

read-only idempotent
open-file-editor

Open File in Editor

read-only idempotent
ping-dev-server

Ping Dev Server

read-only idempotent

Capability Spec

javascript-dev-server.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Vite JavaScript API — Dev Server
  description: 'Vite JavaScript API — Dev Server. 4 operations. Lead operation: Serve File System File. Self-contained Naftiko
    capability covering one Vite business surface.'
  tags:
  - Vite
  - Dev Server
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    VITE_API_KEY: VITE_API_KEY
capability:
  consumes:
  - type: http
    namespace: javascript-dev-server
    baseUri: http://localhost:5173
    description: Vite JavaScript API — Dev Server business capability. Self-contained, no shared references.
    resources:
    - name: '@fs-filePath'
      path: /@fs/{filePath}
      operations:
      - name: servefilesystemfile
        method: GET
        description: Serve File System File
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: filePath
          in: path
          type: string
          description: Absolute file path on the host file system
          required: true
    - name: '@vite-client'
      path: /@vite/client
      operations:
      - name: getviteclient
        method: GET
        description: Get Vite Client Script
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: __open-in-editor
      path: /__open-in-editor
      operations:
      - name: openineditor
        method: GET
        description: Open File in Editor
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: file
          in: query
          type: string
          description: Relative path to the file to open
          required: true
        - name: line
          in: query
          type: integer
          description: Line number to open to
        - name: column
          in: query
          type: integer
          description: Column number to open to
    - name: __vite_ping
      path: /__vite_ping
      operations:
      - name: pingdevserver
        method: GET
        description: Ping Dev Server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: javascript-dev-server-rest
    port: 8080
    description: REST adapter for Vite JavaScript API — Dev Server. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/fs/{filepath}
      name: fs-filepath
      description: REST surface for @fs-filePath.
      operations:
      - method: GET
        name: servefilesystemfile
        description: Serve File System File
        call: javascript-dev-server.servefilesystemfile
        with:
          filePath: rest.filePath
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/vite/client
      name: vite-client
      description: REST surface for @vite-client.
      operations:
      - method: GET
        name: getviteclient
        description: Get Vite Client Script
        call: javascript-dev-server.getviteclient
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/open-in-editor
      name: open-in-editor
      description: REST surface for __open-in-editor.
      operations:
      - method: GET
        name: openineditor
        description: Open File in Editor
        call: javascript-dev-server.openineditor
        with:
          file: rest.file
          line: rest.line
          column: rest.column
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/vite-ping
      name: vite-ping
      description: REST surface for __vite_ping.
      operations:
      - method: GET
        name: pingdevserver
        description: Ping Dev Server
        call: javascript-dev-server.pingdevserver
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: javascript-dev-server-mcp
    port: 9090
    transport: http
    description: MCP adapter for Vite JavaScript API — Dev Server. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: serve-file-system-file
      description: Serve File System File
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: javascript-dev-server.servefilesystemfile
      with:
        filePath: tools.filePath
      outputParameters:
      - type: object
        mapping: $.
    - name: get-vite-client-script
      description: Get Vite Client Script
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: javascript-dev-server.getviteclient
      outputParameters:
      - type: object
        mapping: $.
    - name: open-file-editor
      description: Open File in Editor
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: javascript-dev-server.openineditor
      with:
        file: tools.file
        line: tools.line
        column: tools.column
      outputParameters:
      - type: object
        mapping: $.
    - name: ping-dev-server
      description: Ping Dev Server
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: javascript-dev-server.pingdevserver
      outputParameters:
      - type: object
        mapping: $.