Skip to main content

A simple MCP server for querying KBBI (Indonesian dictionary)

Project description

kbbi-mcp

CI PyPI Python License

An MCP server for querying KBBI (Kamus Besar Bahasa Indonesia / KBBI Daring).

Python: 3.13+

This project exposes a single, stable JSON tool output so LLM clients can decide how to format, translate, or summarize results.

Relationship to KBBI Daring

This project is unofficial and is not affiliated with or endorsed by the official KBBI Daring service.

Features

  • MCP tool: kbbi_lookup(query: str)
  • MCP resource: kbbi://{query} (same payload as kbbi_lookup)
  • Works without credentials (anonymous mode)
  • Optional authenticated mode via environment variables

Configure in an MCP client (JSON)

Most MCP clients (including Claude Desktop) use a JSON config with a top-level mcpServers object. This mcpServers format is an emergent standard across the MCP ecosystem (see: https://gofastmcp.com/integrations/mcp-json-configuration.md).

mcpServers-based clients (Claude Desktop / Cursor / Windsurf)

This matches the convention used by many Python MCP servers.

Where to put it:

  • Claude Desktop: ~/.claude/claude_desktop_config.json
  • Cursor: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
  • Windsurf: ~/.codeium/windsurf/mcp_config.json
{
	"mcpServers": {
		"kbbi": {
			"command": "uvx",
			"args": ["kbbi-mcp"]
		}
	}
}

Note: this example uses uvx (part of uv) to run the server. Install uv here: https://docs.astral.sh/uv/getting-started/installation/

If you don't want to depend on uv, install kbbi-mcp into an environment and point your client to that environment's executable. For example:

  • Use the console script (recommended when available): kbbi-mcp
  • Or run the module: python -m kbbi_mcp

Authenticated mode is optional. If you have KBBI Daring credentials, configure the environment variables described in Authentication (optional).

Local development (run from this repo)

You'll need uv installed: https://docs.astral.sh/uv/getting-started/installation/

This repo includes a fastmcp.json file that defines how to run the server (source + uv environment + stdio transport).

To run the server directly from this checkout:

fastmcp run

To generate an mcpServers entry you can paste into your MCP client config:

fastmcp install mcp-json fastmcp.json

Note: the generated configuration uses absolute paths so it works regardless of the client's working directory.

Tool: kbbi_lookup

Input

  • query (string): a word or phrase

Example tool arguments:

{
	"query": "makan"
}

Output

Returns a JSON object:

  • found (bool)
  • query (string)
  • url (string | null)
  • entries (list)
  • suggestions (list)
  • error (string, optional): present only when the request is invalid (e.g. empty query) or an unexpected error occurs

entries is based on KBBI's serialisasi() shape from the underlying kbbi library, with a small normalization:

  • etimologi is always present (as an object or null)
  • related-word lists are always present (as arrays, possibly empty)

This keeps the tool output stable across anonymous/authenticated mode.

Example tool output:

{
	"found": true,
	"query": "makan",
	"url": "https://kbbi.kemdikbud.go.id/entri/makan",
	"entries": [
		{
			"nama": "makan",
			"nomor": "",
			"kata_dasar": [],
			"pelafalan": "",
			"bentuk_tidak_baku": [],
			"varian": [],
			"makna": [],
			"etimologi": null,
			"kata_turunan": [],
			"gabungan_kata": [],
			"peribahasa": [],
			"idiom": []
		}
	],
	"suggestions": []
}

Resource: kbbi://{query}

This server also exposes the same payload as a read-only MCP resource.

  • kbbi://makan

For low-level debugging, a client would read it using resources/read with {"uri": "kbbi://makan"}.

Authentication (optional)

Anonymous mode works out of the box.

If you have KBBI Daring credentials, some additional fields may become available.

Set the following environment variables:

  • KBBI_EMAIL
  • KBBI_PASSWORD
  • KBBI_COOKIE_PATH (optional)

Most mcpServers-based clients support passing environment variables via env (all values must be strings). Example:

{
	"mcpServers": {
		"kbbi": {
			"command": "uvx",
			"args": ["kbbi-mcp"],
			"env": {
				"KBBI_EMAIL": "<YOUR_EMAIL>",
				"KBBI_PASSWORD": "<YOUR_PASSWORD>",
				"KBBI_COOKIE_PATH": "<OPTIONAL_PATH>"
			}
		}
	}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kbbi_mcp-0.0.3.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kbbi_mcp-0.0.3-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file kbbi_mcp-0.0.3.tar.gz.

File metadata

  • Download URL: kbbi_mcp-0.0.3.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kbbi_mcp-0.0.3.tar.gz
Algorithm Hash digest
SHA256 56eb11334b5f7cfaa5b64e7f4aabcebf4a1029676005d2188916085da519e4ee
MD5 64c4afd249c44dcd39f782e9247ed271
BLAKE2b-256 4083fb38e3a68be1f25e33a0726af8a6d86063fcc19f327d0aef9a43833a9da4

See more details on using hashes here.

File details

Details for the file kbbi_mcp-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: kbbi_mcp-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kbbi_mcp-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e4d785d501c1c20a67396ffd73217f8789b8ae2327e001b0d6f3c2964f95410
MD5 e2d8dcf13bc99fac9099f22486a62661
BLAKE2b-256 dad700b391d61b5f96a2c8b09beebf54ab27d6e188655ba923b5a2f6c3f612a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page