Skip to main content

BangC MCP Server

bangc-mcp-server is a self-contained MCP server for searching embedded BangC, CNRT, and CNNL reference material. It ships prebuilt Rust binaries and exposes a small Python launcher so the server can be started with uvx.

uvx bangc-mcp-server

HTTP mode is also available:

uvx bangc-mcp-server serve --http --addr 127.0.0.1:8765

The command line is organized around subcommands:

uvx bangc-mcp-server serve
uvx bangc-mcp-server serve --http --addr 127.0.0.1:8765
uvx bangc-mcp-server stats

Generate a clangd-compatible compilation database for .mlu files in the current project:

uvx bangc-mcp-server ccdb -r . -a mtp_372

The default output is the standard compile_commands.json file. Use -o compile_command.json only for tools that require a custom filename. The command also updates .vscode/settings.json with clangd arguments for --query-driver and --compile-commands-dir, and writes a small clangd-only shim under target/compile_commands/ so BANG built-in register helpers such as taskId and taskDimX resolve during indexing.

Compile a single .mlu file from the CLI:

uvx bangc-mcp-server compile-object kernel.mlu -a mtp_372
uvx bangc-mcp-server compile-extension kernel.mlu -a mtp_372 --smoke-import

MCP Configuration

Use the uvx command as the MCP server command:

{
  "mcpServers": {
    "bangc-docs": {
      "command": "uvx",
      "args": ["bangc-mcp-server"]
    }
  }
}

Included Tools

  • bangc_search
  • bangc_api_lookup
  • bangc_symbols
  • bangc_get_chunk
  • bangc_get_doc
  • bangc_tutorials
  • bangc_context_pack
  • bangc_list_documents
  • bangc_list_sources
  • neuware_api_search
  • neuware_api_lookup
  • neuware_env_check
  • mlu_device_query
  • python_torch_env_check
  • bangc_compile_torch_extension
  • bangc_compile_torch_extension_plan

The mlu_device_query tool uses bounded one-shot cnmon commands when the local Neuware runtime is available. Mutating or continuously refreshing monitor modes are intentionally not exposed.

The bangc_compile_torch_extension tool compiles a local .mlu file into a Python torch extension for debugging on a machine with Neuware, cncc, PyTorch, and torch_mlu installed. It generates a small pybind11 binding around the wrapper function and does not run task-specific reference checks. Successful compile results are intentionally compact; use bangc_compile_torch_extension_plan to inspect the full environment and command lines.

Supported Platforms

This package currently includes:

  • Windows x86_64
  • Linux x86_64, musl-linked

Set BANGC_MCP_SERVER_BIN=/path/to/bangc-mcp-server to override the bundled binary.

Notes

The package README intentionally avoids local filesystem paths, private environment output, usernames, hostnames, and device-specific command output.

Metadata

Release files for bangc-mcp-server 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bangc-mcp-server 0.3.7
File Size Uploaded
bangc_mcp_server-0.3.7.tar.gz 4.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for bangc-mcp-server 0.3.7
File Interpreter ABI Platform
bangc_mcp_server-0.3.7-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 MB

Release files / bangc_mcp_server-0.3.7.tar.gz

Download URL bangc_mcp_server-0.3.7.tar.gz
Size 4.8 MB
Tags Source
SHA-256 checksum
How to use checksums
955a7c3da2af6b3c94070cbf31b49f66016ae0729c787267c73ffda22bad28b6
BLAKE2b-256 checksum
How to use checksums
0c5f261cbab959fbfdfcc40049420ee4d74c20b0922eae1b5a2d8f03d79d0659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / bangc_mcp_server-0.3.7-py3-none-any.whl

Download URL bangc_mcp_server-0.3.7-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
76e12466cbb1ab0c7a0aa17a967bf250463c181db57a7d110f9215d69a0ad0e2
BLAKE2b-256 checksum
How to use checksums
16ce22464dc73ae3776ced1c48ab7986f00d2417d58754087bc764ed2e619707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.3.7 This release

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page