{
  "_notes": {
    "purpose": "Connect the same K2 stdio MCP server to any MCP-capable coding agent.",
    "supported_agent_examples": [
      "Claude Code: add this mcpServers entry to your MCP settings file.",
      "Cursor: add this server under mcpServers in Cursor settings.",
      "Codex: pass the equivalent mcp_servers.k2-coding-context-demo command, args, and env values in the CLI config."
    ],
    "credential_rule": "Keep K2_API_KEY and project/corpus IDs in environment variables or a local ignored config file; do not commit live credentials."
  },
  "mcpServers": {
    "k2-coding-context-demo": {
      "args": [
        "scripts/k2_java_rd_mcp_server.py"
      ],
      "command": "python",
      "env": {
        "K2_API_HOST": "https://api.knowledge2.ai",
        "K2_API_KEY": "${K2_API_KEY}",
        "K2_PROJECT_ID": "${K2_PROJECT_ID}",
        "K2_FLINK_CODE_CORPUS_ID": "${K2_FLINK_CODE_CORPUS_ID}",
        "K2_FLINK_DOCS_CORPUS_ID": "${K2_FLINK_DOCS_CORPUS_ID}",
        "K2_GUIDES_CORPUS_ID": "${K2_GUIDES_CORPUS_ID}",
        "K2_MCP_BACKEND": "sdk",
        "K2_MCP_COMPACT_TOOL_SURFACE": "true",
        "K2_MCP_RETRIEVAL_PROFILE": "java_exact"
      }
    }
  }
}
