kobra-api-mcp

kobra-api-mcp

MCP server enabling AI agents to interact with the Kobra API through authenticated HTTP requests, including partner, bearer, and session auth.

Category
Visit Server

README

kobra-api-mcp

MCP server para que cualquier IA (Grok, Cursor, Claude Desktop, etc.) use la API Kobra de verdad:

  1. Lee el OpenAPI live (no un PDF viejo)
  2. Sabe cómo autenticarse (partner key, bearer, session)
  3. Ejecuta requests HTTP y devuelve status + body

Default: https://stage.api.trykobra.com. Prod solo con KOBRA_ALLOW_PROD=1.

Install

cd kobra-api-mcp
uv sync
# o: pip install -e .

Run (stdio MCP)

export KOBRA_ENV=stage
export KOBRA_PARTNER_KEY='kbr_…'   # para /api/partner/v1/*
uv run python -m kobra_api_mcp

Config para Grok / Cursor / Claude

Ver config/grok-mcp.example.json y config/cursor-mcp.example.json.

Ejemplo Cursor (~/.cursor/mcp.json o settings MCP):

{
  "mcpServers": {
    "kobra-api": {
      "command": "uv",
      "args": ["run", "--directory", "/ABS/PATH/kobra-api-mcp", "python", "-m", "kobra_api_mcp"],
      "env": {
        "KOBRA_ENV": "stage",
        "KOBRA_ALLOW_PROD": "0",
        "KOBRA_PARTNER_KEY": "kbr_…"
      }
    }
  }
}

Grok (sesiones con MCP): mismo bloque mcpServers en la config de MCP del host que use Grok Build / TUI. La key nunca va en el chat: solo en env del server.

Auth (lo que la IA debe saber)

Perfil Env Header Rutas
none — — /health, /docs, /openapi.json, /sdk, /api/catalog*, /partner/docs
partner KOBRA_PARTNER_KEY X-Kobra-Partner-Key (o Authorization: Partner <key>) /api/partner/v1/*
bearer KOBRA_BEARER_TOKEN Authorization: Bearer … si aplica
session KOBRA_SESSION_COOKIE Cookie: … team/portal
auto (elige) según path default en call_route

Tools:

  • auth_profiles — qué está configurado
  • call_route(..., auth_profile="auto"|"partner"|…) — prueba real

Tools

Tool Uso
api_info base URL, auth flags, links a docs humanas
auth_profiles cómo autenticar cada perfil
refresh_openapi re-baja OpenAPI full + partner
list_routes filtrar method/tag/q
get_route detalle + schema + auth_hint
call_route HTTP real
smoke_public health + docs sin auth
smoke_partner /me + /summary con key
suggest_probe_plan plan de pruebas ordenado
docs_urls atajos Scalar/SDK

Flujo recomendado para la IA

1. api_info()
2. auth_profiles()
3. refresh_openapi()
4. list_routes(q="partner") o suggest_probe_plan(focus="partner")
5. get_route("GET", "/api/partner/v1/me")
6. call_route("GET", "/api/partner/v1/me", auth_profile="partner")
7. call_route writes solo en stage, con body del schema

Docs humanas (mismo backend)

URL Qué
{base}/docs Scalar API completa
{base}/partner/docs Scalar Partner
{base}/sdk SDK Python
{base}/openapi.json Schema full
{base}/api/partner/v1/openapi.json Schema partner

Defaults:

  • stage: https://stage.api.trykobra.com
  • prod: https://api.trykobra.com (+ KOBRA_ALLOW_PROD=1)

Tests

uv run pytest -q
KOBRA_MCP_LIVE=1 uv run pytest -q tests/test_client_live_optional.py

Seguridad

  • Secretos solo en env del proceso MCP
  • Headers sensibles se devuelven redactados al modelo
  • Prod bloqueado por default
  • No hay tool para “guardar” keys desde el chat

Licencia

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured