# MCP server

Connect your SKILLOK repositories to your own agent — Claude, ChatGPT, Cursor, VS Code — over the Model Context Protocol.

## What it is

MCP (Model Context Protocol) is an open protocol through which agents call the tools of services.
The SKILLOK MCP server makes your repositories the context of the agent you already use: it reads
files and issues, searches, manages issues and proposes changes — with the same rights you have on
the site.

SKILLOK is not one more chat over a model. Knowledge and code live here, and the model is a visiting
worker: the subscription can be changed, but the context stays in the repositories, in git, and opens
in any agent.

## How to connect

1. In your agent open «add a connector» (an MCP server) and paste the address
   `https://skillok.org/api/v1/mcp`.
2. The agent opens the SKILLOK **«Allow access»** page. Tick whether the agent may write and press
   **«Allow»**.

That is all. The access appears in **Settings → Access tokens** under the agent's name, where it can be
revoked. After 90 days the agent asks for permission again.

### If the agent cannot sign in by itself

Create a token in **Settings → Access tokens** (read only — the «read» right; issues and changes —
«write» as well) and pass it in a header:

```json
{
  "mcpServers": {
    "skillok": {
      "type": "http",
      "url": "https://skillok.org/api/v1/mcp",
      "headers": { "Authorization": "Bearer sk_…" }
    }
  }
}
```

## Where the project context lives

The context lives in repositories — as files, in git:

| What | Where | Who sees it |
|---|---|---|
| Rules for the agent | the `AGENTS.md` file at the repository root | every agent: Codex, Cursor, Copilot, Claude Code (by importing `@AGENTS.md`) and SKILLOK |
| Project memory: decisions, notes, results | the **context repository** — an ordinary repository linked to the main one | the agent reads it together with the main one and writes notes there |
| What the agent may do | **Repository settings → AI → Agents** | the repository owner |

The **context repository** is linked in the settings of the main repository. One context can serve
several repositories — for example, the frontend, the backend and the documentation of a project. The
agent writes notes to the context directly, and to the main repository only through a pull request.

Keep `AGENTS.md` short: rules, conventions, how to build and check. Reference material and the
history of decisions go into the context repository: long rules get in the agent's way and cost money
on every request.

## What the agent may do

The owner picks the level in **Repository settings → AI → Agents**:

| Level | What is allowed |
|---|---|
| Read only | files, issues, search |
| Read and manage issues | also open issues, reply, change and close them, labels |
| Everything | also changes through pull requests and notes in the context repository |

The level only narrows: the agent can write only if you can, and only if the token was issued with
write rights. The agent cannot merge pull requests or delete anything — a person decides that.

## Tools

| Tool | What it does |
|---|---|
| `get_project_context` | the `AGENTS.md` rules, what the agent may do, the context repository and its files — start here |
| `list_repositories` | your repositories and those of organizations with AI enabled |
| `list_files`, `read_file`, `search` | files, text with line numbers, search |
| `list_issues`, `read_issue` | issues and pull requests |
| `create_issue`, `comment`, `update_issue` | open, reply, change or close, labels |
| `propose_change` | an `llm/…` branch and a pull request |
| `save_note` | a note in the context repository |

The server also offers the same context as the `skillok://owner/name/context` resource — for agents
that can attach resources.

## How to save money

* Connect SKILLOK to your own agent: requests go through your subscription, not a SKILLOK key.
* Keep `AGENTS.md` short and the memory in the context repository: the agent reads it piece by piece
  when needed.
* Providers cache an identical beginning of a request (rules, tools) and charge from half to a tenth
  of the price for it.

## Protocol versions

2025-11-25, 2025-06-18 and 2025-03-26, without sessions: every request is a separate JSON-RPC message.
Sign-in is OAuth 2.1 with PKCE (client registration or a client document at an address) or a token in
a header.

---

https://skillok.org/docs/en/account/mcp
