Gosar
Gosar MCP サーバー
Claude がユーザーに代わって Gosar API を呼び出せるようにする MCP サーバーで、Gosar の OAuth 2.0 + PKCE フローで認証されます。
これはブリッジとして機能します:
Claude(MCP クライアント)に対しては、完全な OAuth 認可サーバーのように動作します — 動的クライアント登録を処理し、独自の短期トークンを発行します。
Gosar に対しては、Gosar の統合ガイドに記載されている実際の Authorization Code + PKCE 交換を実行する、単一の事前登録済み OAuth クライアント(公開、PKCE のみ)です。
前提条件
Python 3.11+
Gosar チームに登録された Gosar OAuth クライアント(統合ガイドの「What we need from you」を参照)—
client_idと承認済みリダイレクト URI が必要です。実際の Gosar API に対してテストする場合は ngrok(または類似のもの)— Gosar のリダイレクト URI は HTTPS で完全に一致する必要があり、Claude もリモート MCP サーバーに接続するために HTTPS URL を必要とします。
Related MCP server: Strava MCP Server
1. 依存関係のインストール
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt2. .env の設定
取得した値をプロジェクトルートの .env にコピーします:
# Real values from the Gosar team
GOSAR_API_BASE_URL=https://api.gosar.example
GOSAR_CLIENT_ID=your-registered-client-id
GOSAR_SCOPES=applications.read applications.write
# Your server's own public HTTPS URL (e.g. your ngrok URL). Gosar's registered
# redirect_uri must be exactly this + GOSAR_REDIRECT_PATH.
MCP_PUBLIC_BASE_URL=https://your-tunnel.ngrok-free.app
GOSAR_REDIRECT_PATH=/gosar/callback
MCP_HOST=0.0.0.0
MCP_PORT=8000
# Generate once and keep stable — see below
JWT_SIGNING_KEY=署名キーを生成します(Gosar はシークレットのない公開クライアントであるため、自動的に導出できません — 必須です):
python -c "import secrets; print(secrets.token_urlsafe(32))"出力を JWT_SIGNING_KEY に貼り付けます。再起動後も同じ値を維持してください。そうしないと、接続中のすべてのユーザーがログアウトされます。
3. サーバーを HTTPS で公開する(実際の Gosar テスト用)
Claude と Gosar はどちらも HTTPS を必要とします。別のターミナルで:
ngrok http 8000https://...ngrok-free.app URL を .env の MCP_PUBLIC_BASE_URL にコピーし、{MCP_PUBLIC_BASE_URL}/gosar/callback を登録済みリダイレクト URI として Gosar チームに送信します。
4. サーバーの実行
source .venv/bin/activate
python main.py次のように表示されるはずです:
Starting MCP server 'Gosar' with transport 'http' on http://0.0.0.0:8000/mcp
Uvicorn running on http://0.0.0.0:8000コード変更時の自動リロード
python main.py はリロードされません — mcp.run() はブロックし、独自の uvicorn プロセスを所有するため、ファイル監視リローダーに渡すことはできません。開発時は、代わりに gosar_mcp/asgi.py の ASGI アプリを uvicorn で直接実行してください:
uvicorn gosar_mcp.asgi:app --reload --reload-include ".env" --host 0.0.0.0 --port 8000--reloadは.pyファイルが変更されるたびにワーカープロセスを再起動します。--reload-include ".env"は.envを編集したときにも再起動します(uvicorn はデフォルトで Python ファイルのみを監視し、環境変数はプロセス起動時に一度だけ読み取られるため、このフラグがないと.envの編集には手動再起動が必要です)。ポートを ngrok トンネルが指すものと同期させてください。
5. OAuth 配線の健全性チェック
サーバーが実行されている状態で、ディスカバリメタデータが提供されていることを確認します:
curl -s http://127.0.0.1:8000/.well-known/oauth-authorization-server | python3 -m json.toolscopes_supported に applications.read/applications.write が含まれ、PKCE メソッドとして S256 のみが含まれているはずです。
6. Claude に接続する
Claude のコネクタ設定で、次の場所を指すリモート MCP サーバーを追加します:
https://your-tunnel.ngrok-free.app/mcpClaude はこのサーバーに対して OAuth クライアントとして自己登録し、ユーザーを同意画面にリダイレクトし、その後 Gosar の実際の Google サインイン + 同意画面を経由して、アクティブな接続でここに戻ってきます。Claude に whoami ツールを呼び出して、期待どおりの Gosar アカウントとして認証されていることを確認させてください。
注記
トークンストレージ(クライアント登録 + 暗号化されたアップストリーム Gosar トークン)は、デフォルトで OS に適した暗号化ファイルストアをディスク上に使用します — ローカル開発には追加設定は不要です。本番環境で別のバックエンドを指定する場所については
gosar_mcp/auth.pyを参照してください。gosar_mcp/tools.pyの/applicationsエンドポイントパスはプレースホルダーです — 統合ガイドでは OAuth レイヤーのみが指定されており、Applications REST API の形状は指定されていません。実際のパス/ペイロードを Gosar チームに確認し、そこで調整してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop and other MCP clients to interact with any OAuth2-authenticated OpenAPI-based API through automatic tool generation from OpenAPI specifications, with built-in token management and authentication handling.83MIT
- FlicenseBqualityDmaintenanceConnects Claude or any MCP client to the Strava API v3, enabling access to fitness data such as activities, athletes, clubs, segments, routes, and streams.37
- FlicenseNot gradedqualityBmaintenanceEnables Claude.ai to connect to a Hermes MCP server via OAuth 2.1 authorization code flow with PKCE, acting as a reverse proxy and single-user authorization gateway.
- AlicenseNot gradedqualityDmaintenanceEnables Claude to interact with Basecamp API for project and to-do management via OAuth authentication.60MIT
Related MCP Connectors
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/feranmiemmanuel/gosar-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server