nbmcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nbmcpget current weather in Paris"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nbmcp
nbmcp is a fast MCP server framework that gives Rust ownership of transport,
routing, and schema validation while Python owns the tool bodies.
Rust validates incoming tool arguments before Python executes the tool.
Python defines tool behavior with plain functions and type hints.
Supports
io,process, andcpuconcurrency modes.
π Benchmarks Β· π Comparison with FastMCP / Official SDK Β· πΊοΈ Roadmap
Why nbmcp
Most tool servers validate incoming JSON arguments in Python on every request.
nbmcp generates JSON schemas from Python function signatures at decoration time,
then hands those schemas to Rust for validation before Python executes the tool.
Benefits:
invalid calls are rejected before Python runs
validation overhead is lower
the Python tool body only executes after validation succeeds
blocking I/O in tools still releases the GIL normally
Related MCP server: Test MCP Server
Features
β Rust-side MCP JSON-RPC transport over stdio
β HTTP JSON-RPC transport with
/and/jsonrpcβ SSE event stream on
/eventsβ tool registration via
@mcp.tool(...)β resource registration via
mcp.resource(...)β prompt template registration via
mcp.prompt(...)β runtime discovery with
resources/list,prompts/list,resources/get,prompts/getβ prompt rendering via
prompts/renderβ type-hint-driven tool input schema generation
β Rust validation of tool-call payloads
β
io,process, andcpuconcurrency modes
Installation
Install from PyPI:
python3 -m pip install nbmcpFor local development, install the repository in editable mode (requires a Rust toolchain):
python3 -m pip install -e .If you want to install a development preview directly from GitHub:
python3 -m pip install git+https://github.com/rum1887/nbmcp.gitQuick start
from nbmcp import Nbmcp
mcp = Nbmcp("weather")
@mcp.tool(description="Get current weather for a city")
def get_weather(city: str, units: str = "celsius") -> dict:
return {"city": city, "temp": 24, "units": units}
if __name__ == "__main__":
mcp.run()Run the server:
python examples/weather_server.pyRun a client in another shell:
python examples/test_client.pyUsage
Standard stdio server
from nbmcp import Nbmcp
mcp = Nbmcp("weather")
@mcp.tool(description="Get current weather for a city")
def get_weather(city: str, units: str = "celsius") -> dict:
return {"city": city, "temp": 24, "units": units}
if __name__ == "__main__":
mcp.run()HTTP server
from nbmcp import Nbmcp
mcp = Nbmcp("weather")
@mcp.tool(description="Get current weather for a city")
def get_weather(city: str, units: str = "celsius") -> dict:
return {"city": city, "temp": 24, "units": units}
if __name__ == "__main__":
mcp.run_http("127.0.0.1:8080")The HTTP server accepts JSON-RPC POST requests on / or /jsonrpc and
exposes a simple SSE stream on /events.
Resources and prompts
from nbmcp import Nbmcp
mcp = Nbmcp("weather")
mcp.resource(
name="city_help",
content="Use the canonical city name and ISO country code when making requests.",
description="Shared documentation for tool callers",
)
mcp.prompt(
name="weather_summary",
template="City: {city}\nUnits: {units}\nProvide a concise weather summary.",
description="Prompt template placeholder for future agent workflows",
)Clients can then discover runtime assets via:
initializereturnsresourcesandpromptsresources/listandprompts/listresources/getandprompts/getprompts/render
Concurrency modes
@mcp.tool()
def get_weather(city: str) -> dict: ...
@mcp.tool(concurrency="process")
def count_primes(n: int) -> dict: ...
@mcp.tool(concurrency="cpu")
def analyze(data: list) -> dict: ...ioβ default mode; best for I/O-bound toolsprocessβ worker processes for CPU-bound workcpuβ separate interpreter on Python 3.14+, falling back toprocess
Development
Install the repository for local development:
python3 -m pip install -e .Optional developer dependencies:
python3 -m pip install ruff pytestRun tests and examples:
cargo test --lib
python examples/test_client.py
python examples/test_concurrency.pyPublishing to PyPI
Build source and wheel distributions:
python3 -m pip install build twine
python3 -m buildUpload to PyPI:
python3 -m twine upload dist/*If you do not want to publish immediately, install directly from GitHub:
python3 -m pip install git+https://github.com/<user>/nbmcp.gitPackaging notes
nbmcp is configured to build as a native extension with maturin.
If users install from source, a Rust toolchain is required unless prebuilt
wheels are available for their platform.
Project structure
src/β Rust implementation and PyO3 bridgepython/nbmcp/β Python public API and schema generationexamples/β sample server and client scripts
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rum1887/nbmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server