Foursquare MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Foursquare MCP Servershow me my last 5 check-ins"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Foursquare MCP Server
Foursquare APIとの連携を提供するModel Context Protocol (MCP)サーバーです。MCPサーバーとしての動作に加え、CLIツールとしても使用できます。
必要な環境
Bun >= 1.0.0 または Node.js >= 18.0.0
Foursquare Developer アカウント
MCPクライアント(Claude Desktop等)※MCPサーバーとして使用する場合
Related MCP server: OpenFGA MCP Server
インストール
npm からインストール
npm install -g @upamune/foursquare-mcpbunx を使った実行(インストール不要)
bunx @upamune/foursquare-mcpリポジトリからの実行
git clone https://github.com/upamune/foursquare-mcp.git
cd foursquare-mcp
bun install
bun run buildCLIツールとしての使用
v0.2.0から、MCPサーバーを起動せずに直接CLIコマンドとして使用できるようになりました。
コマンドラインから直接実行
# 認証(初回のみ必要)
foursquare-mcp invoke authenticate --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET
# 認証状態を確認
foursquare-mcp invoke check-auth-status
# チェックインを取得
foursquare-mcp invoke get-user-checkins
# オプション付きでチェックインを取得
foursquare-mcp invoke get-user-checkins --limit 10 --sort oldestfirst
# JSON形式で出力
foursquare-mcp invoke get-user-checkins --json
# 特定の日時以降のチェックインを取得
foursquare-mcp invoke get-user-checkins --after 1735689600利用可能なCLIコマンド
invoke authenticate
Foursquare認証を行います。ブラウザが自動的に開き、ログイン後トークンが保存されます。
オプション:
--client-id <ID>: Foursquare CLIENT_ID--client-secret <SECRET>: Foursquare CLIENT_SECRET
invoke check-auth-status
保存されたトークンの有効性を確認します。
invoke get-user-checkins
チェックイン履歴を取得します。
オプション:
--limit <数値>: 取得件数(デフォルト: 50)--after <timestamp>: このUnixタイムスタンプ以降のチェックイン--sort <順序>: newestfirst または oldestfirst--json: JSON形式で出力
MCPサーバーとしての使用
Foursquare Developer設定
Foursquare Developer Portalでアカウントを作成
新しいアプリケーションを作成
OAuth設定でRedirect URIに
http://localhost:52847/callbackを追加CLIENT_IDとCLIENT_SECRETを取得
Claude Desktop設定
~/Library/Application Support/Claude/claude_desktop_config.jsonに以下を追加:
{
"mcpServers": {
"foursquare": {
"command": "bunx",
"args": ["@upamune/foursquare-mcp"],
"env": {
"FOURSQUARE_CLIENT_ID": "your_client_id",
"FOURSQUARE_CLIENT_SECRET": "your_client_secret"
}
}
}
}または、リポジトリをクローンした場合:
{
"mcpServers": {
"foursquare": {
"command": "bun",
"args": ["run", "/path/to/foursquare-mcp/index.ts"],
"env": {
"FOURSQUARE_CLIENT_ID": "your_client_id",
"FOURSQUARE_CLIENT_SECRET": "your_client_secret"
}
}
}
}MCPツール一覧
authenticate
初回利用時にFoursquare認証を行います。ブラウザが自動的に開き、ログイン後トークンが保存されます。
check-auth-status
保存されたトークンの有効性を確認します。
get-user-checkins
チェックイン履歴を取得します。
パラメータ:
limit: 取得件数(デフォルト: 50、最大: 100)afterTimestamp: 指定したUnixタイムスタンプ以降のチェックインのみ取得sort: ソート順("newestfirst" または "oldestfirst")
トークン管理
トークン保存場所
Linux:
~/.config/foursquare-mcp/token.jsonmacOS:
~/Library/Application Support/foursquare-mcp/token.jsonWindows:
%APPDATA%\foursquare-mcp\token.json
環境変数でのトークン指定
FOURSQUARE_ACCESS_TOKEN 環境変数を設定することで、保存されたトークンファイルより優先してアクセストークンを使用できます:
{
"mcpServers": {
"foursquare": {
"command": "bunx",
"args": ["@upamune/foursquare-mcp"],
"env": {
"FOURSQUARE_CLIENT_ID": "your_client_id",
"FOURSQUARE_CLIENT_SECRET": "your_client_secret",
"FOURSQUARE_ACCESS_TOKEN": "your_access_token"
}
}
}
}この機能は以下のような場合に便利です:
複数環境でトークンを共有したい場合
CI/CD環境での利用
トークンファイルの管理を避けたい場合
ライセンス
MIT License
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your Twitch streams, events, supporters, raids & rankings from an AI assistant via OAuth.
Manage cron/heartbeat checks, read pings and flips, pause/resume/delete on Healthchecks.io.
Query your trades, stats, and journal in EdgeLock and log new entries by chat. OAuth; free account.
Geolocate Me turns your phone into location context for any AI assistant. Install the iOS or Android app, connect once with OAuth, and your GPS is queryable in natural language. Ask where you are, where you parked, where you were yesterday at 3pm, or how long you were at the office — the assistant calls the tool and answers with a real street address. https://geolocateme.app
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables control of Spotify through natural language by searching the catalog, managing playback and devices, controlling playlists, and managing saved songs. Includes OAuth authentication and streamable HTTP transport for remote connectivity.10 npm79ISC
- AlicenseAqualityDmaintenanceEnables users to manage OpenFGA authorization models, stores, and relationship tuples through natural language. It supports permission checks, batch tuple operations, and the deployment of authorization models across different environments.10MIT
- AlicenseBqualityCmaintenanceEnables control of Fibaro Home Center devices, scenes, variables, and system administration through natural language.87 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables logging food into MyFitnessPal diary via natural language, supporting search, log, quick add, and diary retrieval.-