diff --git a/README.md b/README.md index 9a24bfd..c9d0f59 100644 --- a/README.md +++ b/README.md @@ -94,11 +94,16 @@ Add to your Claude config file (`~/Library/Application Support/Claude/claude_des ### For Other MCP Clients +Any MCP-compatible client can launch the `rustchain-mcp` console script directly +(same as the Claude Desktop config above). To embed or run the server +programmatically, import the FastMCP server instance and run it: + ```python -from rustchain_mcp import RustChainMCPServer +from rustchain_mcp import mcp -server = RustChainMCPServer(api_key="your-api-key") -server.run() +# Configuration is read from environment variables (all optional): +# RUSTCHAIN_NODE, BOTTUBE_URL, BEACON_URL, RUSTCHAIN_TIMEOUT +mcp.run() # serves over stdio by default ``` ## Prerequisites diff --git a/rustchain_mcp/__init__.py b/rustchain_mcp/__init__.py index 640459d..dffc9c1 100644 --- a/rustchain_mcp/__init__.py +++ b/rustchain_mcp/__init__.py @@ -1,3 +1,12 @@ """RustChain + BoTTube MCP Server — AI agent tools for the RustChain blockchain and BoTTube video platform.""" __version__ = "0.4.0" + +# Re-export the FastMCP server instance so it can be used programmatically: +# from rustchain_mcp import mcp +# mcp.run() +# This is the same object the ``rustchain-mcp`` console script runs +# (see [project.scripts] in pyproject.toml -> rustchain_mcp.server:mcp.run). +from .server import mcp + +__all__ = ["mcp", "__version__"]