Technical Documentation

Using DFBE MCP

This guide explains how to connect your AI-powered development tools and supported MCP clients to the DFBE Documentation to enable AI-powered technical support for this monorepo.

1. Prerequisites

As this is a private package hosted on GitHub Packages, you must ensure your local environment is authenticated:

  1. GitHub Token: You need a Personal Access Token (PAT) with read:packages permission.
  2. npm Login: Run the following command and use your PAT as the password:
    npm login --registry=https://npm.pkg.github.com --scope=@dicoding-dev

2. General Configuration

Most AI tools use a similar configuration format to connect to an MCP server via npx. You typically need to add the following command to your tool's MCP settings:

  • Command: npx
  • Arguments: -y @dicoding-dev/dfbe-mcp

Example: Configuration Snippet

For tools that use a JSON-based configuration, add the server under the mcpServers key:

{ "mcpServers": { "dfbe-docs": { "command": "npx", "args": [ "-y", "@dicoding-dev/dfbe-mcp" ] } } }

3. How to Use with Your AI Assistant

Once connected, your AI assistant will have access to specialized tools to explore this project's documentation. You can ask it to:

  • Discover Docs: "Show me the available documentation for this project."
  • Contextual Search: "Search for how to implement custom steps in the form builder."
  • Analyze Logic: "Explain the rule engine internals based on the documentation."
  • Schema Lookup: "What is the validation schema for a date field?"

The assistant will automatically choose the most efficient tool (search_docs, get_doc_sections, or read_doc_section) to find the information it needs.

4. Troubleshooting

Authentication Errors (401/404)

If the tool fails to fetch the package, ensure your local .npmrc file (usually in your home directory) contains your GitHub token for the @dicoding-dev scope: //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN

Outdated Information

Documentation is bundled into the server package. If you have recently added new docs to /docs but they are not appearing in your AI assistant, a new version of the @dfbe/mcp package must be published to GitHub Packages.