Skip to main content
Glama

PDDikti API & MCP Server

CI Release License: AGPL-3.0-or-later MCP server OpenAPI 3.1 pddikti MCP server – quality and maintenance score on Glama

Open-source PDDikti API and PDDikti MCP server for Indonesian higher-education data from PDDikti (Pangkalan Data Pendidikan Tinggi): universities, study programs, lecturers, students, and aggregate statistics.

  • REST API with an OpenAPI 3.1 spec, Swagger UI, and ReDoc.

  • MCP server (Model Context Protocol) over stdio and Streamable HTTP, for Claude, Cursor, and other AI agents.

  • Web explorer to search a university and browse its profile.

Built with Bun, Hono, and Zod. Upstream Cloudflare clearance is automatic through FlareSolverr.

Bahasa Indonesia: API PDDikti dan MCP PDDikti tidak resmi dan open source. Dipakai untuk cek data perguruan tinggi, program studi, dosen, dan mahasiswa dari sistem PDDikti (dulu Forlap Dikti) lewat REST API, OpenAPI, atau AI agent. Lihat Ringkasan dalam Bahasa Indonesia.

Features

  • Typed REST API under /api/*, validated with Zod, with Swagger UI and ReDoc.

  • MCP server over stdio and Streamable HTTP, so AI agents can query the same data.

  • Web explorer: search a university and browse its profile, study programs, lecturers, and students.

  • Hands-off upstream access: a FlareSolverr sidecar refreshes the Cloudflare cookie on a 403. A password-protected config page is the manual fallback.

  • Optional Redis cache and optional API key for the REST surface.

  • One-command deployment with Docker Compose.

Related MCP server: pddikti-mcp-server

Contents

Quick start

Runs the API, a FlareSolverr sidecar, and Redis.

git clone https://github.com/andikadevs/pddikti.git
cd pddikti
cp .env.example .env    # set UPSTREAM_BASE_URL and REDIS_PASSWORD
docker compose up -d

The API container listens on port 3000 inside the Compose network and does not publish a host port. Route your reverse proxy to api:3000, or add a ports entry for local use. FlareSolverr and Redis stay internal.

Local (Bun)

Requires Bun 1.3 or newer.

bun install
cp .env.example .env    # set UPSTREAM_BASE_URL
bun run dev

Open http://localhost:3000.

Single container

Without the solver, refresh the Cloudflare cookie by hand on the config page.

docker build -t pddikti .
docker run -p 3000:3000 --env-file .env pddikti

Configuration

The service reads the environment once, in src/config.ts. Bun loads .env automatically. See .env.example for every variable.

Variable

Default

Purpose

PORT

3000

Listen port.

PUBLIC_BASE_URL

http://localhost:3000

Absolute base URL for docs links and secure cookies.

UPSTREAM_BASE_URL

none

Upstream base, https://pddikti.kemdiktisaintek.go.id/api.

UPSTREAM_TIMEOUT_MS

15000

Timeout per upstream request.

API_KEY

empty (off)

Protects /api/* with X-API-Key. Empty means public.

SESSION_TTL_S

86400

Lifetime of the SPA session and config cookies.

CONFIG_PASSWORD

empty (off)

Enables the /config page. Empty disables it.

CONFIG_STORE_PATH

./runtime-config.json

File for runtime overrides and the solved cookie.

SOLVER_ENABLED

false

Solve Cloudflare challenges with FlareSolverr on a 403.

SOLVER_URL

none

FlareSolverr /v1 endpoint.

CACHE_ENABLED / CACHE_TTL_S

false / 600

Optional Redis response cache.

CREDIT_LINE

Data © PDDikti

Attribution added to every JSON response.

IMPORTANT

For a public deployment, put a TLS-terminating reverse proxy in front, setPUBLIC_BASE_URL to the HTTPS URL, and set strong values for API_KEY and CONFIG_PASSWORD. See SECURITY.md for the full checklist.

Usage

REST API

Path

Description

/api/

Overview and service status

/api/docs

Swagger UI

/api/redoc

ReDoc

/api/openapi.json

Live OpenAPI document

A static copy of the spec lives in openapi.json for offline use.

When API_KEY is set, send it on every data request:

curl -H "X-API-Key: $API_KEY" http://localhost:3000/api/search/all/telkom/

Every JSON response includes a credit field. Upstream errors keep their HTTP status.

Web explorer

GET / serves a React app built with shadcn/ui on Base UI. Search a university to open its profile at /pt/<id>: headline statistics, then tabs for the overview (identity, costs, study duration, name history), study programs, all lecturers, and a student search. Light and dark themes are supported.

MCP server

The MCP server exposes about ten tools, such as search_pddikti, get_university, get_lecturer, and get_statistics. The tools use the same upstream client, cache, and credit envelope as the REST API.

Transport

How to run

Use for

stdio

bun run mcp

Local clients

Streamable HTTP

POST /mcp on the server

Remote clients

The tool catalog is at GET /mcp/tools (JSON) and /mcp/docs (readable view).

NOTE

/mcp is always public, even when API_KEY is set. Browser connectors cannot send a static header, so only the /api/* REST surface is key-protected.

MCP clients

pddikti MCP server – quality and maintenance score on Glama

Claude Code

# Local, over stdio
claude mcp add pddikti -- bun run /abs/path/to/pddikti/src/mcp/stdio.ts

# Remote, over HTTP
claude mcp add --transport http pddikti https://<host>/mcp

The repository also includes a project-scoped .mcp.json.

Claude Desktop and other stdio clients

Add the server to the client's config file, for example claude_desktop_config.json:

{
  "mcpServers": {
    "pddikti": {
      "command": "bun",
      "args": ["run", "/abs/path/to/pddikti/src/mcp/stdio.ts"],
      "env": {
        "UPSTREAM_BASE_URL": "https://pddikti.kemdiktisaintek.go.id/api",
        "CONFIG_STORE_PATH": "/abs/path/to/pddikti/runtime-config.json"
      }
    }
  }
}

Point CONFIG_STORE_PATH at the file the config page writes, so the stdio server reuses the same Cloudflare cookie. You can also set SOLVER_ENABLED and SOLVER_URL.

Claude.ai and other web clients

Add a custom connector with the URL https://<host>/mcp.

Test the server

bun run mcp:inspect    # MCP Inspector against the stdio server

curl -s https://<host>/mcp -X POST \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1"}}}'

Upstream access

The PDDikti backend is protected by Cloudflare bot management. Each request needs a cf_clearance cookie and the exact User-Agent it was issued to. Without them, the upstream returns 403. Without UPSTREAM_BASE_URL, /api/* returns 503.

You supply the cookie at runtime, not in .env:

  • Automatic. Set SOLVER_ENABLED=true and SOLVER_URL. On a 403, the service asks FlareSolverr to solve the challenge, saves the new cookie to CONFIG_STORE_PATH, and retries once. FlareSolverr runs its own headless browser, so this works on a server with no display.

  • Manual. Set CONFIG_PASSWORD and open /config. Paste the cookie and User-Agent, or a full "Copy as cURL" from your browser's DevTools. Changes apply without a restart and persist across restarts.

Development

Command

Purpose

bun run dev

Dev server; reloads the server and browser on changes

bun run start

Production server

bun run mcp

MCP server over stdio

bun run mcp:dev

MCP server over stdio with hot reload

bun run mcp:inspect

MCP Inspector against the stdio server

bun run openapi:export

Regenerate the static openapi.json

bun run typecheck

Type-check with tsc --noEmit

bun test

Run the test suite (no network access)

A change is done when bun run typecheck is clean and bun test is green.

Ringkasan dalam Bahasa Indonesia

Proyek ini menyediakan API PDDikti dan MCP server PDDikti yang bisa kamu jalankan sendiri. Datanya berasal dari PDDikti (Pangkalan Data Pendidikan Tinggi) milik Kemdiktisaintek, sistem yang dulu dikenal sebagai Forlap Dikti.

Yang bisa kamu lakukan:

  • Cek data perguruan tinggi: profil kampus, akreditasi, status, lokasi, biaya kuliah, dan riwayat nama.

  • Cek program studi (prodi): daftar prodi, jenjang, akreditasi, dan rasio dosen mahasiswa.

  • Cek data dosen: pencarian dosen dan daftar dosen per kampus atau prodi.

  • Cek data mahasiswa: pencarian mahasiswa berdasarkan nama atau NIM.

  • Statistik pendidikan tinggi: jumlah kampus, prodi, dosen, dan mahasiswa.

Cara pakai:

Kebutuhan

Pakai

Integrasi ke aplikasi atau backend

REST API /api/*, dokumentasi di /api/docs

AI agent (Claude, Cursor, dll.)

MCP server: bun run mcp atau POST /mcp

Cari kampus lewat browser

Web explorer di /

Mulai dari Quick start. Proyek ini tidak berafiliasi dengan PDDikti atau Kemdiktisaintek.

FAQ

Is this the official PDDikti API?

No. PDDikti does not publish a public API. This project is an unofficial, self-hosted proxy in front of the data that the PDDikti website uses. It is not affiliated with PDDikti or Kemdiktisaintek.

Apakah ini API PDDikti resmi?

Bukan. PDDikti tidak menyediakan API publik. Proyek ini adalah proxy tidak resmi yang kamu host sendiri, di depan data yang dipakai situs PDDikti.

What data can I get?

Universities (perguruan tinggi), study programs (program studi), lecturers (dosen), students (mahasiswa), and aggregate statistics. See openapi.json for every endpoint.

How do I use PDDikti with an AI agent?

Run the MCP server and add it to your client. See MCP clients for Claude Code, Claude Desktop, claude.ai, and other MCP clients.

Is there a hosted version?

No. Deploy your own instance with Docker Compose or Bun. See Quick start.

Bagaimana cara cek data mahasiswa atau dosen di PDDikti lewat API?

Panggil endpoint pencarian, misalnya GET /api/search/mhs/<nama-atau-nim>/ untuk mahasiswa atau GET /api/search/dosen/<nama>/ untuk dosen. Daftar lengkap ada di /api/docs.

Author

Built and maintained by Andika Dwi Saputra. See more projects and get in touch at andikadevs.space.

Contributing

Contributions are welcome. Read CONTRIBUTING.md and the Code of Conduct first. Report security problems privately, as described in SECURITY.md.

License

Copyright © 2026 Andika Dwi Saputra.

Licensed under the GNU Affero General Public License v3.0 or later. You may use, study, modify, and share this software. If you run a modified version as a network service, you must offer its complete source code to the service's users under the same license.

Disclaimer

This is a personal, non-commercial project for education and learning.

  • Not affiliated with or endorsed by PDDikti, Kemdiktisaintek, or Cloudflare. All upstream data is © PDDikti. Other names belong to their owners.

  • No warranty. The software is provided "as is", with no guarantee of accuracy, availability, or fitness for any purpose. See the license.

  • No liability for misuse. The author is not responsible for how this software is used or for any damage that results. You use it at your own risk.

  • Your responsibility. Follow all applicable laws and the terms of service of every system you reach, including the upstream's terms and its anti-bot and rate-limit protections. Do not use this software to overload, disrupt, or mass-scrape any service, or to process personal data unlawfully.

Available Tools

10 tools
get_lecturerGet lecturer infoB
Read-onlyIdempotent

Fetch one aspect of a single lecturer (dosen) as JSON: profile, teaching, research, or other records. Lecturer aspect. "profile" — Get lecturer profile; "study-history" — Get lecturer education history; "teaching-history" — Get lecturer teaching history; "penelitian" — Get lecturer research portfolio; "pengabdian" — Get lecturer service portfolio; "karya" — Get lecturer works portfolio; "paten" — Get lecturer patents portfolio.

Inputs: aspect (required), id_dosen (required).

get_statisticsGet aggregate statisticsA
Read-onlyIdempotent

Fetch one national aggregate statistic for Indonesian higher education as JSON. Needs no id; use it for country-wide counts, not for a single institution. Statistic metric. "mhs-count" — Get total student count; "mhs-count-active" — Get active student count; "mhs-count-gender" — Get student count by gender; "mhs-count-bidang-ilmu" — Get student count by field; "mhs-count-status" — Get student count by status; "mhs-count-jenjang" — Get student count by degree level; "mhs-count-kelompok-lembaga" — Get student count by institution group; "dosen-count" — Get total lecturer count; "dosen-count-active" — Get active lecturer count; "dosen-count-gender" — Get lecturer count by gender; "dosen-count-bidang" — Get lecturer count by field; "dosen-count-keaktifan" — Get lecturer count by activity; "dosen-count-jenjang" — Get lecturer count by degree; "dosen-count-ikatan" — Get lecturer count by affiliation; "pt-count" — Get total university count; "pt-count-province" — Get university count by province; "pt-count-kelompok-pembina" — Get university count by supervising group; "pt-count-akreditasi" — Get university count by accreditation; "pt-count-bentuk-pt" — Get university count by institution type; "prodi-count" — Get total study program count; "prodi-count-bidang-ilmu-terbanyak" — Get most common study program field; "prodi-count-kelompok-pembina" — Get study program count by supervising group; "prodi-count-bidang-ilmu" — Get study program count by field; "prodi-count-akreditasi" — Get study program count by accreditation; "prodi-count-jenjang" — Get study program count by degree level.

Inputs: metric (required).

get_studentGet student detailA
Read-onlyIdempotent

Fetch the public PDDikti record of one student (mahasiswa), such as university, study program, and enrollment status. There is no student list; find the id with search_pddikti (entity "mhs") by name or NIM. Returns JSON.

Inputs: id_mhs (required).

get_study_programGet study program infoA
Read-onlyIdempotent

Fetch one aspect of a single study program (program studi, prodi) as JSON. For its lecturer roster use get_study_program_lecturers. Study-program aspect. "detail" — Get study program detail; "desc" — Get study program description; "num-students-lecturers" — Get student and lecturer counts; "riwayat" — Get study program name history; "biaya-kuliah" — Get study program tuition range.

Inputs: aspect (required), id_prodi (required).

get_study_program_lecturersGet study program lecturersA
Read-onlyIdempotent

List the lecturers attached to one study program in a semester. Pass a returned lecturer id to get_lecturer for their profile. Returns a JSON list. Which lecturer set. "dosen-homebase" — Get homebase lecturers by semester; "dosen-penghitung-ratio" — Get lecturers used for ratio calculations.

Inputs: kind (required), id_prodi (required), semester (required).

get_universityGet university infoA
Read-onlyIdempotent

Fetch one aspect of a single university (perguruan tinggi, PT) as JSON, or its logo as an image. Use for profile, accreditation, and history questions about one university; for its study programs or lecturers use get_university_study_programs or get_university_lecturers. University aspect. "detail" — Get university detail; "rasio" — Get lecturer-student ratio by university; "mahasiswa" — Get university student metrics; "waktu-studi" — Get average study duration by university; "riwayat" — Get university name history; "biaya-kuliah" — Get tuition range by university; "fasilitas" — Get university facilities metadata; "logo" — University logo (image bytes).

Inputs: id_pt (required), aspect (required).

get_university_lecturersGet university lecturersA
Read-onlyIdempotent

List all lecturers of one university for a semester, merged across its active study programs and deduplicated. Slower than other tools because it fans out one request per program; prefer get_study_program_lecturers when one program is enough. Returns a JSON list.

Inputs: id_pt (required), semester (required).

get_university_study_programsGet university study programsA
Read-onlyIdempotent

List every study program (prodi) a university offered in one semester, with each program’s id. Pass a returned prodi id to get_study_program for details. Returns a JSON list.

Inputs: id_pt (required), semester (required).

list_study_programs_by_fieldList study programs by fieldA
Read-onlyIdempotent

List study programs nationwide for one field of study (bidang ilmu), for discovering which programs exist in a discipline. Needs no id. Returns a JSON list. Field of study (bidang ilmu). "agama" — religion; "ekonomi" — economics; "humaniora" — humanities; "kesehatan" — health; "mipa" — science; "pendidikan" — education; "pertanian" — agriculture; "seni" — arts; "sosial" — social; "teknik" — engineering.

Inputs: field (required).

search_pddiktiSearch PDDiktiA
Read-onlyIdempotent

Search Indonesian higher-education records by keyword and return matching entries with their opaque ids. Start here: every other tool needs an id from this search. Returns a JSON list (empty when nothing matches). Entity to search. "all" — all entities; "pt" — universities; "prodi" — study programs; "dosen" — lecturers; "mhs" — students.

Inputs: entity (required), keyword (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 10 tools

    Disambiguation4/5

    Tools mostly map to distinct resources and actions: search_pddikti finds IDs, get_* tools retrieve one entity or aspect, and list_study_programs_by_field supports nationwide discovery. The closest overlap is get_university_lecturers versus get_study_program_lecturers, but their scope and performance trade-off are clearly described, so confusion is limited.

    Naming Consistency4/5

    All names use snake_case with a recognizable verb_noun structure. Minor inconsistency appears where list-returning tools use get_ (get_university_lecturers, get_study_program_lecturers, get_university_study_programs) while another uses list_, and search_pddikti uses the server name rather than an entity noun.

    Tool Count5/5

    Ten tools is well within the appropriate 3–15 range for this domain. Each tool covers a distinct entity or operation, and the multi-aspect get_* tools consolidate related endpoints rather than inflating the surface.

    Completeness4/5

    The read-only surface covers search across all entity types, university/program/lecturer/student detail, national statistics, and field-based program discovery, with no obvious dead ends. Minor gaps remain: there is no general list-all-universities or list-all-lecturers operation, and student access is intentionally single-record only.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables AI clients to access official Indonesian statistical data from Badan Pusat Statistik (BPS) through natural language queries. It provides over 20 tools for retrieving demographic, economic, and trade data with support for bilingual responses and fuzzy domain matching.
      34
      773 npm
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search and access data from Indonesia's Science and Technology Index (SINTA), including lecturer profiles, journal accreditation, and scientific publications.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to discover and explore university research, researchers, academic programs, and institutional data from OpenAlex and the U.S. College Scorecard, returning source-linked results without fabricating facts.
      9
      MIT