mcp-enuygun-fs

mcp-enuygun-fs

Enables searching for places and tourist activities using Foursquare and Amadeus APIs, integrated with Claude Desktop and OpenAI Agent SDK.

Category
访问服务器

README

🌍 Multi-API MCP Server

Bu proje, Foursquare Places API ve Amadeus Activities API'lerini kullanan gelişmiş bir Model Context Protocol (MCP) server'ıdır. Claude Desktop ve OpenAI Agent SDK ile entegre edilerek mekan arama, turistik aktivite bulma ve seyahat planlaması işlemlerini gerçekleştirebilirsiniz.

✨ Özellikler

🏢 Foursquare Places API

  • Mekan Arama: Belirtilen lokasyon yakınında mekanları arayın
  • Mekan Detayları: Belirli bir mekanın detaylı bilgilerini alın
  • Kategori Filtreleme: Restoran, kafe, müze gibi kategorilere göre filtreleyin
  • Mesafe Hesaplama: Konumunuza göre mesafe bilgisi

🎯 Amadeus Activities API

  • Turistik Aktiviteler: Şehirlerdeki müze, tur, etkinlik arama
  • Şehir Bazlı Arama: Belirli şehirlerdeki tüm aktiviteleri listeleyin
  • Fiyat Bilgisi: Aktivite fiyatları ve rezervasyon linkleri
  • Detaylı Açıklamalar: HTML temizlenmiş aktivite açıklamaları

🔗 Entegrasyon Seçenekleri

  • HTTP MCP Server: OpenAI Agent SDK ile entegrasyon
  • Stdio MCP Server: Claude Desktop ile direkt entegrasyon
  • REST API Endpoints: Direkt API erişimi
  • CORS Desteği: Web uygulamaları için

📸 Fotoğraf Özellikleri (Şimdilik Devre Dışı)

  • Foursquare Photos API (Credit tasarrufu için kapalı)
  • Bing Image Scraping (Yedekte tutuluyor)

🌐 Live Demo

🔗 Production Server: https://mcp-enuygun-fs.onrender.com

  • Health Check: https://mcp-enuygun-fs.onrender.com/health
  • MCP Endpoint: https://mcp-enuygun-fs.onrender.com/mcp
  • API Endpoints: https://mcp-enuygun-fs.onrender.com/api/

🚀 Kurulum

1. Proje Kurulumu

cd /Users/emirarslan/Desktop/mcp
npm install

2. Environment Variables

.env dosyası oluşturun:

cp .env.example .env

.env dosyasını düzenleyin:

FOURSQUARE_API_KEY="YOUR_FOURSQUARE_API_KEY"
AMADEUS_API_KEY="YOUR_AMADEUS_API_KEY"
AMADEUS_API_SECRET="YOUR_AMADEUS_API_SECRET"
NOMINATIM_USER_AGENT="mcp-server/1.0 (contact: your-email@example.com)"

3. API Key'lerini Alın

🎮 Kullanım

HTTP MCP Server (Önerilen)

npm run http
# Server: http://localhost:3000
# MCP Endpoint: http://localhost:3000/mcp
# Health Check: http://localhost:3000/health

Stdio MCP Server (Claude Desktop)

npm start

Development Mode

npm run http-dev  # HTTP server with auto-reload
npm run dev       # Stdio server with auto-reload

🧪 Test Komutları

# Temel API testleri
npm run test-api      # Foursquare API testi
npm run test-simple   # Kapsamlı HTTP MCP testi

# Özel testler
npm run test-photos   # Foursquare Photos testi (devre dışı)
npm run test-bing     # Bing Image testi (devre dışı)

# MCP Protocol testleri
npm run test-mcp      # Stdio MCP testi
npm run test-http     # HTTP MCP testi
npm run test-agent    # OpenAI Agent SDK testi

🔧 Claude Desktop Entegrasyonu

claude_desktop_config.json dosyasına ekleyin:

{
  "mcpServers": {
    "foursquare-places": {
      "command": "node",
      "args": ["/Users/emirarslan/Desktop/mcp/server.js"],
      "env": {
        "FOURSQUARE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

🤖 OpenAI Agent SDK Entegrasyonu

import { Agent, MCPServerStreamableHttp } from '@openai/agents';

// Local development
const mcpServer = new MCPServerStreamableHttp({
  url: 'http://localhost:3000/mcp',
  name: 'Multi-API Travel Server',
});

// Production (Live server)
const mcpServerProd = new MCPServerStreamableHttp({
  url: 'https://mcp-enuygun-fs.onrender.com/mcp',
  name: 'Multi-API Travel Server (Production)',
});

const agent = new Agent({
  name: 'Travel Assistant',
  instructions: 'Use Foursquare and Amadeus APIs for travel planning.',
  mcpServers: [mcpServerProd], // Use mcpServer for local development
});

🛠️ Available Tools

Foursquare Tools

  • search_places: Mekan arama

    {
      "near": "Istanbul Kadıköy",
      "query": "cafe",
      "limit": 10,
      "categories": "13065" // Optional
    }
    
  • get_place_details: Mekan detayları

    {
      "fsq_place_id": "4eaec357b8f765aba1e03d9e"
    }
    

Amadeus Tools

  • search_activities: Aktivite arama

    {
      "city": "Istanbul",
      "type": "museum",
      "limit": 10
    }
    
  • get_city_activities: Şehir aktiviteleri

    {
      "city": "Cappadocia",
      "limit": 20
    }
    

🌐 REST API Endpoints

Foursquare Endpoints

# Local
GET http://localhost:3000/api/search?near=Istanbul&query=cafe&limit=5
GET http://localhost:3000/api/place/:fsq_place_id
GET http://localhost:3000/api/photos/:fsq_place_id?limit=10

# Production
GET https://mcp-enuygun-fs.onrender.com/api/search?near=Istanbul&query=cafe&limit=5
GET https://mcp-enuygun-fs.onrender.com/api/place/:fsq_place_id
GET https://mcp-enuygun-fs.onrender.com/api/photos/:fsq_place_id?limit=10

Amadeus Endpoints

# Local
GET http://localhost:3000/api/activities?city=Istanbul&type=museum&limit=5

# Production
GET https://mcp-enuygun-fs.onrender.com/api/activities?city=Istanbul&type=museum&limit=5

System Endpoints

# Local
GET http://localhost:3000/health           # Health check
POST http://localhost:3000/mcp            # MCP protocol endpoint

# Production
GET https://mcp-enuygun-fs.onrender.com/health           # Health check
POST https://mcp-enuygun-fs.onrender.com/mcp            # MCP protocol endpoint

📸 Fotoğraf Özelliklerini Aktifleştirme

Foursquare Photos API'yi Açmak İçin:

  1. http-server.js dosyasında şu satırları bulun:

    // === FOURSQUARE PHOTOS API (DISABLED) ===
    // Uncomment the methods below to re-enable Foursquare Photos API
    /*
    
  2. /* ve */ işaretlerini kaldırın

  3. Bu satırı aktifleştirin:

    // formattedResults = await this.enhanceWithFoursquarePhotos(formattedResults);
    
  4. Bu satırı değiştirin:

    `   📸 Photo feature temporarily disabled\n` +
    // Şu hale getirin:
    `   📸 ${place.foursquarePhoto || 'No photo available'}\n` +
    

Bing Image Scraping'i Açmak İçin:

  1. http-server.js dosyasında şu bölümü bulun:

    // === BING IMAGE SCRAPING METHODS (DISABLED) ===
    /*
    
  2. /* ve */ işaretlerini kaldırın

  3. searchPlaces method'unda şu satırı aktifleştirin:

    // formattedResults = await this.enhanceWithImages(formattedResults, (place) => {
    //   return `${place.name} ${near}`;
    // });
    

🚨 Sorun Giderme

Yaygın Hatalar

  1. Server çalışmıyor: Node.js sürümünüzün 18+ olduğunu kontrol edin
  2. API hataları: API anahtarlarınızın geçerli olduğunu kontrol edin
  3. 429 Hatası: API credit'iniz bitmiş olabilir - billing sayfasından kontrol edin
  4. Port çakışması: PORT=3001 npm run http ile farklı port kullanın
  5. CORS hataları: Server'ın CORS middleware'i aktif olduğunu kontrol edin

Debug Modları

# Detaylı loglar için
DEBUG=* npm run http

# Sadece API logları
DEBUG=api npm run http

API Limitleri

  • Foursquare: Günlük 1000 istek (Free tier)
  • Amadeus: Aylık 1000 istek (Test environment)
  • Nominatim: Saniyede 1 istek (Rate limiting)

📁 Proje Yapısı

mcp/
├── server.js                 # Stdio MCP server
├── http-server.js           # HTTP MCP server (Ana dosya)
├── test-api.js              # API testleri
├── test-simple.js           # Kapsamlı testler
├── test-foursquare-photos.js # Fotoğraf testleri
├── test-bing-images.js      # Bing image testleri
├── claude_desktop_config.json # Claude Desktop config
├── .env.example             # Environment variables template
├── package.json             # Dependencies ve scripts
└── README.md               # Bu dosya

🔄 Deployment

Railway

railway login
railway init
railway deploy

Render

  1. GitHub repo'yu bağlayın
  2. Build command: npm install
  3. Start command: npm start
  4. Environment variables'ları ekleyin

ngrok (Local testing)

ngrok http 3000
# Public URL: https://xxx.ngrok-free.dev/mcp

🤝 Katkıda Bulunma

  1. Fork edin
  2. Feature branch oluşturun (git checkout -b feature/amazing-feature)
  3. Commit edin (git commit -m 'Add amazing feature')
  4. Push edin (git push origin feature/amazing-feature)
  5. Pull Request açın

📄 Lisans

MIT License - Detaylar için LICENSE dosyasına bakın.

🙏 Teşekkürler


🚀 Happy Coding! Bu server ile seyahat planlaması artık çok daha kolay!

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选