OpenCode teadustööks

Paigaldus, MCP-serverid ja näidisviibad. Iga ploki saab kopeerida nupuga. Nurksulgudes osad asenda oma andmetega.

1Paigalda OpenCode ja uv

Midagi muud pole vaja eelnevalt paigaldada. Kopeeri käsud ükshaaval ja vajuta pärast igaüht Enter.

macOS · Terminal

Ava Terminal: ⌘ + tühik, kirjuta „Terminal“.

curl -fsSL https://opencode.ai/install | bash
curl -LsSf https://astral.sh/uv/install.sh | sh

Windows · PowerShell

Ava PowerShell: Start-menüü, kirjuta „PowerShell“.

winget install --id SST.opencode -e --accept-source-agreements --accept-package-agreements
winget install --id astral-sh.uv -e --accept-source-agreements --accept-package-agreements

winget on Windows 10 ja 11 juba olemas. Kui käsku winget ei leita, paigalda Microsoft Store'ist „App Installer“.

Sulge terminal, ava uus ja kontrolli. Mõlemad käsud peavad näitama versiooninumbrit.

opencode --version
uvx --version

Kui tuleb „command not found“ või „ei tuvastatud“, on terminal jäänud uuesti avamata. uv on Pythoni tööriist, millega käivituvad arXivi ja Paper Searchi serverid. Pythonit pole vaja eraldi paigaldada.

2Käivita

mkdir uurimistoo
cd uurimistoo
opencode

Tasuta mudelid on kohe olemas. Mudeli vahetamiseks kirjuta /models.

3Lase OpenCode'il MCP-serverid lisada

Enne kopeerimist

Viibas on kolm nurksulgudes kohta. Asenda need enne saatmist.

  • [your email]: sinu enda e-posti aadress. Seda kasutab Unpaywall, mis leiab DOI järgi artikli seadusliku tasuta PDF-i. Registreeruda ega võtit hankida pole vaja, piisab aadressist. Näidisaadresse nagu test@example.com Unpaywall ei luba.
  • [CORE key] ja [Semantic Scholar key]: võtmed saad grupi sõnumist. Kui sul neid pole, jäta nurksulud alles: OpenCode jätab need read välja. Oma tasuta võtme saad aadressidelt core.ac.uk/services/api ja semanticscholar.org/product/api.

Võtmeid ära jaga avalikult ega pane neid slaididele.

Kopeeri see viip OpenCode'i, asenda nurksulgudes osad ja vajuta Enter.

Install these three MCP servers in OpenCode. Read each GitHub README first, then add the servers to my global OpenCode config file (opencode.json). Keep all existing settings.

1) Estonian MCP: https://github.com/silly-geese/estonian-mcp
   "estonian": type "remote", url "https://estonian-mcp.fly.dev/mcp"
2) arXiv MCP: https://github.com/blazickjp/arxiv-mcp-server
   "arxiv": type "local", command ["uvx", "arxiv-mcp-server"], timeout 60000
3) Paper Search MCP: https://github.com/openags/paper-search-mcp
   "paper-search": type "local", command ["uvx", "--with", "mcp<2", "paper-search-mcp"], timeout 60000, environment:
     "PAPER_SEARCH_MCP_UNPAYWALL_EMAIL": "[your email]"
     "PAPER_SEARCH_MCP_CORE_API_KEY": "[CORE key]"
     "PAPER_SEARCH_MCP_SEMANTIC_SCHOLAR_API_KEY": "[Semantic Scholar key]"

Leave out any environment variable that still has a [placeholder] in square brackets. Keep "mcp<2": the current paper-search-mcp release does not start with mcp 2.x. If the uvx command is missing, install uv. When you are done, show me the file contents and tell me where the file is.

Seejärel sulge OpenCode käsuga /exit ja käivita uuesti. Esimene käivitus võib võtta kuni minuti, sest uvx laadib serverid alla.

Käsitsi lisamine

Fail: macOS-is ~/.config/opencode/opencode.json. Teine võimalus on panna opencode.json kausta, kus OpenCode'i käivitad (töötab ka Windowsis).

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "estonian": {
      "type": "remote",
      "url": "https://estonian-mcp.fly.dev/mcp"
    },
    "arxiv": {
      "type": "local",
      "command": ["uvx", "arxiv-mcp-server"],
      "timeout": 60000
    },
    "paper-search": {
      "type": "local",
      "command": ["uvx", "--with", "mcp<2", "paper-search-mcp"],
      "timeout": 60000,
      "environment": {
        "PAPER_SEARCH_MCP_UNPAYWALL_EMAIL": "sinu@email.ee",
        "PAPER_SEARCH_MCP_CORE_API_KEY": "...",
        "PAPER_SEARCH_MCP_SEMANTIC_SCHOLAR_API_KEY": "..."
      }
    }
  }
}

4Kontrolli

Which MCP servers can you see? List the tools of each server.

Terminalis: opencode mcp list. Kõik kolm serverit peavad olema ühendatud.

5Näidisviibad

Kirjanduse otsing

Use paper-search to find papers on [topic] published in 2022–2026. List the 10 most relevant: title, authors, year, DOI and one sentence on the research question. Use only data returned by the tools. If a DOI is missing, write "no DOI".
Search arXiv for preprints on [topic] from the last 12 months. Group them by method and give the arXiv ID of each paper.

Artikli lugemine

Download arXiv paper [arXiv ID] and describe its method, dataset and main results. For each claim, name the section it comes from.
Compare papers [ID 1] and [ID 2]: research question, data, method and results. Present the comparison as a table.
Show the citation graph of arXiv paper [arXiv ID]: which works does it build on, and which works cite it?
Save the papers found in this conversation to a BibTeX file named references.bib.

Eesti keel

Use the estonian server to check the spelling and punctuation of this Estonian text. Give the rule for each correction. Do not change the content.

[text]
Translate this English abstract into Estonian. Check the spelling and case forms of the translation with the estonian server.

[text]
Find officialese (kantseliit) in this Estonian text and suggest simpler wording.

[text]

6Enne kui viite töösse paned

7Lingid

Veebitööriistad