spring-ai-playground

title: External connections description: Connect Spring AI Playground to your AI client (Claude, Cursor, Codex, VS Code), set up model providers (Ollama, OpenAI), and add external MCP servers.

External connections

Spring AI Playground sits between three kinds of connection - see How it all connects for the picture. This is the practical guide to wiring each one:

  1. the AI clients that consume the built-in MCP server,
  2. the model providers it runs on, and
  3. the external MCP servers it proxies.

Connect your AI clients

The app publishes a built-in MCP server in the same process as the UI:

Most clients connect over Streamable HTTP. Drop the matching config below in - it points at the default endpoint and uses spring-ai-playground as the server name (rename it to anything you like).

Claude Code{ .provider-icon } Claude Code - run (docs):

claude mcp add --transport http spring-ai-playground http://localhost:8282/mcp

Cursor{ .provider-icon } Cursor - ~/.cursor/mcp.json (docs):

{
  "mcpServers": {
    "spring-ai-playground": { "url": "http://localhost:8282/mcp" }
  }
}

VS Code{ .provider-icon } VS Code (Copilot) - .vscode/mcp.json (docs):

{
  "servers": {
    "spring-ai-playground": { "type": "http", "url": "http://localhost:8282/mcp" }
  }
}

Codex{ .provider-icon } Codex (CLI) - ~/.codex/config.toml (docs):

[mcp_servers.spring_ai_playground]
url = "http://localhost:8282/mcp"

opencode{ .provider-icon } opencode - ~/.config/opencode/opencode.json (docs):

{
  "mcp": {
    "spring-ai-playground": { "type": "remote", "url": "http://localhost:8282/mcp", "enabled": true }
  }
}

OpenClaw{ .provider-icon } OpenClaw - openclaw.json (docs):

{
  "mcpServers": {
    "spring-ai-playground": { "url": "http://localhost:8282/mcp" }
  }
}

Cline, Windsurf, Zed, and other MCP hosts follow the same pattern - add a Streamable HTTP (or SSE) server pointing at http://localhost:8282/mcp. Check your client’s MCP docs for the exact field names.

Claude{ .provider-icon } Claude Desktop. Its custom connectors (Settings -> Connectors) connect from Anthropic’s cloud, so they cannot reach a localhost server. To use the playground from Claude Desktop, either run it as a stdio server with the mcp-stdio profile and add it to claude_desktop_config.json, or expose the HTTP endpoint through a tunnel. See Build custom connectors via remote MCP.

Once connected, the client sees your Local-Pass tools - and any proxied or composed external tools - in its tools/list.

Connect model providers

Spring AI Playground is provider-agnostic, but the runtime defaults are tuned for a local-first Ollama experience. The app is currently centered on three runtime paths: Ollama, OpenAI, and OpenAI-compatible servers. (Spring AI itself supports many more providers - Anthropic, Google, Amazon, and others - but those are not part of the default desktop flow; you would fork and rebuild for them. See the Spring AI Chat Models reference.)

Ollama{ .provider-icon } Ollama (default)

The default profile is ollama - it serves both chat and embeddings locally, with no API key. Defaults:

Missing models are pulled automatically when first used; the selectable list controls the in-app model picker. In Docker, point at a host Ollama with SPRING_AI_OLLAMA_BASE_URL.

OpenAI{ .provider-icon } OpenAI

  1. provide OPENAI_API_KEY,
  2. activate the openai profile (or pick the OpenAI setting in the desktop launcher),
  3. launch.

Where you set the key depends on your install path: in the desktop app use the launcher’s Environment Variables section and pick the OpenAI config type; for Docker or source see Alternative Runtimes -> Switching to OpenAI.

OpenAI-compatible servers { #switching-to-openai-compatible-servers }

Point the openai provider at any server that exposes an OpenAI-style /v1 API - LM Studio, vLLM, llama.cpp, TabbyAPI, Ollama, and others:

spring:
  ai:
    model:
      chat: openai
      embedding: ollama
    openai:
      api-key: "not-used"              # a real key if the server requires auth
      base-url: "http://localhost:1234/v1"
      chat:
        options:
          model: "your-loaded-model"
          # extra-body: { top_p: 0.95, repetition_penalty: 1.1 }   # provider-specific, optional
Server base-url notes
Ollama{ .provider-icon } Ollama (compatible mode) http://localhost:11434/v1 local, no key
LM Studio{ .provider-icon } LM Studio http://localhost:1234/v1 model = the loaded model
vLLM{ .provider-icon } vLLM http://localhost:8000/v1 model = the HF repo id
llama.cpp{ .provider-icon } llama.cpp http://localhost:8080/v1 accepts extra-body (e.g. top_k)
TabbyAPI{ .provider-icon } TabbyAPI http://localhost:5000/v1 set a real api-key

Other useful keys: completions-path (only if the server deviates from the standard chat-completions path), http-headers (custom auth/transport), and maxTokens / maxCompletionTokens (use one, not both). Test the target with a /v1/models request first to confirm the exact model names and endpoint shape. Full field reference: Spring AI OpenAI Chat.

Embeddings and RAG. If you change the embedding model after documents are already indexed, existing vector data can become inconsistent - re-import or rebuild the vector database before trusting retrieval again.

Connect external MCP servers

The app ships a curated catalog of preset MCP servers (Gmail, Slack, GitHub, Notion, Stripe, BigQuery, and more). On the MCP Server screen, find the entry in the Inactive MCP section, click it to prefill the form, fill any ${ENV_VAR} placeholders, and Save & Connect. See Default MCP Servers for the full per-category browse.

For a server that is not in the catalog, use Add Custom Server on the same screen: pick the transport (Streamable HTTP / SSE / stdio), enter the URL or command, and set custom headers, OAuth 2.1, or ${ENV_VAR} substitution as needed. See MCP Server -> Add Custom Server.

Whatever you connect, you can re-publish it - proxy and compose its tools onto your own built-in server. Re-published tools are governed exactly like the ones you author: each gets a Risk Level score plus a description-poisoning scan (AI Agent Tool Safety, MCP Server Safety), a per-tool human-in-the-loop approval gate (Human-in-the-Loop), and full Observability (dashboards) - even for a server you did not build. You set the risk cap and approval per tool on the MCP Server Proxy, so your AI clients reach everything on one governed endpoint.