You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update CLAUDE.md with ValTown context and fix repository URLs (#2)
* feat: add remote HTTP transport for ValTown deployment
- Modify registerTools() to accept excludeCli parameter
- Update config.ts for remote mode with header-based authentication
- Create index.ts HTTP entry point with streamable transport
- Remove backend directory and setup ValTown project structure
- Add .vtignore to exclude local files from deployment
- Update Config type to support null apiToken for remote mode
* feat: complete remote HTTP MCP server implementation
- Implement HTTP transport with JSON-RPC protocol handling
- Add missing CLI utility functions as placeholders for remote mode
- Fix transport interface and MCP server integration
- Support initialize, tools/list, tools/call, prompts/list, prompts/get methods
- Add proper CORS headers and error handling
- Complete all planned phases for ValTown deployment
* fix: update CLI function calls to match interface signatures
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate from deno.json import map to direct npm imports
- Remove import map from deno.json to support ValTown deployment
- Update all TypeScript files to use direct npm imports (npm:zod, npm:@modelcontextprotocol/sdk)
- Maintains compatibility with both CLI and ValTown environments
- All tools now use direct imports instead of import map resolution
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add GET endpoint for MCP server info
- Add GET / endpoint that returns server information
- Include server name, version, description, and available endpoints
- Update CORS to allow GET requests
- Show 'Configuration endpoint coming soon' message
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: use native Response for GET endpoint
- Replace c.json() with new Response() for better ValTown compatibility
- Manually set Content-Type and CORS headers
- Fix 'Return value from serve handler must be a response' error
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: export app.fetch for ValTown compatibility
- Change from 'export default app' to 'export default app.fetch'
- Fixes 'Return value from serve handler must be a response' error
- GET endpoint now working correctly and returning server info JSON
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: complete import map migration and HTTP endpoint
- Remove unused parameter warning in index.http.ts
- Add debug logging for request methods
- Update .vtignore to include prompts directory for deployment
- Complete migration from deno.json import map to direct npm imports
- All builds passing and HTTP endpoint working correctly
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: move catch-all handler after specific routes
- Move app.all('/*') handler to end of file
- Ensures GET and POST handlers are matched before catch-all
- Fixes HTTP 405 error for MCP POST requests
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: remove catch-all route causing 405 errors for POST requests
The catch-all app.all("/*") route was intercepting POST requests before
they could reach the specific POST handler, causing HTTP 405 errors.
Removed the unnecessary catch-all as Hono automatically returns 404 for
undefined routes and CORS middleware handles OPTIONS.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: update CLAUDE.md with ValTown context and fix repository URLs
- Add proper CLAUDE.md header for Claude Code guidance
- Include ValTown platform explanation for developers
- Document dual deployment architecture (local vs remote)
- Fix placeholder repository URLs in README.md and index.http.ts
- Add remote server hosting information
- Update CHANGELOG.md with documentation improvements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: address security vulnerabilities in HTTP MCP server
- Remove API token logging to prevent credential exposure
- Add proper JSON parsing error handling with standard JSON-RPC error codes
- Sanitize error responses to prevent information leakage
- Update changelog with security fixes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,43 @@
1
-
# ValTown MCP Server Guidelines
1
+
# CLAUDE.md
2
+
3
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## About ValTown
6
+
7
+
ValTown is a serverless platform for running TypeScript/JavaScript code in the cloud. Key concepts for developers:
8
+
9
+
-**Vals**: Code snippets that can be HTTP endpoints, scheduled functions, or scripts
10
+
-**HTTP Vals**: Functions that handle HTTP requests (similar to serverless functions)
11
+
-**Interval Vals**: Functions that run on a schedule (like cron jobs)
12
+
-**Script Vals**: One-time or manually triggered functions
13
+
-**Email Vals**: Functions that handle incoming emails
14
+
-**API Integration**: Full REST API for programmatic access to create/update/delete vals
15
+
-**Remote Execution**: Code runs in ValTown's sandboxed environment with built-in npm package support
16
+
17
+
## Architecture Overview
18
+
19
+
This is a Model Context Protocol (MCP) server that provides AI assistants with access to ValTown's platform. The codebase supports two deployment modes:
20
+
21
+
1.**Local Binary Mode** (`mod.ts`): Runs as a local MCP server using stdio transport
22
+
2.**Remote HTTP Mode** (`index.http.ts`): Deployed on ValTown itself as an HTTP endpoint, accessible via streamable HTTP transport
23
+
24
+
The server is hosted remotely on ValTown at: `https://prashamtrivedi-valtown-mcp-server.val.run/mcp`
25
+
26
+
Key files:
27
+
-`mod.ts`: Local stdio MCP server entry point
28
+
-`index.http.ts`: Remote HTTP MCP server entry point (deployed on ValTown)
29
+
-`registerTools.ts`: Tool registration with CLI exclusion support for remote deployment
30
+
-`config.ts`: Configuration loading with remote/local mode support
0 commit comments