- Home
- MCP servers
- MCP Source Relation Server
MCP Source Relation Server
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"owayo-mcp-source-relation": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-source-relation",
"run",
"source_relation.py"
]
}
}
}You run an MCP server that analyzes the dependencies across sources inside a project’s src directory. It reads language-specific import statements to map how files relate to each other, helping you quickly identify related files and understand project structure.
How to use
Use this MCP server with your preferred MCP client to analyze a project’s source relationships. You can point the analyzer at either a specific file or a root src directory, and you’ll receive a structured view of file dependencies across multiple languages.
How to install
Prerequisites you need before installation are Python 3.10 or newer and the uv runtime tool.
Install uv, then set up the MCP source relation server locally.
# Install uv
$ curl -LsSf https://astral.sh/uv/install.sh | sh
# Navigate to the project directory
$ cd /path/to/mcp-source-relation
# Install the required library/runtime packages
$ uv sync
Configuration and running
Run the server via the MCP client integration by configuring an MCP server entry that launches uv to run the Python script. This enables Claude Desktop to start analyzing dependencies from your chosen path.
{
"mcpServers": {
"source-relation": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-source-relation",
"run",
"source_relation.py"
]
}
}
}
Output structure and usage tips
The analyzer produces a JSON mapping of file paths to their dependencies, with all paths relative to the src directory.
{
"dependencies": {
"components/Button.tsx": [
"types/index.ts",
"utils/theme.ts"
],
"pages/index.tsx": [
"components/Button.tsx",
"utils/api.ts"
]
}
}
Available tools
source_analyzer
Main engine that delegates language-specific parsing to dedicated analyzers for Ruby, Python, TypeScript, and Rust.
ruby_analyzer
Ruby dependency analyzer handling require and require_relative, including extensions without explicit file endings.
python_analyzer
Python dependency analyzer handling import and from ... import, including package-relative imports.
typescript_analyzer
TypeScript/JavaScript dependency analyzer handling import, require, and path aliases like @/components/.
rust_analyzer
Rust dependency analyzer handling mod and use statements.
base_analyzer
Common foundational logic shared by all language-specific analyzers.
path_utils
Utilities for robust path manipulation within the src directory.
typescript_config
TypeScript-specific configuration used by the TypeScript analyzer.