Skip to content

MCP server for introspection #229

Open
@diyor28

Description

@diyor28

Problem Statement:
We need to enable the Claude Code CLI to introspect the IOTA SDK using a Modal Context Protocol (MCP) server. This will provide structured access to documentation, signatures, and source code blocks through tool calls, leveraging a Retrieval-Augmented Generation (RAG) pipeline backed by an indexed knowledge base.

Proposed Solution:
Build an MCP server using mark3labs/mcp-go as the server framework. The server will support tool endpoints callable via Claude's modal tool API. The backend will index and retrieve content from the IOTA SDK codebase.

Note: Initial development has started under the mcp branch.

Supported Tools:

get_doc("github.com/iota-uz/iota-sdk/pkg/repo.Insert")
// → Returns docstring or summary from the knowledge base

get_signature("github.com/iota-uz/iota-sdk/pkg/repo.Insert")
// → Returns function/method signature

get_source("github.com/iota-uz/iota-sdk/pkg/repo.Insert")
// → Returns full source block from the SDK

seatch_similar("Go code block")
// → Returns similar code blocks from RAG

Architecture Overview:

  • Knowledge Indexer:
    Indexes IOTA SDK codebase and extracts docstrings, function signatures, and file structure.

  • RAG Retriever:
    Handles semantic lookups and matches query strings to indexed symbols.

  • MCP Server:
    Implements the protocol and serves tools using [mcp-go](https://github.com/mark3labs/mcp-go).

Transport Protocol (Pending Decision):

  • Still undecided between:
    • stdio: Ideal for CLI-native integration.
    • SSE: Suitable for networked environments and streamable responses.

Acceptance Criteria:

  • MCP server built using mark3labs/mcp-go
  • Supports get_doc, get_signature, and get_source tools
  • Indexed knowledge base from iota-sdk is integrated
  • Transport protocol (stdio vs SSE) is finalized
  • Tested with Claude Code CLI for real-time symbol queries
  • MVP merged from mcp branch

Additional Context:

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions