@andrewkimjoseph/celina 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/andrewkimjoseph/celina/main/assets/logo.png" alt="Celina logo — yellow C with profile silhouette on black" width="160" />
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/logo-yellow.png">
4
+ <source media="(prefers-color-scheme: light)" srcset="./assets/logo-black.png">
5
+ <img src="./assets/logo-black.png" alt="Celina logo — C with profile silhouette" width="160">
6
+ </picture>
3
7
  </p>
4
8
 
5
9
  <h1 align="center">Celina — Celo MCP Server</h1>
@@ -17,81 +21,62 @@
17
21
  ## Install
18
22
 
19
23
  ```bash
20
- npm i @andrewkimjoseph/celina
24
+ npm i @andrewkimjoseph/celina@latest
21
25
  ```
22
26
 
23
27
  npm: [@andrewkimjoseph/celina](https://www.npmjs.com/package/@andrewkimjoseph/celina)
24
28
 
25
29
  ## Quick start
26
30
 
27
- Celina is not meant to be run manually in a terminal for normal use. Your MCP client (Cursor, Claude Desktop, LM Studio, etc.) spawns it as a child process and talks to it over stdio. Install the package, then add it to your MCP config (see [Cursor / Claude Desktop config](#cursor--claude-desktop-config)).
31
+ Celina is not meant to be run manually in a terminal for normal use. Your MCP client (Cursor, Claude Desktop, LM Studio, etc.) spawns it as a child process and talks to it over stdio.
28
32
 
29
- **From npm:**
33
+ Install from npm, then add Celina to your MCP config — see [MCP setup](#mcp-setup).
30
34
 
31
- ```bash
32
- npm i @andrewkimjoseph/celina
33
- ```
34
-
35
- **From source** (development):
36
-
37
- ```bash
38
- npm install
39
- npm run build
40
- npm start
41
- ```
42
-
43
- ## Deploy to Render
35
+ ## MCP setup
44
36
 
45
- This project includes a [Render Blueprint](render.yaml) for one-click deployment as a public Streamable HTTP MCP server.
37
+ Pick your client, install the package, paste the config, restart. Celina shows up as MCP tools your LLM can call.
46
38
 
47
- ### 1. Generate an RSA key pair
39
+ ### Local stdio (recommended)
48
40
 
49
- ```bash
50
- openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:2048
51
- openssl rsa -pubout -in private.pem -out public.pem
52
- ```
41
+ Install the package, then add Celina to your MCP config. Your client spawns `npx` and talks to Celina over stdio. Works in any stdio client (Cursor, Claude Desktop, LM Studio, Continue, MCP Inspector). Requires Node.js ≥ 20.
53
42
 
54
- ### 2. Deploy
55
-
56
- 1. Push this repo to GitHub
57
- 2. Render Dashboard → **New → Blueprint** → connect the repo
58
- 3. Set `WALLET_ENCRYPTION_PRIVATE_KEY` in the Render Environment tab (paste contents of `private.pem`)
59
- 4. (Optional) Add a custom domain in Render and set `ALLOWED_HOSTS` to that hostname (comma-separated if multiple)
60
- 5. Your MCP endpoint will be at your Render URL + `/mcp`
61
-
62
- > **Note:** Free Render services spin down after ~15 minutes of inactivity. Cold starts can take 30–60 seconds and may cause MCP client timeouts. Use a Starter plan for always-on hosting.
63
-
64
- ## Cursor / Claude Desktop config
65
-
66
- ### Cursor — remote (recommended)
43
+ 1. Run `npm i @andrewkimjoseph/celina` (optional but recommended — caches the package locally for faster MCP startup)
44
+ 2. Open your MCP config (e.g. `claude_desktop_config.json`, Cursor **Settings → MCP**) and merge the snippet below into `mcpServers`
45
+ 3. Restart the client
67
46
 
68
47
  ```json
69
48
  {
70
49
  "mcpServers": {
71
50
  "celina": {
72
- "type": "streamable-http",
73
- "url": "https://mcp.celina.andrewkimjoseph.com/mcp"
51
+ "type": "stdio",
52
+ "command": "npx",
53
+ "args": ["-y", "@andrewkimjoseph/celina"],
54
+ "env": {
55
+ "CELO_PRIVATE_KEY": "0x...",
56
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
57
+ }
74
58
  }
75
59
  }
76
60
  }
77
61
  ```
78
62
 
79
- > Custom domains must be listed in `ALLOWED_HOSTS` on the server. Render's default hostname (`RENDER_EXTERNAL_HOSTNAME`) is always allowed automatically.
63
+ Keep `CELO_PRIVATE_KEY` and `SELF_AGENT_PRIVATE_KEY` out of source control — they stay on your machine. Omit both for read-only chain queries.
80
64
 
81
- ### Claude Desktop — remote (free plan)
65
+ ### Claude Desktop
82
66
 
83
- Claude Desktop's `claude_desktop_config.json` only supports local stdio servers it does **not** accept `"type": "streamable-http"` with a `"url"`. Free-plan users should bridge the hosted server with [`mcp-remote`](https://github.com/geelen/mcp-remote). Install it once (`npm i -g mcp-remote`), then:
67
+ Use the same stdio config in `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`). Requires Node.js 20.
84
68
 
85
69
  ```json
86
70
  {
87
71
  "mcpServers": {
88
72
  "celina": {
89
- "command": "mcp-remote",
90
- "args": [
91
- "https://mcp.celina.andrewkimjoseph.com/mcp",
92
- "--transport",
93
- "http-only"
94
- ]
73
+ "type": "stdio",
74
+ "command": "npx",
75
+ "args": ["-y", "@andrewkimjoseph/celina"],
76
+ "env": {
77
+ "CELO_PRIVATE_KEY": "0x...",
78
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
79
+ }
95
80
  }
96
81
  }
97
82
  }
@@ -99,105 +84,50 @@ Claude Desktop's `claude_desktop_config.json` only supports local stdio servers
99
84
 
100
85
  Fully quit and relaunch Claude Desktop after editing the config (closing the window is not enough).
101
86
 
102
- > **Pro / Max / Team / Enterprise:** you can skip `mcp-remote` and add `https://mcp.celina.andrewkimjoseph.com/mcp` under **Settings → Integrations** instead.
103
-
104
- ### Local stdio (npm)
105
-
106
- After `npm i @andrewkimjoseph/celina`, point your MCP client at the installed entry file (use an absolute path):
107
-
108
- ```json
109
- {
110
- "mcpServers": {
111
- "celina": {
112
- "command": "node",
113
- "args": ["/absolute/path/to/node_modules/@andrewkimjoseph/celina/build/index.js"]
114
- }
115
- }
116
- }
117
- ```
118
-
119
87
  ### Local stdio (from source)
120
88
 
89
+ For development from a cloned repo, point at your local `build/index.js`:
90
+
121
91
  ```json
122
92
  {
123
93
  "mcpServers": {
124
94
  "celina": {
95
+ "type": "stdio",
125
96
  "command": "node",
126
- "args": ["/absolute/path/to/celina/build/index.js"]
97
+ "args": ["/absolute/path/to/celina/build/index.js"],
98
+ "env": {
99
+ "CELO_PRIVATE_KEY": "0x...",
100
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
101
+ }
127
102
  }
128
103
  }
129
104
  }
130
105
  ```
131
106
 
132
- For local write tools, add a funded mainnet wallet:
133
-
134
- ```json
135
- "env": {
136
- "CELO_PRIVATE_KEY": "0x..."
137
- }
138
- ```
139
-
140
- Never commit private keys. Use env vars only.
141
-
142
107
  ## Local LLM integration
143
108
 
144
109
  Celina is an **MCP tool server**. A local LLM stack needs an **MCP client** that can connect to Celina and pass tool definitions to a model that supports **function / tool calling**.
145
110
 
146
- Read-only tools (balances, blocks, GoodDollar status, etc.) work out of the box. For local write tools (`send_token`, `estimate_send`, `execute_mento_fx`), set `CELO_PRIVATE_KEY` in the MCP server `env` block (stdio) or use the [hosted encryption flow](#write-tools-hosted-mode) (HTTP).
111
+ Read-only tools (balances, blocks, GoodDollar status, etc.) work out of the box. For write tools (`send_token`, `estimate_send`, `execute_mento_fx`, Aave supply/withdraw), set `CELO_PRIVATE_KEY` in the MCP server `env` block.
147
112
 
148
113
  ### LM Studio (0.3.17+)
149
114
 
150
- LM Studio can host MCP servers directly via `mcp.json` (same format as Cursor).
115
+ LM Studio can host MCP servers directly via `mcp.json`. After `npm i @andrewkimjoseph/celina`:
151
116
 
152
117
  1. Open LM Studio → **Program** → **Install** → **Edit mcp.json**
153
- 2. Add Celina under `mcpServers`
118
+ 2. Add Celina under `mcpServers` (same JSON as [Local stdio (recommended)](#local-stdio-recommended))
154
119
  3. In **Server Settings**, enable **Allow calling servers from mcp.json**
155
120
  4. Chat with a tool-capable model (e.g. Qwen 2.5, Llama 3.1+)
156
121
 
157
- ```json
158
- {
159
- "mcpServers": {
160
- "celina": {
161
- "command": "node",
162
- "args": ["/absolute/path/to/node_modules/@andrewkimjoseph/celina/build/index.js"],
163
- "env": {
164
- "CELO_PRIVATE_KEY": "0x..."
165
- }
166
- }
167
- }
168
- }
169
- ```
170
-
171
- Omit `CELO_PRIVATE_KEY` if you only need read-only chain queries.
172
-
173
- ### Open WebUI + Ollama
174
-
175
- [Open WebUI](https://docs.openwebui.com/features/extensibility/mcp/) supports **streamable HTTP** MCP natively (not stdio).
176
-
177
- **Hosted Celina (easiest):** Admin Settings → External Tools → **Add Server** → Type: **MCP (Streamable HTTP)** → URL:
178
-
179
- ```
180
- https://mcp.celina.andrewkimjoseph.com/mcp
181
- ```
182
-
183
- **Local HTTP server:** run Celina in HTTP mode, then point Open WebUI at it:
184
-
185
- ```bash
186
- npm run build
187
- npm run start:http
188
- ```
189
-
190
- Add an External Tool with Type **MCP (Streamable HTTP)** and URL `http://localhost:10000/mcp`.
191
-
192
- For write tools over HTTP, set `WALLET_ENCRYPTION_PRIVATE_KEY` in `.env` (see [Deploy to Render](#deploy-to-render)) and use the [encrypt-key flow](#write-tools-hosted-mode).
193
-
194
- > If Open WebUI runs in Docker, use `http://host.docker.internal:10000/mcp` instead of `localhost`.
122
+ Omit both env vars for read-only chain queries.
195
123
 
196
124
  ### Continue (VS Code)
197
125
 
198
126
  [Continue](https://docs.continue.dev/customize/deep-dives/mcp) works with local models (Ollama, LM Studio, etc.) in **agent mode**.
199
127
 
200
- Create `.continue/mcpServers/celina.yaml` in your workspace:
128
+ 1. Run `npm i @andrewkimjoseph/celina`
129
+ 2. Create `.continue/mcpServers/celina.yaml` in your workspace
130
+ 3. Switch Continue to agent mode and prompt
201
131
 
202
132
  ```yaml
203
133
  name: Celina
@@ -206,14 +136,13 @@ schema: v1
206
136
  mcpServers:
207
137
  - name: celina
208
138
  type: stdio
209
- command: node
139
+ command: npx
210
140
  args:
211
- - "/absolute/path/to/node_modules/@andrewkimjoseph/celina/build/index.js"
212
- env:
213
- CELO_PRIVATE_KEY: "0x..."
141
+ - "-y"
142
+ - "@andrewkimjoseph/celina"
214
143
  ```
215
144
 
216
- Alternatively, copy the [local stdio JSON](#local-stdio-npm) from the Cursor section into `.continue/mcpServers/mcp.json` — Continue picks up Claude/Cursor-style configs automatically.
145
+ Alternatively, copy the [local stdio JSON](#local-stdio-recommended) into `.continue/mcpServers/mcp.json` — Continue picks up Claude/Cursor-style configs automatically.
217
146
 
218
147
  ### Test without an LLM
219
148
 
@@ -230,37 +159,18 @@ npm run inspect
230
159
  - Start with read-only prompts, e.g. *"What's the USDm balance of 0x…?"* or *"Is this wallet GoodDollar whitelisted?"*
231
160
  - Keep private keys in env vars only — never commit them to config files in git.
232
161
 
233
- ## Write tools (hosted mode)
162
+ ## Write tools
234
163
 
235
- Write tools (`send_token`, `estimate_send`, `execute_mento_fx`) accept an RSA-encrypted private key per request never plaintext.
236
-
237
- ### Flow
238
-
239
- 1. Fetch the server's public key:
240
- - MCP tool: `get_wallet_encryption_public_key`
241
- - HTTP: `GET https://mcp.celina.andrewkimjoseph.com/public-key`
242
- 2. Encrypt your key locally:
243
-
244
- ```bash
245
- npm run encrypt-key -- --url https://mcp.celina.andrewkimjoseph.com --key 0xYOUR_PRIVATE_KEY
246
- ```
247
-
248
- 3. Give the agent the encrypted blob (base64 output) along with your transaction details
249
- 4. The agent calls `send_token` with the `encryptedPrivateKey` parameter
250
-
251
- The server decrypts the key ephemerally to sign the transaction — it is not stored.
164
+ Set `CELO_PRIVATE_KEY` in your MCP server `env` block for on-chain writes (`send_token`, `estimate_send`, `execute_mento_fx`, `supply_aave_usdt`, `withdraw_aave_usdt`). Use `SELF_AGENT_PRIVATE_KEY` for Self agent signing tools. Keys stay on your machine and are not sent to Celina's authors.
252
165
 
253
166
  ## Environment variables
254
167
 
255
168
  | Variable | Default | Description |
256
169
  |----------|---------|-------------|
257
- | `CELO_RPC_URL_MAINNET` | Forno public RPC | Override mainnet RPC |
258
- | `CELO_PRIVATE_KEY` | — | Local stdio write tools only |
170
+ | `CELO_PRIVATE_KEY` | | Write tools (send, Mento FX, Aave) |
259
171
  | `SELF_AGENT_PRIVATE_KEY` | — | Self Agent ID signing/identity tools (separate from CELO wallet) |
260
172
  | `SELF_AGENT_API_BASE` | `https://app.ai.self.xyz` | Override Self Agent ID REST API base URL |
261
- | `WALLET_ENCRYPTION_PRIVATE_KEY` | | RSA private key PEM for HTTP write tools |
262
- | `ALLOWED_HOSTS` | — | Comma-separated custom hostnames (e.g. `mcp.celina.andrewkimjoseph.com`) |
263
- | `PORT` | `10000` | HTTP server port (set by Render) |
173
+ | `CELO_RPC_URL_MAINNET` | Forno public RPC | Override mainnet RPC |
264
174
 
265
175
  Copy `.env.example` to `.env` for local development.
266
176
 
@@ -292,11 +202,11 @@ Token symbols are resolved case-insensitively. Legacy aliases `cUSD` and `cEUR`
292
202
  | `get_celo_balances` | read | CELO + ERC-20 balances (default: CELO + USDm) |
293
203
  | `get_stablecoin_balances` | read | All registry stablecoins including GoodDollar |
294
204
  | `get_token_info` | read | Token metadata |
295
- | `get_wallet_encryption_public_key` | read | RSA public key for encrypting private keys |
296
- | `estimate_send` | read* | Gas estimate (*needs encrypted or env key) |
205
+ | `get_wallet_encryption_public_key` | read | RSA public key (HTTP/self-hosted mode only) |
206
+ | `estimate_send` | read* | Gas estimate (*needs `CELO_PRIVATE_KEY`) |
297
207
  | `send_token` | write | Send CELO or ERC-20 |
298
208
  | `get_mento_fx_quote` | read | Mento FX expected output (no wallet) |
299
- | `estimate_mento_fx` | read* | Mento FX gas estimate (*needs encrypted or env key) |
209
+ | `estimate_mento_fx` | read* | Mento FX gas estimate (*needs `CELO_PRIVATE_KEY`) |
300
210
  | `execute_mento_fx` | write | Execute Mento FX conversion |
301
211
  | `supply_aave_usdt` | write | Supply USDT to Aave V3 on Celo |
302
212
  | `withdraw_aave_usdt` | write | Withdraw USDT from Aave V3 on Celo |
@@ -362,8 +272,6 @@ No changes to `src/index.ts` or server bootstrap required.
362
272
  ```bash
363
273
  npm run dev # watch TypeScript
364
274
  npm run inspect # MCP Inspector UI (stdio)
365
- npm run start:http # HTTP server on PORT (default 10000)
366
- npm run encrypt-key # encrypt a private key for write tools
367
275
  ```
368
276
 
369
277
  ## License
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrewkimjoseph/celina",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Celina — MCP server for Celo mainnet. Balances, transfers, Self Agent ID, and chain reads for LLM agents.",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -14,6 +14,8 @@
14
14
  "build/",
15
15
  "bin/",
16
16
  "assets/logo.png",
17
+ "assets/logo-black.png",
18
+ "assets/logo-yellow.png",
17
19
  "README.md",
18
20
  "LICENSE"
19
21
  ],