-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Expand file tree
/
Copy pathroute.ts
More file actions
160 lines (153 loc) · 3.88 KB
/
route.ts
File metadata and controls
160 lines (153 loc) · 3.88 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/**
* GET /api/mcp/info
* Metadata endpoint for the Eliza Cloud MCP server.
* Returns information about available tools, pricing, and features.
* This endpoint does not require authentication.
*/
import { Hono } from "hono";
import type { AppEnv } from "@/types/cloud-worker-env";
const tools = [
{
name: "check_credits",
description: "Check your credit balance and recent transactions",
category: "billing",
},
{
name: "get_recent_usage",
description: "Get recent API usage statistics",
category: "billing",
},
{
name: "list_credit_transactions",
description: "List credit transaction history",
category: "billing",
},
{
name: "generate_text",
description: "Generate text using AI models",
category: "generation",
},
{
name: "generate_image",
description: "Generate images using AI models",
category: "generation",
},
{
name: "generate_embeddings",
description: "Generate text embeddings",
category: "generation",
},
{
name: "search_web",
description: "Search the web with hosted Google-grounded Gemini search",
category: "tools",
},
{
name: "extract_page",
description:
"Extract page content through the hosted Firecrawl extract API",
category: "tools",
},
{
name: "browser_session",
description: "Create, inspect, and control hosted browser sessions",
category: "tools",
},
{
name: "save_memory",
description: "Save a memory for later retrieval",
category: "memory",
},
{
name: "retrieve_memories",
description: "Retrieve relevant memories",
category: "memory",
},
{
name: "delete_memory",
description: "Delete a specific memory",
category: "memory",
},
{
name: "create_conversation",
description: "Create a new conversation",
category: "conversations",
},
{
name: "get_conversation_context",
description: "Get context from a conversation",
category: "conversations",
},
{
name: "search_conversations",
description: "Search through conversations",
category: "conversations",
},
{
name: "list_agents",
description: "List available agents",
category: "agents",
},
{
name: "chat_with_agent",
description: "Chat with a specific agent",
category: "agents",
},
{
name: "create_agent",
description: "Create a new agent",
category: "agents",
},
{
name: "list_models",
description: "List available AI models",
category: "models",
},
{
name: "text_to_speech",
description: "Convert text to speech audio",
category: "audio",
},
{
name: "list_voices",
description: "List available voices for TTS",
category: "audio",
},
] as const;
const categories = [...new Set(tools.map((tool) => tool.category))];
const app = new Hono<AppEnv>();
app.get("/", (c) =>
c.json({
name: "Eliza Cloud MCP",
version: "1.0.0",
description:
"Full access to Eliza Cloud features including credits management, AI generation, hosted search and browser tools, conversation management, agent operations, and more.",
transport: ["streamable-http"],
endpoint: "/api/mcp",
authRequired: true,
tools,
toolCount: tools.length,
categories,
pricing: {
type: "credits",
description: "Uses your organization's credit balance",
rates: {
generate_text: "Varies by model and tokens",
generate_image: "Fixed cost per image",
search_web: "Usage-based credits",
extract_page: "Usage-based credits",
browser_session: "Usage-based credits",
save_memory: "0.0001 credits",
retrieve_memories: "0.0001 - 0.001 credits",
},
},
authentication: {
type: "Bearer",
header: "Authorization",
description:
"Requires API key in Authorization header: Bearer YOUR_API_KEY",
},
status: "live",
}),
);
export default app;