Command Line

Use the SecDim MCP Server from the terminal with any MCP-capable CLI. This is ideal for scriptable workflows, CI hooks, or when you prefer the shell over a full IDE.

Configuration

Create (or update) your MCP client config so it knows about the secdim server.

Example: ~/.mcp/config.json
{
  "mcpServers": {
    "secdim": {
      "type": "http",
      "url": "https://mcp.secdim.dev/mcp"
    }
  }
}

Basic Usage

Below, mcp represents your MCP client’s command. The exact verb may vary (e.g., query, ask, run). Replace it with whatever your CLI uses.

# Personalised pathway
mcp query secdim "Give me a personalised secure coding learning path in Python"

# Find a lab by vulnerability
mcp query secdim "Find me a lab on SQL Injection"

# Practice labs based on detected issues
mcp query secdim "List practice labs related to the vulnerabilities in my code"

Many CLIs support --json or --output file.json. Use these to pipe results into scripts or CI.

Vim / Neovim Integration

Neovim (Lua)

Put this in ~/.config/nvim/lua/secdim.lua (or inline in your init.lua), then map a key.

local function secdim_prompt()
  vim.ui.input({ prompt = "SecDim MCP query: " }, function(q)
    if not q or q == "" then return end
    -- Run MCP as a job and capture output into a scratch buffer
    local cmd = { "mcp", "query", "secdim", q }
    vim.fn.jobstart(cmd, {
      stdout_buffered = true,
      on_stdout = function(_, data)
        if not data then return end
        local buf = vim.api.nvim_create_buf(true, true)
        vim.api.nvim_buf_set_lines(buf, 0, -1, false, data)
        vim.api.nvim_set_current_buf(buf)
        vim.bo[buf].filetype = "markdown"
        vim.bo[buf].bufhidden = "wipe"
        vim.api.nvim_buf_set_name(buf, "SecDim MCP Result")
      end
    })
  end)
end

vim.api.nvim_create_user_command("SecDimMCP", secdim_prompt, {})
vim.keymap.set("n", "<leader>sp", ":SecDimMCP<CR>", { desc = "SecDim MCP prompt" })

Vimscript (Vim)

Add to your .vimrc:

function! SecDimMCP()
  let q = input('SecDim MCP query: ')
  if empty(q)
    return
  endif
  " Capture output into a new scratch buffer
  new
  setlocal buftype=nofile bufhidden=wipe noswapfile filetype=markdown
  execute 'read !mcp query secdim ' . shellescape(q)
  1delete _
endfunction

nnoremap <leader>sp :call SecDimMCP()<CR>

Emacs Integration

Add a lightweight command that prompts for a query and shows results in a buffer.

(defun secdim-mcp (query)
  "Send QUERY to the SecDim MCP server via an MCP CLI."
  (interactive "sSecDim MCP query: ")
  (let* ((buf (get-buffer-create "*SecDim MCP*"))
         (cmd (format "mcp query secdim %s" (shell-quote-argument query))))
    (with-current-buffer buf
      (read-only-mode -1)
      (erase-buffer)
      (insert (format "▶ %s\n\n" cmd))
      (let ((exit (call-process-shell-command cmd nil buf t)))
        (goto-char (point-min))
        (markdown-mode)
        (read-only-mode 1)
        (display-buffer buf)))))

(global-set-key (kbd "C-c s p") #'secdim-mcp)

If your MCP CLI supports JSON output, you can swap call-process-shell-command for a variant that parses JSON and pretty-prints with json-mode or jq before inserting.

Automation Examples

Save a learning plan to a file (for code review prep):

mcp query secdim "Give me a personalised secure coding learning path in Java" > learning-path.md

Pipe labs into jq (if your CLI supports JSON):

mcp query secdim --json "Find me labs on XSS" | jq '.labs[] | {title, url}'

Troubleshooting

  • Command not found → Ensure your MCP client is installed and on PATH. If it uses a different binary name, update the examples accordingly.

  • Server not found → Check reachability of https://mcp.secdim.dev/mcp (proxy, VPN, corporate egress).

  • Config not loaded → Confirm your client reads ~/.mcp/config.json or point it via its --config flag.

  • No labs returned → Try browsing directly at https://play.secdim.com/browse