Логотип OpenAPI到模型上下文协议(MCP)

OpenAPI到模型上下文协议(MCP)

Сообщество
gujord

The OpenAPI-MCP proxy translates OpenAPI specs into MCP tools, enabling AI agents to access external APIs without custom wrappers!

Издательgujord
РепозиторийOpenAPI-MCP
ЯзыкPython
Форки
11
Звёзды
69
Доступные инструменты
0
Тип транспортаstdio, streamable-http
Категории
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    OpenAPI到模型上下文协议(MCP) предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 0

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 69, форки: 11 — в связанном репозитории.

OpenAPI to Model Context Protocol (MCP)

PyPI version License: MIT Repo Size Last Commit Open Issues Python version

The OpenAPI-MCP proxy translates OpenAPI specs into MCP tools, enabling AI agents to access external APIs without custom wrappers!

OpenAPI-MCP

Bridge the gap between AI agents and external APIs

The OpenAPI to Model Context Protocol (MCP) proxy server bridges the gap between AI agents and external APIs by dynamically translating OpenAPI specifications into standardized MCP tools, resources, and prompts. This simplifies integration by eliminating the need for custom API wrappers.

Built with FastMCP following official MCP patterns and best practices, the server provides:

  • ✅ Official FastMCP Integration - Uses the latest FastMCP framework for optimal performance

  • ✅ Proper MCP Transport - Supports stdio, SSE, and streamable HTTP transports

  • ✅ Modular Architecture - Clean separation of concerns with dependency injection

  • ✅ Production Ready - Robust error handling, comprehensive logging, and type safety

  • Repository: https://github.com/gujord/OpenAPI-MCP


If you find it useful, please give it a ⭐ on GitHub!


Key Features

Core Functionality

  • FastMCP Transport: Optimized for stdio, working out-of-the-box with popular LLM orchestrators.
  • OpenAPI Integration: Parses and registers OpenAPI operations as callable tools.
  • Resource Registration: Automatically converts OpenAPI component schemas into resource objects with defined URIs.
  • Prompt Generation: Generates contextual prompts based on API operations to guide LLMs in using the API.
  • Dual Authentication: Supports both OAuth2 Client Credentials flow and username/password authentication with automatic token caching.
  • MCP HTTP Transport: Official MCP-compliant HTTP streaming transport with JSON-RPC 2.0 over SSE.
  • Server-Sent Events (SSE): Legacy streaming support (deprecated - use MCP HTTP transport).
  • JSON-RPC 2.0 Support: Fully compliant request/response structure.

Advanced Features

  • Modular Architecture: Clean separation of concerns with dedicated modules for authentication, request handling, and tool generation.
  • Robust Error Handling: Comprehensive exception hierarchy with proper JSON-RPC error codes and structured error responses.
  • Auto Metadata: Derives tool names, summaries, and schemas from the OpenAPI specification.
  • Sanitized Tool Names: Ensures compatibility with MCP name constraints.
  • Flexible Parameter Parsing: Supports query strings, JSON, and comma-separated formats with intelligent type conversion.
  • Enhanced Parameter Handling: Automatically converts parameters to correct data types with validation.
  • Extended Tool Metadata: Includes detailed parameter information, response schemas, and API categorization.
  • CRUD Operation Detection: Automatically identifies and generates example prompts for Create, Read, Update, Delete operations.
  • MCP-Compliant Streaming: Official MCP HTTP transport for real-time streaming with proper session management.

Developer Experience

  • Configuration Management: Centralized environment variable handling with validation and defaults.
  • Comprehensive Logging: Structured logging with appropriate levels for debugging and monitoring.
  • Type Safety: Full type hints and validation throughout the codebase.
  • Extensible Design: Factory patterns and dependency injection for easy customization and testing.

🚀 Quick Start

Installation

Option 1: Using uvx (Recommended)

bash
# Run directly without installation
uvx openapi-mcp-proxy

# Or with environment variables
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
uvx openapi-mcp-proxy

Option 2: Using pip

bash
pip install openapi-mcp-proxy

# Then run
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
openapi-mcp

Option 3: From source

bash
git clone https://github.com/gujord/OpenAPI-MCP.git
cd OpenAPI-MCP
python3.12 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e .

🎯 Simple Usage

Quick Test (Norwegian Weather API)

bash
# Using uvx
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
uvx openapi-mcp

# Or using installed package
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
openapi-mcp

HTTP Transport (Recommended for Claude Desktop)

bash
# Start weather API with HTTP transport
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
openapi-mcp

🔗 Claude Desktop Setup

1. Copy the provided configuration:

bash
cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json

2. Start the weather server:

bash
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
openapi-mcp

3. Test in Claude Desktop:

  • Ask: "What's the weather in Oslo tomorrow?"
  • Claude will use the weather_get__compact tool automatically!

🌐 Multiple API Servers

Run multiple OpenAPI services simultaneously:

bash
# Terminal 1: Weather API
source venv/bin/activate && \
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
python src/openapi_mcp/fastmcp_server.py

# Terminal 2: Petstore API  
source venv/bin/activate && \
OPENAPI_URL="https://petstore3.swagger.io/api/v3/openapi.json" \
SERVER_NAME="petstore" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8002" \
python src/openapi_mcp/fastmcp_server.py

🐳 Docker Deployment

Quick start with Docker:

bash
# Start all services (weather + petstore)
./docker-start.sh

# Or manually
docker-compose up --build -d

This automatically runs:

  • Weather API on port 8001
  • Petstore API on port 8002

⚙️ Advanced Configuration

Claude Desktop / Cursor / Windsurf

HTTP Transport (Recommended):

Use the provided configuration file:

bash
cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json

Or create manually:

json
{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["mcp-remote", "http://127.0.0.1:8001/sse"]
    },
    "petstore": {
      "command": "npx", 
      "args": ["mcp-remote", "http://127.0.0.1:8002/sse"]
    }
  }
}

Stdio Transport (Alternative):

json
{
  "mcpServers": {
    "weather": {
      "command": "/full/path/to/OpenAPI-MCP/venv/bin/python",
      "args": ["/full/path/to/OpenAPI-MCP/src/openapi_mcp/fastmcp_server.py"],
      "env": {
        "SERVER_NAME": "weather",
        "OPENAPI_URL": "https://api.met.no/weatherapi/locationforecast/2.0/swagger"
      },
      "transport": "stdio"
    }
  }
}

Note: Replace /full/path/to/OpenAPI-MCP with your actual installation path.

With Local Spec and Custom Headers

json
{
  "mcpServers": {
    "local_api": {
      "command": "/full/path/to/OpenAPI-MCP/venv/bin/python",
      "args": ["/full/path/to/OpenAPI-MCP/src/openapi_mcp/fastmcp_server.py"],
      "env": {
        "SERVER_NAME": "local_api",
        "OPENAPI_URL": "./specs/my-api.yaml",
        "MCP_AUTH_HEADERS": "{\"X-API-Key\": \"your-key-here\"}"
      },
      "transport": "stdio"
    }
  }
}

With Username/Password Authentication

json
{
  "mcpServers": {
    "secure_api": {
      "command": "full_path_to_openapi_mcp/venv/bin/python",
      "args": ["full_path_to_openapi_mcp/src/openapi_mcp/fastmcp_server.py"],
      "env": {
        "SERVER_NAME": "secure_api",
        "OPENAPI_URL": "https://api.example.com/openapi.json",
        "API_USERNAME": "your_username",
        "API_PASSWORD": "your_password"
      },
      "transport": "stdio"
    }
  }
}

With OAuth2 Authentication

json
{
  "mcpServers": {
    "oauth_api": {
      "command": "full_path_to_openapi_mcp/venv/bin/python",
      "args": ["full_path_to_openapi_mcp/src/openapi_mcp/fastmcp_server.py"],
      "env": {
        "SERVER_NAME": "oauth_api",
        "OPENAPI_URL": "https://api.example.com/openapi.json",
        "OAUTH_CLIENT_ID": "your_client_id",
        "OAUTH_CLIENT_SECRET": "your_client_secret",
        "OAUTH_TOKEN_URL": "https://api.example.com/oauth/token"
      },
      "transport": "stdio"
    }
  }
}

Multiple API Servers with MCP HTTP Transport

Configure multiple OpenAPI services to run simultaneously:

json
{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": [
        "mcp-remote", 
        "http://127.0.0.1:8001/sse"
      ]
    },
    "petstore": {
      "command": "npx", 
      "args": [
        "mcp-remote",
        "http://127.0.0.1:8002/sse" 
      ]
    }
  }
}

This configuration gives Claude access to both weather data AND petstore API tools simultaneously, with clear tool naming like weather_get__compact and petstore_addPet.

Single API Server with MCP HTTP Transport

For a single API service:

Standard SSE Configuration:

json
{
  "mcpServers": {
    "openapi_service": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:8001/sse"
      ]
    }
  }
}

Streamable HTTP Configuration:

json
{
  "mcpServers": {
    "openapi_service": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:8001/mcp"
      ]
    }
  }
}

With Debugging (for development):

json
{
  "mcpServers": {
    "openapi_service": {
      "command": "npx",
      "args": [
        "mcp-remote", 
        "http://127.0.0.1:8001/sse",
        "--debug"
      ]
    }
  }
}

With Custom Transport Strategy:

json
{
  "mcpServers": {
    "openapi_service": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:8001/mcp", 
        "--transport",
        "streamable-http"
      ]
    }
  }
}

With Legacy SSE Streaming (Deprecated)

json
{
  "mcpServers": {
    "streaming_api": {
      "command": "full_path_to_openapi_mcp/venv/bin/python",
      "args": ["full_path_to_openapi_mcp/src/openapi_mcp/fastmcp_server.py"],
      "env": {
        "SERVER_NAME": "streaming_api",
        "OPENAPI_URL": "https://api.example.com/openapi.json",
        "SSE_ENABLED": "true",
        "SSE_HOST": "127.0.0.1",
        "SSE_PORT": "8001"
      },
      "transport": "stdio"
    }
  }
}

Apply this configuration to the following files:

  • Cursor: ~/.cursor/mcp.json
  • Windsurf: ~/.codeium/windsurf/mcp_config.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json

Replace full_path_to_openapi_mcp with your actual installation path.

Quick Setup for Multiple APIs

Copy the provided example configuration:

bash
cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json

Start both services:

bash
# Terminal 1
source venv/bin/activate && \
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
python src/openapi_mcp/fastmcp_server.py

# Terminal 2  
source venv/bin/activate && \
OPENAPI_URL="https://petstore3.swagger.io/api/v3/openapi.json" \
SERVER_NAME="petstore" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8002" \
python src/openapi_mcp/fastmcp_server.py

Result: Claude gets access to both weather and petstore APIs with prefixed tool names.

Environment Configuration

Core Configuration

VariableDescriptionRequiredDefault
OPENAPI_URLURL or local file path to OpenAPI specificationYes-
SERVER_NAMEMCP server nameNoopenapi_proxy_server

OAuth2 Authentication

VariableDescriptionRequiredDefault
OAUTH_CLIENT_IDOAuth client IDNo-
OAUTH_CLIENT_SECRETOAuth client secretNo-
OAUTH_TOKEN_URLOAuth token endpoint URLNo-
OAUTH_SCOPEOAuth scopeNoapi

Username/Password Authentication

VariableDescriptionRequiredDefault
API_USERNAMEAPI username for authenticationNo-
API_PASSWORDAPI password for authenticationNo-
API_LOGIN_ENDPOINTLogin endpoint URLNoAuto-detected

Custom Authentication Headers

VariableDescriptionRequiredDefault
MCP_AUTH_HEADERSCustom authentication headers (JSON or key=value format)No-

MCP HTTP Transport (Recommended)

VariableDescriptionRequiredDefault
MCP_HTTP_ENABLEDEnable MCP HTTP transportNofalse
MCP_HTTP_HOSTMCP HTTP server hostNo127.0.0.1
MCP_HTTP_PORTMCP HTTP server portNo8000
MCP_CORS_ORIGINSCORS origins (comma-separated)No*
MCP_MESSAGE_SIZE_LIMITMessage size limitNo4mb
MCP_BATCH_TIMEOUTBatch timeout in secondsNo30
MCP_SESSION_TIMEOUTSession timeout in secondsNo3600

Legacy SSE Support (Deprecated)

VariableDescriptionRequiredDefault
SSE_ENABLEDEnable SSE streaming supportNofalse
SSE_HOSTSSE server hostNo127.0.0.1
SSE_PORTSSE server portNo8000

📁 Loading Local OpenAPI Specifications

You can now load OpenAPI specs from your local filesystem instead of requiring remote URLs:

JSON Format

bash
source venv/bin/activate
OPENAPI_URL="./specs/my-api.json" \
SERVER_NAME="local_api" \
python src/openapi_mcp/fastmcp_server.py

YAML Format

bash
source venv/bin/activate
OPENAPI_URL="../shared/api.yaml" \
SERVER_NAME="local_api" \
python src/openapi_mcp/fastmcp_server.py

Absolute Path

bash
source venv/bin/activate
OPENAPI_URL="/Users/myuser/projects/api-spec.json" \
SERVER_NAME="local_api" \
python src/openapi_mcp/fastmcp_server.py

Supported Formats

  • JSON files: .json extension
  • YAML files: .yaml or .yml extension
  • Relative paths: ./path/to/spec.yaml, ../spec.json
  • Absolute paths: /full/path/to/spec.yaml

🔑 API Key and Custom Headers

Support for APIs requiring custom headers (API keys, tokens, etc.):

Using JSON Format

bash
source venv/bin/activate
MCP_AUTH_HEADERS='{"X-API-Key": "your-api-key", "X-Client-ID": "client123"}' \
OPENAPI_URL="https://api.example.com/openapi.json" \
SERVER_NAME="custom_api" \
python src/openapi_mcp/fastmcp_server.py

Using Simple Format

bash
source venv/bin/activate
MCP_AUTH_HEADERS='X-API-Key=your-api-key,X-Client-ID=client123' \
OPENAPI_URL="https://api.example.com/openapi.json" \
SERVER_NAME="custom_api" \
python src/openapi_mcp/fastmcp_server.py

Common API Key Patterns

  • RapidAPI: MCP_AUTH_HEADERS='{"X-RapidAPI-Key": "your-key"}'
  • Custom Bearer: MCP_AUTH_HEADERS='{"Authorization": "Bearer custom-token"}'
  • Multiple Headers: MCP_AUTH_HEADERS='{"X-API-Key": "key", "X-API-Secret": "secret"}'

Local Spec + Custom Headers

Combine both features for development:

bash
source venv/bin/activate
OPENAPI_URL="./test/fixtures/api.json" \
MCP_AUTH_HEADERS='{"X-API-Key": "dev-key"}' \
SERVER_NAME="dev_api" \
python src/openapi_mcp/fastmcp_server.py

🛠️ Examples & Use Cases

Norwegian Weather API

Test with real weather data (no authentication required):

bash
# Start weather server
source venv/bin/activate && \
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
python src/openapi_mcp/fastmcp_server.py

Available tools:

  • weather_get__compact - Weather forecast for coordinates
  • weather_get__complete - Detailed weather forecast
  • weather_get__status - Server status

Example usage in Claude:

  • "What's the weather in Oslo tomorrow?" → Uses lat=59.9139, lon=10.7522
  • "Show me detailed weather for Bergen" → Uses lat=60.3913, lon=5.3221

Pet Store API

Test with Swagger's demo API:

bash
# Start petstore server
source venv/bin/activate && \
OPENAPI_URL="https://petstore3.swagger.io/api/v3/openapi.json" \
SERVER_NAME="petstore" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8002" \
python src/openapi_mcp/fastmcp_server.py

Available tools:

  • petstore_addPet - Add a new pet to the store
  • petstore_findPetsByStatus - Find pets by status
  • petstore_getPetById - Find pet by ID

🏗️ Architecture

FastMCP-Based Design

src/
├── fastmcp_server.py      # FastMCP-based main server (recommended)
├── server.py              # Legacy MCP server (fallback)
├── config.py              # Configuration management
├── auth.py                # OAuth authentication handling
├── openapi_loader.py      # OpenAPI spec loading and parsing
├── request_handler.py     # Request preparation and validation
├── schema_converter.py    # Schema conversion utilities
├── exceptions.py          # Custom exception hierarchy
└── __init__.py           # Package initialization

Key Features

✅ FastMCP Integration - Uses latest FastMCP framework
✅ Automatic Tool Registration - Converts OpenAPI operations to MCP tools
✅ Multi-Transport Support - stdio, HTTP, SSE
✅ Parameter Validation - Type conversion and validation
✅ Error Handling - Comprehensive JSON-RPC error responses
✅ Authentication - OAuth2 and username/password support

How It Works

  1. Configuration Loading: Validates environment variables and server configuration.
  2. OpenAPI Spec Loading: Fetches and parses OpenAPI specifications with comprehensive error handling.
  3. Component Initialization: Sets up modular components with dependency injection.
  4. Tool Registration: Dynamically creates MCP tools from OpenAPI operations with full metadata.
  5. Resource Registration: Converts OpenAPI schemas into MCP resources with proper URIs.
  6. Prompt Generation: Creates contextual usage prompts and CRUD operation examples.
  7. Authentication: Handles both OAuth2 and username/password authentication with token caching and automatic renewal.
  8. Request Processing: Advanced parameter parsing, type conversion, and validation.
  9. Error Handling: Comprehensive exception handling with structured error responses.

Resources & Prompts

The server automatically generates comprehensive metadata to enhance AI integration:

Resources

  • Schema-based Resources: Automatically derived from OpenAPI component schemas
  • Structured URIs: Resources are registered with consistent URIs (e.g., /resource/{server_name}_{schema_name})
  • Type Conversion: OpenAPI schemas are converted to MCP-compatible resource definitions
  • Metadata Enrichment: Resources include server context and categorization tags

Prompts

  • API Usage Guides: General prompts explaining available operations and their parameters
  • CRUD Examples: Automatically generated examples for Create, Read, Update, Delete operations
  • Contextual Guidance: Operation-specific prompts with parameter descriptions and usage patterns
  • Server-specific Branding: All prompts are prefixed with server name for multi-API environments

Benefits

  • Enhanced Discoverability: AI agents can better understand available API capabilities
  • Usage Guidance: Prompts provide clear examples of how to use each operation
  • Type Safety: Resource schemas ensure proper data structure understanding
  • Context Awareness: Server-specific metadata helps with multi-API integration

OpenAPI-MCP

📊 Performance & Production

Performance Characteristics

  • Fast Startup: Initializes in ~2-3 seconds
  • Low Memory: ~50MB base memory usage
  • Concurrent Requests: Handles multiple API calls simultaneously
  • Caching: Automatic OpenAPI spec and authentication token caching

Production Deployment

bash
# Docker production deployment
docker-compose up -d

# Or with custom configuration
docker run -d \
  -e OPENAPI_URL="https://your-api.com/openapi.json" \
  -e SERVER_NAME="your_api" \
  -e MCP_HTTP_ENABLED="true" \
  -e MCP_HTTP_PORT="8001" \
  -p 8001:8001 \
  openapi-mcp:latest

Monitoring

  • Health check endpoint: GET /health
  • Metrics via structured logging
  • Error tracking with JSON-RPC error codes

🔍 Troubleshooting

Common Issues

❌ RequestHandler.prepare_request() missing arguments

bash
# Solution: Use fastmcp_server.py instead of server.py
python src/openapi_mcp/fastmcp_server.py  # ✅ Correct

❌ Claude Desktop doesn't see the tools

bash
# Check configuration location
ls ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Restart Claude Desktop after config changes

❌ Connection refused on port 8001

bash
# Check if server is running
lsof -i :8001

# Check server logs for errors

❌ SSL/TLS errors with OpenAPI URLs

bash
# Update certificates
pip install --upgrade certifi httpx

Testing Tools

Test server initialization:

bash
python test_weather_oslo.py

Test with mcp-remote:

bash
npx mcp-remote http://127.0.0.1:8001/sse

Check available tools:

bash
curl http://127.0.0.1:8001/health

Environment Issues

Python version mismatch:

bash
# Ensure Python 3.12+
python --version

# Recreate virtual environment if needed
rm -rf venv && python3.12 -m venv venv

Missing dependencies:

bash
# Reinstall requirements
pip install --upgrade -r requirements.txt

🤝 Contributing

  1. Fork this repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📄 License

MIT License

Audits

MseeP.ai Security Assessment Badge

Star History

If you find it useful, please give it a ⭐ on GitHub!

Star History Chart

Установка

TypingMind
{
  "mcpServers": {
    "openapi-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:8001/sse"
      ]
    }
  }
}

Используйте MCP OpenAPI到模型上下文协议(MCP) с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения OpenAPI到模型上下文协议(MCP) вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Вы можете запустить MCP локально на своём устройстве или подключиться к удалённому серверу MCP по URL.

Вариант 1: используйте локальный коннектор

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте OpenAPI到模型上下文协议(MCP) как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для OpenAPI到模型上下文协议(MCP).
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "openapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для OpenAPI到模型上下文协议(MCP), затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для OpenAPI到模型上下文协议(MCP).
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью OpenAPI到模型上下文协议(MCP)?
OpenAPI到模型上下文协议(MCP)
Конечно. Я всё прочитал.
Вот что я нашёл с помощью OpenAPI到模型上下文协议(MCP).

Вариант 2: добавьте URL сервера MCP

Выберите этот способ, если OpenAPI到模型上下文协议(MCP) уже размещён на удалённом сервере или вашей команде нужен общий коннектор для нескольких пользователей.

1

Откройте коннекторы MCP

В TypingMind перейдите в раздел «Плагины», откройте «Коннекторы MCP» и выберите «Добавить URL».

  1. Откройте TypingMind в браузере.
  2. Перейдите в раздел «Плагины».
  3. Откройте раздел «Коннекторы MCP».
  4. Нажмите «Добавить URL».
Форма «Добавить URL своего сервера MCP» в TypingMind
2

Вставьте URL сервера

Введите http://127.0.0.1:8001/sse в поле «URL сервера». Добавьте название подключения, описание, значок, пользовательские HTTP-заголовки или настройки клиента OAuth, если они требуются серверу.

  1. Вставьте http://127.0.0.1:8001/sse в поле «URL сервера».
  2. Введите название подключения для OpenAPI到模型上下文协议(MCP).
  3. Добавьте описание и значок, чтобы подключение было проще узнать.
  4. Добавьте пользовательские HTTP-заголовки или данные клиента OAuth, если сервер требует аутентификации.
3

Создайте подключение

Нажмите «Создать подключение», затем вернитесь к списку плагинов и убедитесь, что новое подключение MCP активно.

  1. Нажмите «Создать подключение».
  2. Вернитесь к списку коннекторов MCP.
  3. Убедитесь, что подключение OpenAPI到模型上下文协议(MCP) отображается как активное.
  4. Обновите список плагинов, если подключение не появится сразу.
4

Переключайте модели без повторного подключения

Начните чат с предпочитаемой моделью, включите инструменты OpenAPI到模型上下文协议(MCP) в разделе «Плагины» и при необходимости переключитесь на другую модель. Подключение MCP останется доступным в рабочем пространстве TypingMind.

  1. Начните новый чат в TypingMind.
  2. Выберите модель ИИ, которую хотите использовать.
  3. Включите инструменты OpenAPI到模型上下文协议(MCP) в разделе «Плагины».
  4. При необходимости попросите модель использовать инструмент.
  5. Переключитесь на другую модель ИИ и используйте то же подключение MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью OpenAPI到模型上下文协议(MCP)?
OpenAPI到模型上下文协议(MCP)
Конечно. Я всё прочитал.
Вот что я нашёл с помощью OpenAPI到模型上下文协议(MCP).

Часто задаваемые вопросы

Для чего используется сервер MCP OpenAPI到模型上下文协议(MCP)?

OpenAPI到模型上下文协议(MCP) — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP OpenAPI到模型上下文协议(MCP) с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать OpenAPI到模型上下文协议(MCP) с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP OpenAPI到模型上下文协议(MCP) с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив OpenAPI到模型上下文协议(MCP), вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP OpenAPI到模型上下文协议(MCP) к TypingMind?

OpenAPI到模型上下文协议(MCP) можно подключить к TypingMind через локальный коннектор MCP или добавив URL удалённого сервера MCP. Используйте локальный коннектор, если серверу нужен доступ к файлам, приложениям или закрытым ресурсам на вашем устройстве, и URL сервера, если сервер MCP размещён удалённо.

Какие инструменты предоставляет сервер MCP OpenAPI到模型上下文协议(MCP) в TypingMind?

OpenAPI到模型上下文协议(MCP) предоставляет возможности MCP, которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP OpenAPI到模型上下文协议(MCP)?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если OpenAPI到模型上下文协议(MCP) требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇