Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions examples/mcp_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from helix.client import Client
from helix.mcp import MCPServer, ToolConfig
import asyncio

# Create a Helix client
helix_client = Client(local=True)

# Disable tools (eg. search_vector_text)
tool_config = ToolConfig(search_vector_text=False)

# Create an MCP server
mcp_server = MCPServer("helix-mcp", helix_client, tool_config=tool_config)

# Run the MCP server
# Defaults to streamable-http transport on localhost port 8000
# mcp_server.run()

# Run the MCP server in the background (non-blocking)
mcp_server.run_bg()

# Run the MCP server asynchronously
# async def main():
# await mcp_server.run_async()

# asyncio.run(main())
1 change: 1 addition & 0 deletions helix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from helix.providers import OllamaClient, OpenAIClient
from helix.schema import Schema
from helix.chunk import Chunk
from helix.mcp import MCPServer, ToolConfig

__version__ = "0.2.25"

Loading