-
Notifications
You must be signed in to change notification settings - Fork 130
Mcp bridge #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jvsteiner
wants to merge
9
commits into
astrid-runtime:main
Choose a base branch
from
jvsteiner:mcp-bridge
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mcp bridge #754
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
de35140
feat(types): add ToolDescriptor + ToolListRequest/Response variants
jvsteiner f13a4df
feat: scaffold astrid-mcp-bridge crate + CLI subcommand
jvsteiner 14f7a65
feat(mcp-bridge): respond to initialize + empty tools/list
jvsteiner b149de4
feat(mcp-bridge): connect to daemon and send/recv IpcMessage
jvsteiner 1a1526a
feat(mcp-bridge): populate tools/list from live capsule introspection
jvsteiner 8a23060
feat(mcp-bridge): translate MCP tools/call to Astrid ToolExecuteRequest
jvsteiner 9884387
feat(mcp-bridge): route approval prompts through MCP elicitation
jvsteiner 7c92f79
feat(scripts): claude-astrid wrapper + e2e smoke tests
jvsteiner a8c4bb6
feat(mcp-bridge): file-based debug log for the elicitation/dispatch path
jvsteiner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| //! `astrid mcp` subcommand group — bridges Astrid capsule tools to | ||
| //! external MCP clients (e.g. Claude Code). | ||
|
|
||
| use std::process::ExitCode; | ||
|
|
||
| use anyhow::Result; | ||
| use clap::Subcommand; | ||
|
|
||
| use astrid_mcp_bridge::{BridgeConfig, run_stdio}; | ||
|
|
||
| #[derive(Subcommand)] | ||
| pub(crate) enum McpCommand { | ||
| /// Run the MCP bridge over stdio. Intended to be spawned by an | ||
| /// MCP client (e.g. Claude Code via .mcp.json) — not invoked | ||
| /// interactively. | ||
| Bridge, | ||
| } | ||
|
|
||
| pub(crate) async fn run(command: McpCommand) -> Result<ExitCode> { | ||
| match command { | ||
| McpCommand::Bridge => { | ||
| run_stdio(BridgeConfig::default()).await?; | ||
| Ok(ExitCode::SUCCESS) | ||
| }, | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [package] | ||
| name = "astrid-ipc-client" | ||
| version.workspace = true | ||
| authors.workspace = true | ||
| edition.workspace = true | ||
| license.workspace = true | ||
| repository.workspace = true | ||
| rust-version.workspace = true | ||
| description = "Astrid daemon socket client — handshake + length-prefixed JSON IpcMessage I/O." | ||
|
|
||
| [dependencies] | ||
| anyhow = { workspace = true } | ||
| astrid-core = { workspace = true } | ||
| astrid-types = { workspace = true } | ||
| serde_json = { workspace = true } | ||
| tokio = { workspace = true, features = ["net", "io-util"] } | ||
| tracing = { workspace = true } | ||
|
|
||
| [lints] | ||
| workspace = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| //! Astrid daemon socket client. | ||
| //! | ||
| //! Length-prefixed JSON `IpcMessage` I/O over the system Unix | ||
| //! socket with bearer-token handshake. Extracted from `astrid-cli` | ||
| //! for reuse by the MCP bridge. | ||
|
|
||
| pub mod socket_client; | ||
| pub use socket_client::SocketClient; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
schemarsdependency has been added to the workspace. If this component is intended to be self-contained and eventually moved to its own repository, please pin the dependency inline in the crate'sCargo.tomlrather than using workspace dependencies to avoid creating tight coupling (Rule: Pin dependencies inline). Otherwise, please justify this addition and verify that it does not duplicate existing functionality already present in the workspace.References