
太空桥MCP
MCP服务器通过自动化问题跟踪来对涡轮增压进行编码
3 years
Works with Finder
1
Github Watches
0
Github Forks
1
Github Stars
SpaceBridge-MCP
A Model Context Protocol (MCP) server that integrates with the SpaceBridge REST API (https://spacebridge.io/docs) to automate issue management across connected issue trackers.
Overview
SpaceBridge-MCP is a Model Context Protocol (MCP) server designed to integrate AI development tools (like Claude code, Windsurf, Cursor) with the SpaceBridge issue aggregation platform. It allows developers to interact with their issue trackers directly from their coding environment via their AI assistant.
Core Benefits:
- Reduced Context Switching: Manage issues (search, create, view) without leaving the development environment.
- Automated Issue Tracking: Facilitates workflows where AI assistants can automatically find or create relevant issues associated with code changes (e.g., for commit messages).
-
Enhanced AI Context: Provides AI assistants with access to issue details (via
get_issue_by_id
), enabling more context-aware code generation and analysis. - Centralized Interaction: Leverages SpaceBridge to interact with multiple underlying issue trackers (Jira, GitHub Issues, etc.) through a single interface.
Functionality:
The server exposes MCP tools and resources that translate natural language requests from an AI assistant into SpaceBridge API calls. Key features include intelligent duplicate checking (using similarity search and LLM comparison) before issue creation and flexible handling of organization/project context.
Features
-
Resource:
get_issue_by_id
: Retrieves details for a specific issue using its SpaceBridge ID. -
Tool:
search_issues
: Searches for issues based on a query string using either full-text or similarity search. -
Tool:
create_issue
: Creates a new issue. Before creation, it performs a similarity search for potentially duplicate issues and uses an LLM to compare the top results against the new issue's content. If a likely duplicate is found, it returns the existing issue's ID; otherwise, it creates the new issue. -
Tool:
update_issue
: Updates an existing issue.
Getting Started
Prerequisites
- Python 3.9+
- pip (Python package installer)
- Access to a SpaceBridge instance and API key.
- OpenAI API Key (for the
create_issue
tool's duplicate check).
Installation using pip
- Install the package:
pip install spacebridge-mcp
Installation from source
- Clone the repository:
git clone <repository-url> cd spacebridge-mcp
- Create and activate a virtual environment (recommended):
# Use .venv as requested by user python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
- Install the package in editable mode, including development dependencies (for testing):
Note: This installs the package such that changes to the source code are immediately reflected without reinstalling. Including# Use the specific python from your virtual env if 'pip' isn't found directly .venv/bin/python -m pip install -e ".[dev]" # Or if 'pip' is correctly on PATH for the venv: # pip install -e ".[dev]"
[dev]
installs packages needed for running tests, likepytest
andrespx
.
Configuration
The server requires the following configuration values:
-
SpaceBridge API URL: The base URL for your SpaceBridge API instance (e.g.,
https://your-spacebridge.com/api/v1
). - SpaceBridge API Key: Your API key for authenticating with SpaceBridge.
-
OpenAI API Key: Your API key for OpenAI, used by the
create_issue
tool for duplicate checking.
These values, along with organization/project context, can be provided in multiple ways. The server determines the final values based on the following order of precedence (highest first):
-
Command-line Arguments: Pass arguments when running the server. These override all other methods.
spacebridge-mcp-server \ --spacebridge-api-url "YOUR_URL" \ --spacebridge-api-key "YOUR_SB_KEY" \ --openai-api-key "YOUR_OPENAI_KEY" \ --org-name "YOUR_ORG" \ # Explicit Org Name --project-name "YOUR_PROJECT" # Explicit Project Name # --project-dir "/path/to/your/project" # Optional: Specify dir for Git detection
(Use
spacebridge-mcp-server --help
to see all available arguments.) -
Environment Variables: Set standard environment variables. These override
.env
files and Git detection.export SPACEBRIDGE_API_URL="YOUR_URL" export SPACEBRIDGE_API_KEY="YOUR_SB_KEY" export OPENAI_API_KEY="YOUR_OPENAI_KEY" export SPACEBRIDGE_ORG_NAME="YOUR_ORG" # Explicit Org Name export SPACEBRIDGE_PROJECT_NAME="YOUR_PROJECT" # Explicit Project Name # Then run: spacebridge-mcp-server
-
.env File: Create a file named
.env
in the directory where you run the server. Environment variables and command-line arguments override values in this file.# .env file content SPACEBRIDGE_API_URL="YOUR_URL" SPACEBRIDGE_API_KEY="YOUR_SB_KEY" OPENAI_API_KEY="YOUR_OPENAI_KEY" SPACEBRIDGE_ORG_NAME="YOUR_ORG" SPACEBRIDGE_PROJECT_NAME="YOUR_PROJECT"
The server automatically loads values from this file if it exists.
-
Git Configuration Detection: If organization and project are not set via arguments or environment variables, the server attempts to detect them from the
.git/config
file.- It first checks in the directory specified by the
--project-dir
argument (if provided). - If
--project-dir
is not used, it checks the current working directory where the server was started.
- It first checks in the directory specified by the
Context Handling Priority:
The organization and project context used for API calls is determined as follows:
- Startup Context: The context determined during server startup (using the precedence above: Args > Env Vars > Git Detection) is used by default.
-
Tool Parameter Fallback: If (and only if) the server could not determine the context during startup (e.g., no explicit config provided and not running in a Git repository), the optional
org_name
andproject_name
parameters provided in a tool call (search_issues
,create_issue
,update_issue
) will be used as a fallback.
Note on Client Configuration: When configuring MCP clients like Claude code (see "Connecting MCP Clients" section), passing credentials or context via the client's --env
flags effectively sets them as environment variables for the server process (Priority 2). This is the recommended way to provide explicit context in environments where Git detection might fail (like Windsurf or Cursor).
Running the Server
Once installed and configured, you can run the server using the command defined in pyproject.toml
:
spacebridge-mcp-server
The server will start listening for MCP connections via standard input/output (stdio) by default.
Connecting MCP Clients
This server uses standard input/output (stdio) for communication. You need to configure your MCP client (e.g., Claude code, Windsurf, Cursor) to launch the spacebridge-mcp-server
command and pass the required environment variables.
Configuration Steps:
-
Install: Ensure
spacebridge-mcp
is installed (see Installation section). Thespacebridge-mcp-server
command should be available in your environment's path (e.g., inside your virtual environment'sbin
directory if installed from source, or globally if installed viapip install spacebridge-mcp
). -
Find Server Path: Determine the full path to the
spacebridge-mcp-server
executable. If you installed in a virtual environment.venv
, it might be/path/to/your/project/.venv/bin/spacebridge-mcp-server
. If installed globally, you can often find it withwhich spacebridge-mcp-server
(Linux/macOS) orwhere spacebridge-mcp-server
(Windows). - Add Server to Client: Use your MCP client's command for adding a new server.
Example using claude mcp add
(Claude code):
claude mcp add spacebridge \
/full/path/to/your/spacebridge-mcp-server \
--scope user \
--env SPACEBRIDGE_API_URL="https://your-spacebridge.com/api" \
--env SPACEBRIDGE_API_KEY="your-spacebridge-api-key" \
--env OPENAI_API_KEY="your-openai-api-key" \
--env SPACEBRIDGE_ORG_NAME="your-explicit-org" \ # Add this if needed
--env SPACEBRIDGE_PROJECT_NAME="your-explicit-project" # Add this if needed
- Replace
/full/path/to/your/spacebridge-mcp-server
with the actual path found in step 2. - Replace the placeholder API URL and keys with your actual credentials.
-
--scope user
makes the server available across all your projects in Claude code. Use--scope project
to limit it to the current project.
Other Clients (Windsurf, Cursor, etc.):
Refer to the specific documentation for your client. The general principle is the same: provide a name for the server and the command to execute it, ensuring the necessary environment variables (SPACEBRIDGE_API_URL
, SPACEBRIDGE_API_KEY
, OPENAI_API_KEY
, and optionally SPACEBRIDGE_ORG_NAME
, SPACEBRIDGE_PROJECT_NAME
) are passed to the command's environment. Some clients might have dedicated fields for environment variables, while others might require a wrapper script. Passing SPACEBRIDGE_ORG_NAME
and SPACEBRIDGE_PROJECT_NAME
is recommended for clients where the server's working directory might not match the actual project directory (e.g., Windsurf, Cursor).
Usage Tips & Agentic Workflows
-
Automated Commit Messages: Configure your AI tool (e.g., via custom instructions or rules in Claude code, Windsurf, Cursor) to automatically reference relevant issue IDs when generating commit messages.
-
Example Rule/Instruction: "When generating a commit message, always ask the SpaceBridge-MCP tool to find or create an issue related to the changes and include the resulting issue ID (e.g.,
SB-123
) in the commit message footer." - The AI can then use the
search_issues
orcreate_issue
tool via this MCP server. If an issue exists, it gets the ID; if not,create_issue
makes one and returns the new ID.
-
Example Rule/Instruction: "When generating a commit message, always ask the SpaceBridge-MCP tool to find or create an issue related to the changes and include the resulting issue ID (e.g.,
-
Context Augmentation: When asking your AI assistant to work on a feature or bug, provide the SpaceBridge issue ID. The assistant can then use the
get_issue_by_id
resource via this MCP server to fetch the full context (description, comments, status) directly from your tracker, leading to more informed code generation or analysis. -
Quick Issue Creation: Simply ask your assistant "Create an issue about [brief description]" while coding. The
create_issue
tool will handle the similarity search and creation process.
Development
Running Tests
- Ensure you have installed the development dependencies:
.venv/bin/python -m pip install -e ".[dev]"
- Run pytest from the project root directory:
.venv/bin/python -m pytest -vvv
Contributing
(Contribution guidelines - TODO)
License
This project is licensed under the MIT License. See the LICENSE file for details.
相关推荐
😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack
Reviews

user_4qISZ8Jb
As a dedicated user of SpaceBridge-MCP created by spacecode-ai, I am genuinely impressed by its performance and reliability. The seamless integration and user-friendly interface make it a top-notch solution for managing multiple control points in my applications. Highly recommended for anyone seeking efficiency and control in their projects.

user_ZABAaoSl
As a devoted user of SpaceBridge-MCP by spacecode-ai, I am deeply impressed by its remarkable capabilities and seamless functionality. This innovative platform elevates user experience with its intuitive design and efficient performance. Highly recommended for anyone seeking a reliable and sophisticated MCP application.

user_Jl1jjkyC
As a dedicated user of SpaceBridge-MCP, I must say this application truly revolutionizes how we manage multi-cloud platforms. spacecode-ai has developed an intuitive and powerful tool that seamlessly bridges various cloud services, making it easier to integrate and operate. It’s a must-have for any business looking to streamline their cloud operations and maximize efficiency. Highly recommended!

user_NLiETvsu
The SpaceBridge-MCP by spacecode-ai is an incredible tool for managing and automating applications. Its user-friendly interface and robust features make it a must-have for anyone needing seamless task automation. Highly recommend it for its efficiency and ease of use!

user_9LMUV4QJ
I have been using SpaceBridge-MCP by spacecode-ai for a while now, and it has revolutionized the way I manage my MCP applications. The user interface is intuitive and the features are incredibly powerful, allowing me to streamline my workflow efficiently. Highly recommend this to anyone looking for a robust MCP management solution!

user_7szpmtkb
As a loyal user of SpaceBridge-MCP by spacecode-ai, I am thoroughly impressed with its seamless integration and efficiency. The intuitive design and robust functionality have significantly streamlined our processes. The welcome information was clear and the start URL made onboarding effortless. Highly recommend this innovative tool to anyone looking for an edge in their daily workflow.

user_APcYrvor
As a devoted user of SpaceBridge-MCP, I am genuinely impressed with its seamless integration and user-friendly interface. Developed by spacecode-ai, this product bridges crucial gaps in my workflow, enhancing productivity and efficiency. The intuitive design and robust features elevate the user experience, making it an indispensable tool for anyone in need of a reliable MCP application. Highly recommended!

user_QTpVqKeG
I've been using SpaceBridge-MCP by spacecode-ai for a few months now, and it's been a game-changer for my projects. The seamless integration and intuitive interface make managing multiple processes incredibly efficient. Highly recommended for anyone looking to streamline their workflow with advanced AI tools!

user_uUzX33qa
As a devoted user of SpaceBridge-MCP, I am continually impressed by its seamless functionality and innovative features. Developed by spacecode-ai, it provides a robust platform that enhances my workflow and productivity. Whether you're a beginner or an experienced professional, this tool is indispensable for managing and executing projects efficiently. Highly recommended!