b
Public
Likemcp-powerserver
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v12View latest version
A Model Context Protocol (MCP) server built on JSON-RPC 2.0 with 8 powerful open-source tools — no API keys required for most tools.
https://bnsalmhythm730--47d38190354611f193b642b51c65c3df.web.val.run
| # | Tool | Description | Data Source |
|---|---|---|---|
| 1 | web_search | Web search with snippets & URLs | DuckDuckGo (free) |
| 2 | calculator | Advanced math: trig, log, factorial, constants | Built-in |
| 3 | system_info | Memory, uptime, Deno version, platform | Deno runtime |
| 4 | currency_converter | Real-time exchange rates, 30+ currencies | frankfurter.app (free) |
| 5 | time_and_date | World clocks, date diff, timezone conversion | Built-in |
| 6 | fetch_url | Fetch raw HTML/JSON/text from any URL | Direct HTTP |
| 7 | weather | Current conditions + 7-day forecast | Open-Meteo (free) |
| 8 | unit_converter | Length, weight, temp, volume, area, speed, data | Built-in |
- Protocol: JSON-RPC 2.0
- MCP Version: 2024-11-05
- Transport: HTTP (POST /rpc or POST /)
- CORS: Fully open (
*)
| Method | Path | Description |
|---|---|---|
GET | / | Server info & tool list |
GET | /tools | Full tool schemas |
POST | /rpc | JSON-RPC 2.0 dispatcher |
POST | / | JSON-RPC 2.0 dispatcher (alias) |
POST /rpc { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "MyClient", "version": "1.0" } } }
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {} }
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "web_search", "arguments": { "query": "latest AI news", "max_results": 5 } } }
{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "calculator", "arguments": { "expression": "sqrt(144) + factorial(7) + sin(pi/2)" } } }
{ "jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": { "name": "currency_converter", "arguments": { "amount": 100, "from": "USD", "to": "EUR,GBP,JPY" } } }
{ "jsonrpc": "2.0", "id": 6, "method": "tools/call", "params": { "name": "weather", "arguments": { "location": "Tokyo", "include_forecast": true } } }
{ "jsonrpc": "2.0", "id": 7, "method": "tools/call", "params": { "name": "time_and_date", "arguments": { "action": "world_clocks" } } }
{ "jsonrpc": "2.0", "id": 8, "method": "tools/call", "params": { "name": "unit_converter", "arguments": { "value": 100, "from": "celsius", "to": "fahrenheit" } } }
{ "jsonrpc": "2.0", "id": 9, "method": "tools/call", "params": { "name": "fetch_url", "arguments": { "url": "https://api.github.com", "extract_text": false } } }
main.ts (HTTP handler + JSON-RPC dispatcher)
└── tools/
├── index.ts (tool registry + dispatcher)
├── search.ts (DuckDuckGo)
├── calculator.ts (safe math eval)
├── sysinfo.ts (Deno runtime info)
├── currency.ts (frankfurter.app)
├── datetime.ts (world clocks, diff)
├── fetchurl.ts (HTTP fetch + HTML strip)
├── weather.ts (Open-Meteo)
└── units.ts (7 unit categories)
- ✅ Strict JSON-RPC 2.0 (always includes
jsonrpc: "2.0"andid) - ✅ Batch request support
- ✅ Full CORS support
- ✅ MCP
initialize/tools/list/tools/callmethods - ✅ No API keys required (all free data sources)
- ✅ 15s timeout on external requests
- ✅ Detailed error responses with proper error codes