MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / mcp

Function mcp

apps/host-selfhost/src/mcp/mcp.test.ts:34–46  ·  view source on GitHub ↗
(token: string, body: unknown, sessionId?: string)

Source from the content-addressed store, hash-verified

32};
33
34const mcp = (token: string, body: unknown, sessionId?: string) =>
35 handler(
36 new Request(`${BASE}/mcp`, {
37 method: "POST",
38 headers: {
39 authorization: `Bearer ${token}`,
40 "content-type": "application/json",
41 accept: "application/json, text/event-stream",
42 ...(sessionId ? { "mcp-session-id": sessionId } : {}),
43 },
44 body: JSON.stringify(body),
45 }),
46 );
47
48const initSession = async (token: string): Promise<string> => {
49 const res = await mcp(token, {

Callers 3

initSessionFunction · 0.70
mcp.test.tsFile · 0.70
makeAuthOptionsFunction · 0.50

Calls 1

handlerFunction · 0.50

Tested by

no test coverage detected