Skip to content

feat: MCP server with BYOK AI#81

Merged
hyldmo merged 14 commits intomainfrom
hyldmo/mcp-server-byok-ai
Apr 10, 2026
Merged

feat: MCP server with BYOK AI#81
hyldmo merged 14 commits intomainfrom
hyldmo/mcp-server-byok-ai

Conversation

@hyldmo
Copy link
Copy Markdown
Owner

@hyldmo hyldmo commented Apr 10, 2026

Summary

  • Expose tRPC API as an MCP server at POST /api/mcp using @modelcontextprotocol/sdk
  • Auto-generate MCP tool definitions from .meta({ description }) annotations on 29 tRPC procedures (recipes, ingredients, meal plans, workouts, dashboard, AI, settings)
  • Personal access tokens for auth (SHA-256 hashed, stored in D1 apiTokens table)
  • Settings UI with token management and copy-paste config snippets for Claude Desktop, Claude Code, and Cursor
  • Stateless mode (new server per request, no Durable Objects needed)

Test plan

  • Create a token in Settings > API Tokens
  • Copy the config snippet for your MCP client
  • Connect Claude Desktop/Code to the MCP endpoint
  • Verify tools are listed (recipe_list, ingredient_findOrCreate, etc.)
  • Test a tool call (e.g., list recipes, get workout templates)
  • Verify token auth rejects requests without/with invalid bearer token
  • Delete a token and verify it no longer authenticates

🤖 Generated with Claude Code

hyldmo and others added 14 commits April 10, 2026 12:28
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Learnings considered.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
ButtonGroup tabs for Claude Desktop, Claude Code, and Cursor with
copy-paste-ready config showing the endpoint URL and token placeholder.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix create button (add type="submit", Button defaults to "button")
- Move token creation above config snippet for clearer flow
- Auto-embed token into config snippet (single copy action)
- Move copy button out of overlay
- Fix Claude Code command (--header not -- --header)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions
Copy link
Copy Markdown

Preview deployment

URL https://hyldmo-mcp-server-byok-ai.macromaxxing.pages.dev
Branch hyldmo/mcp-server-byok-ai
Commit dad5731

@hyldmo hyldmo merged commit 18c6e86 into main Apr 10, 2026
3 checks passed
@hyldmo hyldmo deleted the hyldmo/mcp-server-byok-ai branch April 10, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant