food402 1.0.2 → 1.0.4-beta.1

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,7 @@
1
1
  # Food402 MCP Server
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/food402.svg)](https://www.npmjs.com/package/food402)
4
+
3
5
  An MCP (Model Context Protocol) server that enables AI assistants to order food from TGO Yemek. Simply chat with your AI assistant to browse restaurants, build your order, and complete checkout.
4
6
 
5
7
  ## Installation
@@ -23,6 +25,31 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
23
25
 
24
26
  Replace `your-email@example.com` and `your-password` with your TGO Yemek credentials.
25
27
 
28
+ ## Local Installation (Claude Code)
29
+
30
+ For project-specific installation with Claude Code:
31
+
32
+ ```bash
33
+ npm install food402
34
+ ```
35
+
36
+ This automatically adds `food402` to your `.mcp.json`. Open the file and update your credentials:
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "food402": {
42
+ "command": "node",
43
+ "args": ["./node_modules/food402/dist/index.js"],
44
+ "env": {
45
+ "TGO_EMAIL": "your-email@example.com",
46
+ "TGO_PASSWORD": "your-password"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
26
53
  ## Prerequisites
27
54
 
28
55
  ### Account Setup Required
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, writeFileSync, existsSync } from 'fs';
3
+ import { join } from 'path';
4
+ // Find project root (where npm install was run)
5
+ const projectRoot = process.env.INIT_CWD || process.cwd();
6
+ const mcpJsonPath = join(projectRoot, '.mcp.json');
7
+ const food402Config = {
8
+ command: "node",
9
+ args: ["./node_modules/food402/dist/index.js"],
10
+ env: {
11
+ TGO_EMAIL: "your-email@example.com",
12
+ TGO_PASSWORD: "your-password"
13
+ }
14
+ };
15
+ let config = { mcpServers: {} };
16
+ if (existsSync(mcpJsonPath)) {
17
+ try {
18
+ config = JSON.parse(readFileSync(mcpJsonPath, 'utf-8'));
19
+ if (!config.mcpServers)
20
+ config.mcpServers = {};
21
+ }
22
+ catch {
23
+ // Invalid JSON, start fresh
24
+ }
25
+ }
26
+ config.mcpServers.food402 = food402Config;
27
+ writeFileSync(mcpJsonPath, JSON.stringify(config, null, 2) + '\n');
28
+ console.log('✓ Added food402 to .mcp.json');
29
+ console.log('→ Update TGO_EMAIL and TGO_PASSWORD in .mcp.json with your credentials');
@@ -0,0 +1,23 @@
1
+ import type { AddressesResponse, RestaurantsResponse, RestaurantMenuResponse, ProductRecommendationsResponse, ProductDetailsResponse, AddToBasketRequest, AddToBasketResponse, SetShippingAddressRequest, GetBasketResponse, SearchRestaurantsResponse, CitiesResponse, DistrictsResponse, NeighborhoodsResponse, AddAddressRequest, AddAddressResponse, SavedCardsResponse, CheckoutReadyResponse, PlaceOrderResponse, CustomerNoteRequest, OrdersResponse, OrderDetail } from "./types.js";
2
+ export declare function getAddresses(token: string): Promise<AddressesResponse>;
3
+ export declare function getRestaurants(token: string, latitude: string, longitude: string, page?: number): Promise<RestaurantsResponse>;
4
+ export declare function getRestaurantMenu(token: string, restaurantId: number, latitude: string, longitude: string): Promise<RestaurantMenuResponse>;
5
+ export declare function getProductRecommendations(token: string, restaurantId: number, productIds: number[]): Promise<ProductRecommendationsResponse>;
6
+ export declare function getProductDetails(token: string, restaurantId: number, productId: number, latitude: string, longitude: string): Promise<ProductDetailsResponse>;
7
+ export declare function setShippingAddress(token: string, request: SetShippingAddressRequest): Promise<void>;
8
+ export declare function addToBasket(token: string, request: AddToBasketRequest): Promise<AddToBasketResponse>;
9
+ export declare function getBasket(token: string): Promise<GetBasketResponse>;
10
+ export declare function removeFromBasket(token: string, itemId: string): Promise<GetBasketResponse>;
11
+ export declare function clearBasket(token: string): Promise<void>;
12
+ export declare function getCities(token: string): Promise<CitiesResponse>;
13
+ export declare function getDistricts(token: string, cityId: number): Promise<DistrictsResponse>;
14
+ export declare function getNeighborhoods(token: string, districtId: number): Promise<NeighborhoodsResponse>;
15
+ export declare function addAddress(token: string, request: AddAddressRequest): Promise<AddAddressResponse>;
16
+ export declare function updateCustomerNote(token: string, request: CustomerNoteRequest): Promise<void>;
17
+ export declare function getSavedCards(token: string): Promise<SavedCardsResponse>;
18
+ export declare function getCheckoutReady(token: string): Promise<CheckoutReadyResponse>;
19
+ export declare function placeOrder(token: string, cardId: number): Promise<PlaceOrderResponse>;
20
+ export declare function getOrders(token: string, page?: number): Promise<OrdersResponse>;
21
+ export declare function getOrderDetail(token: string, orderId: string): Promise<OrderDetail>;
22
+ export declare function searchRestaurants(token: string, searchQuery: string, latitude: string, longitude: string, page?: number): Promise<SearchRestaurantsResponse>;
23
+ export * from "./types.js";