# codesearch MCP server

> Enables AI clients to search code, packages, documentation, academic papers, and vulnerability data across multiple technical sources.

- Repository: https://github.com/SK-DEV-AI/codesearch
- Page: https://hostedmcp.org/servers/sk-dev-ai/codesearch
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 1.0.1

## Install

### Claude Code

```sh
claude mcp add --env GROQ_API_KEYS=<YOUR_GROQ_API_KEYS> --env NV_KEY=<YOUR_NV_KEY> --env S2_KEY=<YOUR_S2_KEY> --env SE_KEY=<YOUR_SE_KEY> --env TAVILY_KEYS=<YOUR_TAVILY_KEYS> codesearch -- uvx skdev-codesearch-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "codesearch": {
      "command": "uvx",
      "args": [
        "skdev-codesearch-mcp"
      ],
      "env": {
        "GROQ_API_KEYS": "<YOUR_GROQ_API_KEYS>",
        "NV_KEY": "<YOUR_NV_KEY>",
        "S2_KEY": "<YOUR_S2_KEY>",
        "SE_KEY": "<YOUR_SE_KEY>",
        "TAVILY_KEYS": "<YOUR_TAVILY_KEYS>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "codesearch": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "skdev-codesearch-mcp"
      ],
      "env": {
        "GROQ_API_KEYS": "<YOUR_GROQ_API_KEYS>",
        "NV_KEY": "<YOUR_NV_KEY>",
        "S2_KEY": "<YOUR_S2_KEY>",
        "SE_KEY": "<YOUR_SE_KEY>",
        "TAVILY_KEYS": "<YOUR_TAVILY_KEYS>"
      }
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "codesearch": {
      "command": "uvx",
      "args": [
        "skdev-codesearch-mcp"
      ],
      "env": {
        "GROQ_API_KEYS": "<YOUR_GROQ_API_KEYS>",
        "NV_KEY": "<YOUR_NV_KEY>",
        "S2_KEY": "<YOUR_S2_KEY>",
        "SE_KEY": "<YOUR_SE_KEY>",
        "TAVILY_KEYS": "<YOUR_TAVILY_KEYS>"
      }
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.codesearch]
command = "uvx"
args = ["skdev-codesearch-mcp"]

[mcp_servers.codesearch.env]
GROQ_API_KEYS = "<YOUR_GROQ_API_KEYS>"
NV_KEY = "<YOUR_NV_KEY>"
S2_KEY = "<YOUR_S2_KEY>"
SE_KEY = "<YOUR_SE_KEY>"
TAVILY_KEYS = "<YOUR_TAVILY_KEYS>"
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "codesearch": {
      "command": "uvx",
      "args": [
        "skdev-codesearch-mcp"
      ],
      "env": {
        "GROQ_API_KEYS": "<YOUR_GROQ_API_KEYS>",
        "NV_KEY": "<YOUR_NV_KEY>",
        "S2_KEY": "<YOUR_S2_KEY>",
        "SE_KEY": "<YOUR_SE_KEY>",
        "TAVILY_KEYS": "<YOUR_TAVILY_KEYS>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `GROQ_API_KEYS` | no | yes | Optional. Groq keys for synthesis and query rewriting. |
| `NV_KEY` | no | yes | Optional. NVIDIA embeddings for ranking. |
| `S2_KEY` | no | yes | Optional. Semantic Scholar key (1 RPS). |
| `SE_KEY` | no | yes | Optional. Stack Exchange key (10k/day instead of 300). |
| `TAVILY_KEYS` | no | yes | Optional. Tavily search lane. |

## Tools (14)

- `analyze`
- `search_all`
- `code_search`
- `searchcode`
- `wiki`
- `search_package`
- `pkg`
- `search_libraries`
- `vulns`
- `docs`
- `so_search`
- `papers`
- `enrich`
- `ping`

## FAQ

### What can I search for with this server?

You can search for code, packages, documentation, academic papers, and vulnerability data.

### How can I analyze an unfamiliar repository?

Use the analyze tool to get GitHub metadata, code quality, and wiki architecture in a single call.

### Can I search for vulnerabilities in specific packages?

Yes, the vulns tool allows you to scan for vulnerabilities using Sonatype Guide and OSV.dev.
