Skip to content

Conversation

@the-nick-fischer
Copy link

@the-nick-fischer the-nick-fischer commented Dec 12, 2025

This PR includes the following:

  • Implement needed changes on the chipmunk core: TOOL-516
    • Chipmunk internal MCP API]: Thin MCP API that bundles creation and interaction with the MCP client and server:
      • create and manage MCP API instances
      • run the MCP event loop to process incoming messages
      • methods to send messages to the MCP client and server
      • => application/apps/indexer/session/src/mcp_api/mod.rs
    • Chipmunk session changes:
      • Instantiate and start MCP server and client.
      • Send a mock test prompt
      • => application/apps/indexer/session/src/session.rs
    • Chipmunk state API: Example changes showcasing where UI triggers would be connected to the MCP API => application/apps/indexer/session/src/state/mod.rs
  • Implement a basic MCP client POC: TOOL-519
    • application/apps/indexer/session/src/state/mod.rs
    • new and start functions to create and spin up the MCP client (connecting to the MCP server)
    • run function that initializes conversation state and handles incoming messages (e.g. prompts form chipmunk) and processing of chat messages using the llm client
    • Abstraction layer for LLM clients => application/apps/indexer/mcp/src/client/llm/mod.rs
    • A mock LLM client that simulates LLM behavior without making actual API calls / without a HTTP client =>application/apps/indexer/mcp/src/client/llm/mock.rs

Note: Open topics or Notes are marked with // TODO:[MCP]
Note: contains log::warn!() statements for debug purposes. They will need to be removed / replaced by sensible debug statements.

Logical flow explained:

  • Chipmunk is started. In session.new()
  • The MCP server and client are instantiated
  • The MCP server is started
  • The MCP client is started
  • A mock prompt message is sent from chipmunk core via MCP api mpsc channel to the MCP client
  • The MCP client uses a mock LLM client to handle the prompt, which wants to make MCP tool call
  • The MCP client sends a tool invocation to the MCP server
  • The MCP server sends a tool / task request to the chipmunk core via mpsc channel
  • Chipmunk handles the request by sending a Search request via operations API
  • Result is returned to MCP server -> MCP client -> LLM client
  • LLM client sends a Final response

@the-nick-fischer the-nick-fischer force-pushed the mcp_client_poc branch 5 times, most recently from db65748 to b381781 Compare December 19, 2025 09:24
@the-nick-fischer the-nick-fischer marked this pull request as ready for review December 19, 2025 10:45
TOOL-519: Improve client start functions and rework errors.

TOOL-519: Implement mock LLM client prototype and conversation state

TOOL-519: Add mock prompt message.

TOOL-519: Finalize MCP client MOCK POC

TOOL-519: fix cargo warnings

TOOL-519: Minor tweaks.
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.

2 participants