Cross-Project MCP Server
Enables AI agents to explore, search, and reference code implementation details across different project repositories. It also supports a task delegation protocol for agents to request and track work between separate codebases.
README
Cross-Project MCP Server
A generic MCP (Model Context Protocol) server that allows AI agents to access code from another project. This enables agents working in one repository (e.g., your website) to reference implementation details from a source repository (e.g., your OSS tool).
Discovery & Instructions
The server exposes get_agent_instructions to help agents understand the target repository.
- Best Practice: Agents should call
get_agent_instructionsfirst to read.agent/gemini.md(or similar) from the source repo. This provides context on when and how to delegate tasks.
Tools Reference
Code Exploration
| Tool | Description |
|---|---|
read_file |
Read file contents with optional line ranges |
list_directory |
Browse directory structure (recursive optional) |
search_code |
Search for patterns (regex or literal) across the codebase |
get_file_outline |
Extract functions, classes, and symbols from source files |
find_files |
Find files by name pattern (glob matching) |
Agent Discovery & Delegation
| Tool | Description |
|---|---|
get_agent_instructions |
Read .agent/gemini.md to understand the repo's purpose and rules |
submit_task |
Delegate work by creating a task file in .agent/tasks/ |
list_tasks |
List tasks in the inbox, filterable by status (OPEN, IN_PROGRESS, DONE, BLOCKED) |
read_task |
Read the full content of a specific task file |
All operations are sandboxed to the configured source project path for security.
Installation
cd cross-project-mcp-server
npm install
npm run build
Configuration for Antigravity
Add the server to your project's .gemini/mcp_settings.json:
{
"mcpServers": {
"oss-project": {
"command": "node",
"args": [
"/absolute/path/to/cross-project-mcp-server/dist/index.js",
"/absolute/path/to/your-oss-repo"
]
}
}
}
Configuration Parameters
| Parameter | Description |
|---|---|
"oss-project" |
A descriptive name for your source project (can be anything) |
| First arg | Path to this server's dist/index.js |
| Second arg | Path to your OSS/source repository |
Example
If your OSS tool is at /Users/you/projects/my-oss-tool and this server is at /Users/you/tools/cross-project-mcp-server:
{
"mcpServers": {
"my-oss-tool": {
"command": "node",
"args": [
"/Users/you/tools/cross-project-mcp-server/dist/index.js",
"/Users/you/projects/my-oss-tool"
]
}
}
}
Usage
Once configured, the MCP tools will be available to AI agents working in your project. The agent can:
- Explore structure: List directories, find files by pattern
- Read implementation: Read specific files or line ranges
- Search code: Find usages of functions, types, or patterns
- Understand symbols: Get outlines of classes and functions
Supported Languages for Outline
The get_file_outline tool supports extracting symbols from:
- TypeScript/JavaScript (
.ts,.tsx,.js,.jsx) - Python (
.py) - Java/Kotlin (
.java,.kt) - Go (
.go) - Rust (
.rs)
Security
- All file access is restricted to the configured source project directory
- Common non-essential directories (node_modules, .git, etc.) are automatically excluded
- Path traversal attempts are blocked
Task Delegation (Multi-Agent)
This server supports a Task Delegation Protocol allowing agents to request work from the repository owner.
- submit_task: Write a structured task request (Markdown) to
.agent/tasks/ - list_tasks: Check the inbox for new requests
- read_task: Read the full context of a request
Workflow
- Agent A (Website) needs a change in Repo B (OSS).
- Agent A calls
submit_taskon Repo B's MCP server. - A file
task_[timestamp]_[title].mdis created in Repo B. - Agent B (OSS) sees the task and implements it.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。