Skip to content

feat: internal MCP server — agent self-introspection of lmcode capabilities #37

@VforVitorio

Description

@VforVitorio

What problem does this solve?

Small local models often lack knowledge of lmcode itself, so they give inaccurate answers to meta-questions like "what commands can I use?" or "what tools do you have?" — relying on training data rather than live state.

Proposed solution

Add an internal MCP (Model Context Protocol) server that exposes lmcode's own capabilities — slash commands, registered tools, current config, and session state — as MCP resources and tools.

This is a separate internal MCP server from the public FastMCP integration discussed elsewhere. It is not user-facing; it runs in-process and is only accessible to the agent itself.

Resources to expose:

  • lmcode://commands — list of all slash commands with descriptions
  • lmcode://tools — registered tools with their signatures and docstrings
  • lmcode://config — current settings (model, mode, verbose, etc.)
  • lmcode://session — turn count, context tokens used, active file

Target version: Pin to the same milestone as the broader MCP / agent-mode work (v0.4.0 or later).

Alternatives considered

None considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions