Metadata-Version: 2.4
Name: bangc-mcp-server
Version: 0.2.2
Summary: Single-binary MCP server for embedded BangC, CNRT, and CNNL documentation search.
Author: BangC MCP contributors
License-Expression: MIT
Project-URL: Homepage, https://pypi.org/project/bangc-mcp-server/
Keywords: mcp,bangc,cambricon,mlu,cnrt,cnnl
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Documentation
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# 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`.

```bash
uvx bangc-mcp-server --mode stdio
```

HTTP mode is also available:

```bash
uvx bangc-mcp-server --mode http --addr 127.0.0.1:8765
```

## MCP Configuration

Use the `uvx` command as the MCP server command:

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

## 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`

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.

## 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.
