Skip to content

Conversation

@tianAndrew
Copy link
Contributor

As title.

Purpose of the change

Add MemMachine Integration Guide for Klavis(Strata)

Description

This is a local Klavis integration using Strata (the Klavis MCP router) to proxy to a local MemMachine MCP server over HTTP (StreamableHTTP).

Fixes/Closes

Fixes #(issue number)

Type of change

[Please delete options that are not relevant.]

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g., code style improvements, linting)
  • Documentation update
  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)
  • Security (improves security without changing functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

[Please delete options that are not relevant.]

  • Unit Test
  • Integration Test
  • End-to-end Test
  • Test Script (please provide)
  • Manual verification (list step-by-step instructions)

Test Results: [Attach logs, screenshots, or relevant output]

(base) andrew@andrewdeMacBook-Pro klavis-demo % cat test.py 
import asyncio
import httpx
from mcp.client.streamable_http import streamablehttp_client
from mcp.client.session import ClientSession

MCP_URL = "http://127.0.0.1:8090/mcp/"  

def no_proxy_httpx_factory(headers=None, timeout=None, auth=None):
    return httpx.AsyncClient(headers=headers, timeout=timeout, auth=auth, trust_env=False)

async def main():
    print("MCP_URL =", MCP_URL)

    async with streamablehttp_client(
        MCP_URL,
        timeout=10,
        sse_read_timeout=30,
        httpx_client_factory=no_proxy_httpx_factory,
    ) as (read_stream, write_stream, get_session_id):

        async with ClientSession(read_stream, write_stream) as session:
            print("initializing...")
            caps = await session.initialize()
            print("session_id:", get_session_id())
            print("capabilities:", caps)

            print("listing tools...")
            tools = await session.list_tools()
            print("tools:", [t.name for t in tools.tools])

if __name__ == "__main__":
    asyncio.run(main())
(base) andrew@andrewdeMacBook-Pro klavis-demo % python test.py 
MCP_URL = http://127.0.0.1:8090/mcp/
initializing...
session_id: None
capabilities: meta=None protocolVersion='2025-06-18' capabilities=ServerCapabilities(experimental={}, logging=None, prompts=None, resources=None, tools=ToolsCapability(listChanged=False), completions=None) serverInfo=Implementation(name='strata-mcp-server', title=None, version='1.23.3', websiteUrl=None, icons=None) instructions=None
listing tools...
tools: ['discover_server_actions', 'get_action_details', 'execute_action', 'search_documentation', 'handle_auth_failure']

Checklist

[Please delete options that are not relevant.]

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

Screenshots/Gifs

[If applicable, add screenshots or GIFs that show the changes in action. This is especially helpful for API responses. Otherwise, delete this section or type "N/A".]

Further comments

[Add any other relevant information here, such as potential side effects, future considerations, or any specific questions for the reviewer. Otherwise, type "None".]

@tianAndrew tianAndrew self-assigned this Dec 16, 2025
@tianAndrew tianAndrew requested a review from Copilot December 16, 2025 07:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds integration documentation for connecting Klavis (specifically its Strata MCP router) to MemMachine's MCP server over HTTP using the StreamableHTTP transport.

  • Introduces a new integration guide for the Klavis/Strata platform
  • Provides step-by-step instructions for setting up HTTP-based MCP communication between Strata and MemMachine
  • Includes Python client examples and troubleshooting guidance

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
integrations/klavis/init.py Adds Python module initialization for the Klavis integration
integrations/klavis/GUIDE.md Comprehensive integration guide with setup instructions, code examples, and troubleshooting tips

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sscargal
Copy link
Contributor

Thanks @tianAndrew for adding the MemMachine Integration Guide for Klavis (Strata). I want some clarification to understand the contribution better and ensure we're documenting it as effectively as possible:

  1. Intent & Benefits:

    • For those who are not familiar with the project, a brief introduction to Klavis and a link to its GitHub and website would be good to include.
    • Could you elaborate on the primary intent of this integration guide?
      • What specific problem(s) does it solve?
      • What use case(s) benefit from using a proxy service?
  2. Documentation Enhancement:

    • For documentation, visual aids like figures and diagrams (including Mermaid diagrams, which render well in Markdown) can make the integration process more accessible. Do you think we should include any high-level or sequence diagrams to clarify workflows or integration architecture?
  3. Python Packaging Structure:

    • I noticed there is an __init__.py in the guide directory, but it seems there’s no accompanying Python code. Is there a particular reason we’re treating this as a Python module or package?
    • If it's only documentation, should we move it to the documentation /docs section (@SarahScargall can help you if required), or is there a plan to include scripts or code samples later on? I see the example Python code that can be included in the docs or

Copy link
Contributor

@SarahScargall SarahScargall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created PR#808 to reflect the contents of this PR for our docs.memmachine.ai site. I can add additional graphics to it, if desired.

It's not my decision on whether we want the guide to be in 2 places, but if that is the case, we'll want to remove lines 148-200+, as it's a duplicate of lines 1-147.

@tianAndrew
Copy link
Contributor Author

I have created PR#808 to reflect the contents of this PR for our docs.memmachine.ai site. I can add additional graphics to it, if desired.

It's not my decision on whether we want the guide to be in 2 places, but if that is the case, we'll want to remove lines 148-200+, as it's a duplicate of lines 1-147.

My mistake. The repetitive parts should have been deleted.

@tianAndrew
Copy link
Contributor Author

Thanks @tianAndrew for adding the MemMachine Integration Guide for Klavis (Strata). I want some clarification to understand the contribution better and ensure we're documenting it as effectively as possible:

  1. Intent & Benefits:

    • For those who are not familiar with the project, a brief introduction to Klavis and a link to its GitHub and website would be good to include.

    • Could you elaborate on the primary intent of this integration guide?

      • What specific problem(s) does it solve?
      • What use case(s) benefit from using a proxy service?
  2. Documentation Enhancement:

    • For documentation, visual aids like figures and diagrams (including Mermaid diagrams, which render well in Markdown) can make the integration process more accessible. Do you think we should include any high-level or sequence diagrams to clarify workflows or integration architecture?
  3. Python Packaging Structure:

    • I noticed there is an __init__.py in the guide directory, but it seems there’s no accompanying Python code. Is there a particular reason we’re treating this as a Python module or package?
    • If it's only documentation, should we move it to the documentation /docs section (@SarahScargall can help you if required), or is there a plan to include scripts or code samples later on? I see the example Python code that can be included in the docs or

1 &2: I think this should assume that the user is already using klavis. I might need to consider a better demo case. In fact, klavis agent (strata) can integrate multiple MCPS onto a single port, which is the significance of proxy. At the same time, a corresponding graph will be updated later. I'll consider these and there will be an update.
3: I think docs and integration should coexist. It's just that klavis doesn't need to be modified too much.

@tianAndrew tianAndrew marked this pull request as draft December 17, 2025 07:52
* Unifying docker-compose and docker compose (#774)

Signed-off-by: Honggyu Kim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants