# Run the MCP server yourself

> Run the open-source EduBase MCP server locally with Node.js or Docker, or host it as a remote server with bearer token or OAuth, and limit what it can do.

The EduBase MCP server is open source, so you can run it yourself instead of using the one EduBase hosts: on your own computer for a desktop AI client, or on a server for your organization. Most people should use the hosted server described in [Connect Claude, ChatGPT or another assistant](https://help.edubase.net/ai/mcp-connect/); run your own when you need a local process, a restricted set of tools, or the server inside your own network.

## Before you start

- An EduBase API integration: its **API URL**, **App ID** and **Secret key** (see [The REST API](https://help.edubase.net/integrations/api/#get-credentials)), or an EduBase instance with OAuth for remote use.
- Node.js, or Docker.

## Run it locally for a desktop client

Add the server to your client's MCP configuration (for Claude Desktop, `claude_desktop_config.json`).

**With Node.js:**

```json
{
  "mcpServers": {
    "edubase": {
      "command": "npx",
      "args": ["-y", "@edubase/mcp"],
      "env": {
        "EDUBASE_API_URL": "https://domain.edubase.net/api",
        "EDUBASE_API_APP": "your_integration_app_id",
        "EDUBASE_API_KEY": "your_integration_secret_key"
      }
    }
  }
}
```

**With Docker**, use the image `edubase/mcp` (Docker Hub) or `ghcr.io/edubase/mcp`, for `linux/amd64` and `linux/arm64`, and pass the same three variables to `docker run -i --rm`.

Replace the domain with your EduBase address (`www.edubase.net` for the shared cloud).

## Host it as a remote server

Start the server in HTTP mode with `EDUBASE_STREAMABLE_HTTP_MODE=true` (or `EDUBASE_SSE_MODE=true`); it listens on port 3000 unless `EDUBASE_HTTP_PORT` says otherwise. Always put it behind HTTPS. Clients authenticate in one of three ways:

| Mode | How | Use |
|---|---|---|
| No client authentication | The server uses its own App ID and secret for everyone. | Testing or a closed network only. |
| Bearer token | Each client sends `Authorization: Bearer` with its base64-encoded `{app}:{secret}`. | Production. |
| OAuth 2.1 | With `EDUBASE_OAUTH=true`, clients discover EduBase as the authorization server, the user approves access on an EduBase consent screen, and an integration is created automatically. | Production; no keys to copy. |

## Limit what the server can do

| Variable | Effect |
|---|---|
| `EDUBASE_READONLY=true` | Only tools that read data are offered. |
| `EDUBASE_TOOLSETS` | A comma-separated list of the toolsets to enable, or `all`. |
| `EDUBASE_DYNAMIC_TOOLSETS=true` | Sessions start with the file tools only; the model enables toolsets as needed. |
| `EDUBASE_ELICITATION` | Asks the user to confirm changes that cannot be undone, where the client supports it (on by default). |
| `EDUBASE_FILEBIN_ALLOWED_HOSTS` | Hosts the file upload tool may fetch from. Private network addresses are blocked over HTTP unless `EDUBASE_ALLOW_PRIVATE_NETWORK=true`. |

The server can only do what the EduBase account behind the integration may do. See [What an assistant can and cannot do in your account](https://help.edubase.net/ai/mcp-security/).

## Related

- [The EduBase MCP server](https://help.edubase.net/ai/mcp/)
- [Connect Claude, ChatGPT or another assistant](https://help.edubase.net/ai/mcp-connect/)
- [What an assistant can and cannot do in your account](https://help.edubase.net/ai/mcp-security/)
- [EduBase MCP on GitHub](https://github.com/EduBase/MCP)
