-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_index.yaml
More file actions
127 lines (110 loc) · 2.63 KB
/
_index.yaml
File metadata and controls
127 lines (110 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: "1.0"
namespace: mcp
entries:
- name: definition
kind: ns.definition
readme: file://README.md
meta:
title: MCP Server
description: MCP (Model Context Protocol) server for Wippy — exposes tools to LLM clients over stdio and HTTP
- name: dependency.terminal
kind: ns.dependency
component: wippy/terminal
version: ">=0.3.0"
# Terminal host — bridges process to stdin/stdout
- name: terminal
kind: terminal.host
lifecycle:
auto_start: true
# --- Shared libraries ---
- name: jsonrpc
kind: library.lua
source: file://jsonrpc.lua
modules:
- json
- name: protocol
kind: library.lua
source: file://protocol.lua
imports:
jsonrpc: mcp:jsonrpc
- name: tools_lib
kind: library.lua
source: file://tools.lua
modules:
- registry
- funcs
imports:
jsonrpc: mcp:jsonrpc
- name: prompts_lib
kind: library.lua
source: file://prompts.lua
modules:
- registry
- funcs
imports:
jsonrpc: mcp:jsonrpc
- name: handler_lib
kind: library.lua
source: file://handler.lua
imports:
jsonrpc: mcp:jsonrpc
protocol: mcp:protocol
tools: mcp:tools_lib
prompts: mcp:prompts_lib
# --- Server process (stdio transport) ---
- name: server
kind: process.lua
source: file://server.lua
method: main
modules:
- io
imports:
jsonrpc: mcp:jsonrpc
handler: mcp:handler_lib
# --- HTTP transport (Streamable HTTP) ---
# Router requirement — host app provides their router
- name: router
kind: ns.requirement
meta:
description: HTTP router for MCP endpoints
default: app:api.public
targets:
- entry: mcp:sse_endpoint_post
path: meta.router
- entry: mcp:sse_endpoint_get
path: meta.router
- entry: mcp:sse_endpoint_delete
path: meta.router
# HTTP handler function
- name: sse_handler_fn
kind: function.lua
source: file://sse_handler.lua
method: handler
modules:
- http
- json
imports:
handler: mcp:handler_lib
jsonrpc: mcp:jsonrpc
# MCP HTTP endpoints (one per method, same path)
- name: sse_endpoint_post
kind: http.endpoint
meta:
router: app:api.public
method: POST
path: /mcp
func: mcp:sse_handler_fn
- name: sse_endpoint_get
kind: http.endpoint
meta:
router: app:api.public
method: GET
path: /mcp
func: mcp:sse_handler_fn
- name: sse_endpoint_delete
kind: http.endpoint
meta:
router: app:api.public
method: DELETE
path: /mcp
func: mcp:sse_handler_fn