Skip to main content

Single-binary MCP server for embedded BangC, CNRT, and CNNL documentation search.

Project description

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.

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.

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

bangc_mcp_server-0.3.3.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

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

bangc_mcp_server-0.3.3-py3-none-any.whl (4.7 MB view details)

Uploaded Python 3

File details

Details for the file bangc_mcp_server-0.3.3.tar.gz.

File metadata

  • Download URL: bangc_mcp_server-0.3.3.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for bangc_mcp_server-0.3.3.tar.gz
Algorithm Hash digest
SHA256 51b4b966f9fa8f815890a0d3aa929b2b4f1c5d0433a7d851b6575ab59f65fb96
MD5 29c921b07876e5411611f11d9c609503
BLAKE2b-256 84eae278dbef568cc182532890de6850887c308d67ab4d52d97c54f02d38e152

See more details on using hashes here.

File details

Details for the file bangc_mcp_server-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: bangc_mcp_server-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for bangc_mcp_server-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aa981347918fa8591eadbde4b7ba5e5148240b3a6fea0eb6e7df2461a8831a8e
MD5 67588dea33f1e346a353617a1089c0b9
BLAKE2b-256 8adf20240ef0a5b8eb390dc56532222fcf34e6208cbc8389cc2f6c69d5bc2310

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