Synapse

Synapse

Synapse indexes C# codebases into a FalkorDB-backed graph to provide deep structural insights including inheritance, interface implementations, and call chains. It enables AI assistants to query code architecture and navigate symbol relationships using an LSP-powered MCP server.

Category
访问服务器

README

Synapse

Work in progress. Synapse is under active development. APIs, CLI commands, and graph schema may change without notice.

Synapse is an LSP-powered, FalkorDB-backed tool that builds a queryable graph of a C# codebase. It indexes symbols, inheritance, interface implementations, method calls, and override relationships, then exposes them via an MCP server (for AI assistants) and a CLI (for humans).

Prerequisites

  • Python 3.11+
  • FalkorDB running on localhost:6379 (default)
  • .NET SDK — required for the C# language server to index projects

Start FalkorDB with Docker:

docker run -p 6379:6379 --rm falkordb/falkordb:latest

Installation

pip install -e .

This installs two entry points:

  • synapse — CLI
  • synapse-mcp — MCP server

MCP Server Setup

Add Synapse to your MCP client config (e.g. Claude Desktop's claude_desktop_config.json):

{
  "mcpServers": {
    "synapse": {
      "command": "synapse-mcp"
    }
  }
}

By default the server connects to FalkorDB at localhost:6379. There are no required environment variables.


CLI

synapse <command> [args]

Project management

Command Description
synapse index <path> [--language csharp] Index a project into the graph
synapse watch <path> Watch a project for file changes and keep the graph updated (runs until Ctrl+C)
synapse delete <path> Remove a project and all its graph data
synapse status [path] Show index status for one project, or list all indexed projects

Graph queries

Command Description
synapse symbol <full_name> Get a symbol's node and its relationships
synapse source <full_name> [--include-class] Print the source code of a symbol
synapse callers <method_full_name> Find all methods that call a given method
synapse callees <method_full_name> Find all methods called by a given method
synapse implementations <interface_name> Find all concrete implementations of an interface
synapse hierarchy <class_name> Show the full inheritance chain for a class
synapse search <query> [--kind <kind>] Search symbols by name, optionally filtered by kind (e.g. method, class)
synapse type-refs <full_name> Find all symbols that reference a given type
synapse dependencies <full_name> Find all types referenced by a given symbol
synapse context <full_name> Get the full context needed to understand or modify a symbol
synapse query <cypher> Execute a raw read-only Cypher query against the graph

Summaries

Summaries are free-text annotations attached to any symbol — useful for capturing architectural context that the graph alone doesn't convey.

Command Description
synapse summary get <full_name> Get the summary for a symbol
synapse summary set <full_name> <content> Set the summary for a symbol
synapse summary list [--project <path>] List all symbols that have summaries

Examples

# Index a C# project
synapse index /path/to/my/project

# Find everything that calls a specific method
synapse callers "MyNamespace.MyClass.DoWork"

# Find all classes that implement an interface
synapse implementations "IOrderService"

# See the inheritance hierarchy of a class
synapse hierarchy "MyNamespace.BaseController"

# Search for all methods containing "Payment"
synapse search "Payment" --kind method

# Get the source code for a method
synapse source "MyNamespace.MyClass.DoWork"

# Get all context needed to understand a symbol
synapse context "MyNamespace.MyClass"

# Watch for live updates while developing
synapse watch /path/to/my/project

MCP Tools

These tools are available to any MCP client connected to synapse-mcp.

Project management

Tool Parameters Description
index_project path: str, language: str = "csharp" Index a project into the graph
list_projects — List all indexed projects
delete_project path: str Remove a project from the graph
get_index_status path: str Get the current index status for a project
watch_project path: str Start watching a project for file changes
unwatch_project path: str Stop watching a project

Graph queries

Tool Parameters Description
get_symbol full_name: str Get a symbol's node and relationships by fully-qualified name
get_symbol_source full_name: str, include_class_signature: bool = False Get the source code of a symbol
find_implementations interface_name: str Find all concrete implementations of an interface
find_callers method_full_name: str Find all methods that call a given method
find_callees method_full_name: str Find all methods called by a given method
get_hierarchy class_name: str Get the full inheritance chain for a class
search_symbols query: str, kind: str | None = None Search symbols by name, optionally filtered by kind
find_type_references full_name: str Find all symbols that reference a given type
find_dependencies full_name: str Find all types referenced by a given symbol
get_context_for full_name: str Get the full context needed to understand or modify a symbol
execute_query cypher: str Execute a read-only Cypher query (mutating statements are blocked)

Summaries

Tool Parameters Description
set_summary full_name: str, content: str Attach a summary to a symbol
get_summary full_name: str Retrieve the summary for a symbol
list_summarized project_path: str | None = None List all symbols that have summaries, optionally scoped to a project

Graph model

Node labels

Structural nodes (identified by path):

  • :Repository — the indexed project root
  • :Directory — a directory within the project
  • :File — a source file

Symbol nodes (identified by full_name):

  • :Package — a namespace or package
  • :Class — classes, abstract classes, enums, and records (distinguished by the kind property)
  • :Interface — interfaces
  • :Method — methods (with signature, is_abstract, is_static, line properties)
  • :Property — properties (with type_name)
  • :Field — fields (with type_name)

A :Summarized label is added to any node that has a user-attached summary.

Relationships

  • CONTAINS — structural containment: Repository→Directory, Directory→File, File→Symbol, and Class/Package→nested symbols
  • IMPORTS — file imports a package/namespace
  • CALLS — method calls another method
  • OVERRIDES — method overrides a base method
  • IMPLEMENTS — class implements an interface
  • INHERITS — class inherits from another class, or interface extends another interface

Fully-qualified names (e.g. MyNamespace.MyClass.DoWork) are used as symbol identifiers throughout.


Development

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

# Run unit tests (no FalkorDB or .NET required)
pytest tests/unit/

# Run integration tests (requires FalkorDB on localhost:6379 and .NET SDK)
pytest tests/integration/ -m integration

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选