Development · MODEL CONTEXT PROTOCOL

sarathsp06 sourcesage

MCP server to cache codebase as graph

WHAT IT CONNECTS

What sarathsp06 sourcesage gives an AI Agent

  • **Language Agnostic**: Works with any programming language the LLM understands
  • **Knowledge Graph Storage**: Efficiently stores code entities, relationships, patterns, and style conventions
  • **LLM-Driven Analysis**: Relies on the LLM to analyze code and provide insights
  • **Token-Efficient Storage**: Optimizes for minimal token usage while maximizing memory capacity
  • **Incremental Updates**: Updates knowledge when code changes without redundant storage
  • **Fast Retrieval**: Enables quick and accurate retrieval of relevant information
  • The LLM analyzes code files (in any language)
  • The LLM uses MCP tools to register entities, relationships, patterns, and style conventions
  • SourceSage stores this knowledge in a token-efficient graph structure
  • The LLM can later query this knowledge when needed
  • Open Claude for Desktop
  • Go to Settings > Developer > Edit Config
  • Add the following to your `claude_desktop_config.json`:
  • Restart Claude for Desktop
  • **register_entity**: Register a code entity in the knowledge graph
  • name: Name of the entity (e.g., class name, function name)
  • entity_type: Type of entity (class, function, module, etc.)
  • summary: Brief description of the entity
  • signature: Entity signature (optional)
  • language: Programming language (optional)
  • observations: List of observations about the entity (optional)
  • metadata: Additional metadata (optional)
  • **register_relationship**: Register a relationship between entities
  • from_entity: Name of the source entity
  • to_entity: Name of the target entity
  • relationship_type: Type of relationship (calls, inherits, imports, etc.)
  • metadata: Additional metadata (optional)
  • **register_pattern**: Register a code pattern
  • name: Name of the pattern
  • description: Description of the pattern
  • language: Programming language (optional)
  • example: Example code demonstrating the pattern (optional)
  • metadata: Additional metadata (optional)
  • **register_style_convention**: Register a coding style convention
  • name: Name of the convention
  • description: Description of the convention
  • language: Programming language (optional)
  • examples: Example code snippets demonstrating the convention (optional)
  • metadata: Additional metadata (optional)
  • **add_entity_observation**: Add an observation to an entity
  • entity_name: Name of the entity
  • observation: Observation to add
  • **query_entities**: Query entities in the knowledge graph
  • entity_type: Filter by entity type (optional)
  • language: Filter by programming language (optional)
  • name_pattern: Filter by name pattern (regex, optional)
  • limit: Maximum number of results to return (optional)
  • **get_entity_details**: Get detailed information about an entity
  • entity_name: Name of the entity
  • **query_patterns**: Query code patterns in the knowledge graph
  • language: Filter by programming language (optional)
  • pattern_name: Filter by pattern name (optional)
  • **query_style_conventions**: Query coding style conventions
  • language: Filter by programming language (optional)
  • convention_name: Filter by convention name (optional)
  • **get_knowledge_statistics**: Get statistics about the knowledge graph
  • **clear_knowledge**: Clear all knowledge from the graph
  • **Analyze Code**: Ask Claude to analyze your code files
  • **Register Entities**: Claude will use the register_entity tool to store code entities
  • **Register Relationships**: Claude will use the register_relationship tool to store relationships
  • **Query Knowledge**: Later, ask Claude about your codebase
  • **Get Coding Patterns**: Ask Claude about coding patterns
  • **Leverages LLM Understanding**: Uses the LLM's ability to understand code semantics across languages
  • **Stores Semantic Knowledge**: Focuses on meaning and relationships, not just syntax
  • **Is Language Agnostic**: Works with any programming language the LLM understands
  • **Optimizes for Token Efficiency**: Stores knowledge in a way that minimizes token usage
  • **Evolves with LLM Capabilities**: As LLMs improve, so does code understanding

SECURITY

An MCP listing is not a security review

An MCP server may receive model context, credentials, local files, or permission to call external systems. Review its code, requested environment variables, network behavior, package provenance, and maintenance status before connecting it to an agent.