Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
No tool list is on record. This does not mean the server has no tools. Tools were not run.
No setup evidence yet No matching config or report on record. This does not mean the server is incompatible.
Fetched from the repository for this visit.
Nanoservices for notebooks.
Quickly and effortlessly expose your notebook's functions via a REST API.
Note: This library is designed to scaffold a small backend service for ease of development and prototyping purposes only. Not for production use.
pip install notebook-nanoservice
from notebook_nanoservice import NanoService
service = NanoService(globals())
service.start()
View your API manifest in multiple formats:
If you have a function such as:
def concat(a, b):
return a + b
It can be invoked at http://localhost:5001/api/concat?a=value1&b=value2
See test/sample.ipynb for examples of type casting the parameters.
service.stop()
The NanoService class is initialized to expose the global context of a Jupyter notebook or Python script via a REST API:
NanoService(global_context, host, port, include_source)
global_context (dict, required): The global context to expose. Typically passed as globals() from the notebook or script.host (str, optional): The host address for the server. Defaults to "127.0.0.1".port (int, optional): The port number for the server. Defaults to 5001.include_source (bool, optional): Whether to include the source code of functions in the metadata. Defaults to False.Multiple service instances can run simultaneously by having unique port numbers.
# in a different notebook
from notebook_nanoservice import NanoService
service = NanoService(globals(), port=5002)
service.start()
By default, all user-defined functions are exposed via the REST API. The ignore_functions property is a list of function names that the server will ignore when exposing the global context. By default, it includes functions like exit, quit, and others that are not meant to be exposed.
You can append to this list to exclude additional functions from being exposed. For example:
service.ignore_functions.append("my_function_to_ignore")
Contributions are welcome! Please submit a pull request or open an issue on the GitHub repository.
Install development dependencies:
pip install -r requirements.txt
Install the package locally: Open test/local_install.ipynb and follow instructions within.
This project is licensed under the MIT License. See the LICENSE file for details.
Loading reviews...
GitHub checked 256h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.