Skip to main content
Glama

JitAPI

PyPI PyPI Downloads License: MIT Python 3.10+

ClaudeをあらゆるAPIに向けましょう。JitAPIは、どのエンドポイントをどのような順序で呼び出すべきかを自動的に判断します。

JitAPIは、ClaudeがOpenAPI仕様からあらゆるAPIと対話できるようにするMCPサーバーです。何百ものエンドポイントをコンテキストに詰め込む代わりに、JitAPIはセマンティック検索と依存関係グラフを使用して必要なものだけを抽出します。その後、Claudeが呼び出しを計画・実行します。

https://github.com/user-attachments/assets/53f72f89-a41a-4a9c-a688-ec876ea05fbd


課題

Stripeには300以上のエンドポイントがあり、GitHubには800以上あります。仕様全体をClaudeのコンテキストに読み込むとトークンを浪費し、ハルシネーションの原因となります。使用するすべてのAPIに対してカスタムMCPサーバーを書くのはスケーラブルではありません。

JitAPIはこれを解決します: OpenAPI仕様を一度登録すれば、あとは必要なものを自然言語で尋ねるだけです。適切なエンドポイントを見つけ、それらの間の依存関係を解決し、Claudeが呼び出しを実行できるようにします。

Related MCP server: OpenAPI to MCP

クイックスタート

pip install jitapi

Claude Codeの設定(.mcp.json)に追加します:

{
  "mcpServers": {
    "jitapi": {
      "command": "uvx",
      "args": ["jitapi"]
    }
  }
}

以上です。APIキーは不要です。JitAPIはローカル埋め込みをすぐに使用します。

次にClaudeで:

You: Register the GitHub API from https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json

Claude: ✓ Registered GitHub v3 REST API — 1,107 endpoints indexed

You: List my repos

Claude: [searches for "list repositories for authenticated user" → finds GET /user/repos → executes]
Here are your repositories: ...

マルチAPIオーケストレーション

キラー機能:複数のAPIを登録し、それらにまたがる質問をすることができます。JitAPIは登録されたすべてのAPIを検索し、Claudeが呼び出しをチェーンします。

You: Register the TMDB API and OpenWeatherMap API
Claude: ✓ Registered both APIs

You: Find the top popular movie on TMDB, then get the weather where it was filmed

Claude: [searches TMDB → GET /movie/popular → GET /movie/{id} for production locations
         → searches OpenWeather → GET /data/2.5/weather with the city]

The #1 popular movie is "Inception", filmed in Los Angeles.
Current weather in LA: 72°F, partly cloudy.

仕組み

Register API                          Ask a question
     │                                      │
     ▼                                      ▼
Parse OpenAPI spec               Embed query → vector search
     │                                      │
     ▼                                      ▼
Build dependency graph           Find relevant endpoints
     │                                      │
     ▼                                      ▼
Embed all endpoints              Expand with dependencies
     │                                      │
     ▼                                      ▼
Store in vector DB               Return schemas → Claude executes
  1. 登録 — OpenAPI仕様を解析し、依存関係グラフ(どのエンドポイントが他のどのエンドポイントからのデータを必要とするか)を構築し、すべてのエンドポイントに対して検索可能な埋め込みを作成します

  2. 検索 — 質問すると、JitAPIはクエリを埋め込み、コサイン類似度を通じて最も関連性の高いエンドポイントを見つけます

  3. 展開 — 依存関係グラフが必要な前提条件のエンドポイントを追加します(例:「POST /orders の user_id を取得するために、まず GET /users を呼び出す必要がある」)

  4. 実行 — Claudeはエンドポイントのスキーマを取得し、ステップ間でデータを渡しながらAPI呼び出しを行います

MCPツール

ツール

説明

register_api

OpenAPI仕様URLからAPIを登録する

list_apis

登録済みのすべてのAPIとそのエンドポイント数を一覧表示する

search_endpoints

自然言語を使用してエンドポイントをセマンティック検索する

get_workflow

依存関係解決と完全なスキーマを備えた関連エンドポイントを見つける

get_endpoint_schema

特定のエンドポイントの完全なスキーマを取得する

call_api

認証、パスパラメータ、クエリパラメータ、ボディを指定して単一のAPI呼び出しを実行する

set_api_auth

認証を設定する(APIキー、ベアラートークン、基本認証)

delete_api

登録済みのAPIとそのすべてのデータを削除する

セットアップ

Claude Code

プロジェクトディレクトリに .mcp.json を作成します(グローバルアクセスの場合は ~/.claude.json):

{
  "mcpServers": {
    "jitapi": {
      "command": "uvx",
      "args": ["jitapi"]
    }
  }
}

Claude Desktop

Claude Desktopの設定に追加します:

OS

設定パス

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "jitapi": {
      "command": "uvx",
      "args": ["jitapi"]
    }
  }
}

埋め込みプロバイダー

JitAPIはローカル埋め込み(fastembed)でそのまま動作するため、APIキーは不要です。大規模なAPIで検索品質を向上させるには、クラウド埋め込みプロバイダーを追加できます:

プロバイダー

品質

セットアップ

ローカル(デフォルト)

良好

不要 — すぐに動作

Voyage AI(推奨)

非常に高い

pip install jitapi[voyage] + VOYAGE_API_KEY を設定

OpenAI

非常に高い

pip install jitapi[openai] + OPENAI_API_KEY を設定

Cohere

高い

pip install jitapi[cohere] + COHERE_API_KEY を設定

MCP設定の env ブロックにAPIキーを設定します:

{
  "mcpServers": {
    "jitapi": {
      "command": "uvx",
      "args": ["jitapi"],
      "env": {
        "VOYAGE_API_KEY": "your-key-here"
      }
    }
  }
}

プロバイダーは利用可能な環境変数から自動検出されます。優先順位:Voyage AI > OpenAI > Cohere > ローカル。

認証

登録後にAPI認証を設定します。推奨されるアプローチは環境変数を使用することです。これにより、シークレットがディスクに書き込まれることはありません:

{
  "mcpServers": {
    "jitapi": {
      "command": "uvx",
      "args": ["jitapi"],
      "env": {
        "GITHUB_TOKEN": "ghp_...",
        "OPENWEATHER_API_KEY": "your-key-here"
      }
    }
  }
}

次に、Claudeに環境変数を使用するように伝えます:

You: Set bearer auth for GitHub using env var GITHUB_TOKEN
Claude: [calls set_api_auth with auth_type="bearer", env_var="GITHUB_TOKEN"]
✓ Auth configured for github (from env var $GITHUB_TOKEN)

env_var を使用すると、JitAPIはリクエスト時に環境からシークレットを読み取ります。環境変数名のみが永続化され、認証情報自体は決して永続化されません。

認証情報を直接渡すこともできます(0600権限で ~/.jitapi/auth.json に保存されます):

You: Set API key auth for OpenWeather with param name "appid"
Claude: [calls set_api_auth with auth_type="api_key_query", credential="...", param_name="appid"]
✓ Auth configured for openweather

サポートされている認証タイプ:bearer、api_key_header、api_key_query、basic。

セキュリティ上の注意: env_var を使用する場合、認証情報は実行時に解決され、ファイルシステムに触れることはありません。認証情報を直接渡す場合、シークレットは ~/.jitapi/auth.json にプレーンテキストのJSONとして保存されます(ファイル権限 0600、ディレクトリ 0700)。本番環境では env_var アプローチを推奨します。

環境変数

変数

必須

説明

VOYAGE_API_KEY

いいえ

Voyage AI APIキー(推奨クラウドプロバイダー)

OPENAI_API_KEY

いいえ

OpenAI APIキー(代替クラウドプロバイダー)

COHERE_API_KEY

いいえ

Cohere APIキー(代替クラウドプロバイダー)

JITAPI_STORAGE_DIR

いいえ

データディレクトリ(デフォルト:~/.jitapi)

JITAPI_LOG_LEVEL

いいえ

DEBUG, INFO, WARNING, ERROR(デフォルト:INFO)

開発

git clone https://github.com/nk3750/jitapi.git
cd jitapi
pip install -e ".[dev]"
pytest
ruff check src/

ライセンス

MIT

Available Tools

8 tools
call_apiB

Execute an API call. Make sure authentication is configured first.

Inputs: api_id (required), endpoint_id (required), path_params, query_params, +1 more.

delete_apiA

Delete a registered API and all its data including endpoints, embeddings, dependency graph, and authentication credentials.

Inputs: api_id (required).

get_endpoint_schemaB

Get the full schema for a specific endpoint. Use this to get detailed parameter and response information.

Inputs: api_id (required), endpoint_id (required).

get_workflowA

Get relevant endpoints with dependency resolution and full schemas for accomplishing a task. Returns search results expanded with their dependencies so you can plan and execute the right API calls in the right order. After reviewing the results, use call_api to execute each step.

Inputs: query (required), api_id (required), max_steps.

list_apisB

List all registered APIs with their basic information.

Inputs: no named parameters.

register_apiA

Register a new API by ingesting its OpenAPI specification. This parses the spec, builds a dependency graph, and creates searchable embeddings.

Inputs: api_id (required), spec_url (required).

search_endpointsA

Search for API endpoints using natural language. Returns semantically similar endpoints based on the query.

Inputs: query (required), api_id, top_k.

set_api_authA

Configure authentication for an API. Supports API key (header or query param) and bearer token auth. Use env_var to reference a secret from an environment variable — the credential is then resolved at request time and never stored on disk.

Inputs: api_id (required), auth_type (required), credential, env_var, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: register/delete/list for API lifecycle management, search_endpoints for discovery, get_endpoint_schema for detailed inspection, get_workflow for task planning with dependencies, set_api_auth for configuration, and call_api for execution. No overlapping functionality.

    Naming Consistency5/5

    Consistent snake_case throughout with verb_noun pattern (call_api, delete_api, list_apis, register_api, search_endpoints, get_workflow, get_endpoint_schema, set_api_auth). All use standard CRUD-style verbs (get, list, search, call, set, register, delete).

    Tool Count5/5

    8 tools is well-scoped for an API management server covering the full lifecycle: registration, listing, deletion, authentication, discovery (search), inspection (schema), planning (workflow), and execution. Each tool earns its place without redundancy.

    Completeness4/5

    Covers the core API lifecycle well (register, list, delete, auth, search, call) with helpful additions like workflow planning. Minor gaps: no get_api for specific API details (only list_apis), no update_api for refreshing specs without full deletion, and no way to remove auth without deleting the entire API.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A standalone proxy that transforms any OpenAPI or Swagger-described REST API into an MCP server by mapping API operations to executable MCP tools. It enables AI clients to interact with existing web services through automated HTTP requests based on their official documentation.
      16
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Universal AI API Orchestrator. 850 tools across 53 services under a single MCP interface. Connect Claude, GPT, or Gemini to Stripe, Slack, GitHub, LinkedIn, Cloudflare, Shopify, Twilio, and 46 more via natural language. $0.10/execution, no subscription. Patent Pending.
      274 npm
      5
      -
    • A
      license
      A
      quality
      C
      maintenance
      Turn any OpenAPI spec into MCP tools for Claude — instantly. Point mcp-openapi at any OpenAPI 3.x spec and Claude can call every endpoint through natural language. No custom integration code. No manual tool definitions. One line of config.
      2
      40 npm
      1
      MIT