Building an MCP Server for Searching the Koui Genji Monogatari Text DB

Overview This is a memo on building an MCP server for searching the Koui Genji Monogatari Text DB. As an example, it can be used from Claude Desktop as follows: https://youtu.be/8s2R9V2hEvc?si=p9SW-IvhdNSzwTLN Background In the following article, I introduced the construction of an API server for searching the Koui Genji Monogatari Text DB. As an application of this, I built an MCP server to try interacting with AI agents. ...

June 26, 2025 · 3 min · Nakamura

Building an API Server for Searching the Koui Genji Monogatari Text DB

Overview This is a personal note on building an API server for searching the Koui Genji Monogatari (Collated Tale of Genji) Text DB. https://genji-api.aws.ldas.jp/ Background The following page publishes text data of “Koui Genji Monogatari” in TEI/XML compliant format. https://kouigenjimonogatari.github.io/ I created an API that registers this text data in Elasticsearch and enables searching by section (koma). Usage The following URL provides access to the documentation page using OpenAPI and Swagger. ...

June 25, 2025 · 24 min · Nakamura

Enabling OpenAPI in Drupal

Overview I had the opportunity to enable OpenAPI in Drupal, so this is a memo. Note that the JSON:API module has already been enabled. Installing Modules Install the following two modules. https://www.drupal.org/project/openapi https://www.drupal.org/project/openapi_jsonapi As a result, JSON can be obtained from the following URL. /openapi/jsonapi Accessing the following displays “No UI …”. Next, let’s add a UI. /admin/config/services/openapi Adding a UI Install the following two modules. https://www.drupal.org/project/openapi_ui https://www.drupal.org/project/openapi_ui_redoc ...

June 14, 2023 · 1 min · Nakamura

Creating a REST API Using OpenAPI and AWS CDK (OpenSearch Connection and Custom Domain)

Overview I had the opportunity to create a REST API using OpenAPI and AWS CDK, so this is a memo. The following article was very helpful. https://zenn.dev/taroman_zenn/articles/91879cec40627c The project created this time is published in the following repository. https://github.com/nakamura196/CdkOpenapi Connecting to OpenSearch The implementation is done in the following Lambda. https://github.com/nakamura196/CdkOpenapi/blob/main/lambda/search.ts Environment variables need to be passed to the Lambda, and the following was written in the ts file under lib. ...

May 26, 2023 · 3 min · Nakamura

Specifying the Initial Specification to Display in Swagger UI Demo via GET Parameter

The Swagger UI demo is available at the following link. https://petstore.swagger.io/ By appending ?url=(URL to a JSON or YAML file) to the above URL, you can specify the initial specification to display. Here, we will use the following publicly available examples. https://github.com/OAI/OpenAPI-Specification For example, you can specify it as follows. https://petstore.swagger.io/?url=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/api-with-examples.yaml I hope this serves as a useful reference when sharing specifications with others.

September 9, 2022 · 1 min · Nakamura