jitapi
JitAPI
让 Claude 指向任何 API。JitAPI 会自动计算出需要调用哪些端点以及调用的顺序。
JitAPI 是一个 MCP 服务器,允许 Claude 通过 OpenAPI 规范与任何 API 进行交互。JitAPI 不会将数百个端点一股脑塞进上下文,而是使用语义搜索和依赖图来仅呈现所需的内容——然后由 Claude 进行规划并执行调用。
https://github.com/user-attachments/assets/53f72f89-a41a-4a9c-a688-ec876ea05fbd
问题所在
Stripe 有 300 多个端点。GitHub 有 800 多个。将完整的规范加载到 Claude 的上下文中会浪费 Token 并导致幻觉。为每个使用的 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 并提出跨 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注册 — 解析 OpenAPI 规范,构建依赖图(哪些端点需要来自其他端点的数据),并为所有端点创建可搜索的嵌入。
搜索 — 当你提出问题时,JitAPI 会对你的查询进行嵌入,并通过余弦相似度找到最相关的端点。
扩展 — 依赖图会添加任何先决条件端点(例如,“你需要先调用 GET /users 来获取 POST /orders 所需的 user_id”)。
执行 — Claude 获取端点模式并进行 API 调用,在步骤之间传递数据。
MCP 工具
工具 | 描述 |
| 从 OpenAPI 规范 URL 注册 API |
| 列出所有已注册的 API 及其端点数量 |
| 使用自然语言在端点间进行语义搜索 |
| 通过依赖解析和完整模式查找相关端点 |
| 获取特定端点的完整模式 |
| 执行带有认证、路径参数、查询参数和主体的单个 API 调用 |
| 配置认证(API 密钥、Bearer Token、基本认证) |
| 删除已注册的 API 及其所有数据 |
设置
Claude Code
在你的项目目录中创建 .mcp.json(或全局访问使用 ~/.claude.json):
{
"mcpServers": {
"jitapi": {
"command": "uvx",
"args": ["jitapi"]
}
}
}Claude Desktop
添加到你的 Claude Desktop 配置中:
操作系统 | 配置文件路径 |
macOS |
|
Windows |
|
Linux |
|
{
"mcpServers": {
"jitapi": {
"command": "uvx",
"args": ["jitapi"]
}
}
}嵌入提供商
JitAPI 通过本地嵌入 (fastembed) 开箱即用——无需 API 密钥。为了在大型 API 上获得更好的搜索质量,你可以添加云嵌入提供商:
提供商 | 质量 | 设置 |
本地 (默认) | 良好 | 无需操作——立即生效 |
Voyage AI (推荐) | 优秀 |
|
OpenAI | 优秀 |
|
Cohere | 非常好 |
|
在你的 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时,凭据在运行时解析,绝不会触及文件系统。直接传递credential时,密钥会以明文 JSON 形式存储在~/.jitapi/auth.json中(文件权限0600,目录0700)。在生产环境中使用时,请优先选择env_var方法。
环境变量
变量 | 必需 | 描述 |
| 否 | Voyage AI API 密钥(推荐的云提供商) |
| 否 | OpenAI API 密钥(替代云提供商) |
| 否 | Cohere API 密钥(替代云提供商) |
| 否 | 数据目录(默认: |
| 否 | DEBUG, INFO, WARNING, ERROR(默认:INFO) |
开发
git clone https://github.com/nk3750/jitapi.git
cd jitapi
pip install -e ".[dev]"
pytest
ruff check src/许可证
MIT
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
- FlicenseBquality-maintenanceBridges Claude Code to a Cloud Orchestrator API, providing access to multi-AI consensus, web search, code execution sandboxes, long-term memory, knowledge graphs, deployment management, and 20+ integrated AI and developer tools.28
- Alicense-qualityDmaintenanceA 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.1516MIT
- Flicense-quality-maintenanceUniversal 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.5005
- AlicenseAqualityCmaintenanceTurn 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.2481MIT
Related MCP Connectors
Stripe-native marketplace where AI agents discover and pay per call for API services.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Universal AI API Orchestrator — 1,554 tools, 96 services. One install.
Appeared in Searches
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/nk3750/jitapi'
If you have feedback or need assistance with the MCP directory API, please join our Discord server