mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-10 06:09:10 -07:00
mcp: use rust-rmcp instead of brk-rmcp
This commit is contained in:
@@ -14,7 +14,7 @@ brk_indexer = { workspace = true }
|
||||
brk_vec = { workspace = true }
|
||||
color-eyre = { workspace = true }
|
||||
derive_deref = { workspace = true }
|
||||
brk_rmcp = { workspace = true }
|
||||
rmcp = { workspace = true }
|
||||
schemars = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use brk_rmcp::schemars::JsonSchema;
|
||||
use color_eyre::eyre::eyre;
|
||||
use rmcp::schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::ops::Deref;
|
||||
|
||||
use brk_rmcp::schemars::{self, JsonSchema};
|
||||
use rmcp::schemars::{self, JsonSchema};
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -26,7 +26,7 @@ pub fn init(path: Option<&Path>) {
|
||||
});
|
||||
|
||||
Builder::from_env(Env::default().default_filter_or(
|
||||
"info,bitcoin=off,bitcoincore-rpc=off,fjall=off,lsm_tree=off,rolldown=off,brk_rolldown=off,rmcp=off,brk_rmcp=off,tracing=off",
|
||||
"info,bitcoin=off,bitcoincore-rpc=off,fjall=off,lsm_tree=off,rolldown=off,brk_rolldown=off,rmcp=off,rmcp=off,tracing=off",
|
||||
))
|
||||
.format(move |buf, record| {
|
||||
let date_time = Timestamp::now()
|
||||
|
||||
@@ -11,4 +11,4 @@ repository.workspace = true
|
||||
axum = { workspace = true }
|
||||
brk_interface = { workspace = true }
|
||||
log = { workspace = true }
|
||||
brk_rmcp = { workspace = true }
|
||||
rmcp = { workspace = true }
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
// #![doc = "```"]
|
||||
|
||||
use brk_interface::{IdParam, Interface, PaginatedIndexParam, PaginationParam, Params};
|
||||
use brk_rmcp::{
|
||||
Error as McpError, RoleServer, ServerHandler,
|
||||
use log::info;
|
||||
use rmcp::{
|
||||
ErrorData as McpError, RoleServer, ServerHandler,
|
||||
handler::server::{router::tool::ToolRouter, tool::Parameters},
|
||||
model::*,
|
||||
service::RequestContext,
|
||||
tool, tool_handler, tool_router,
|
||||
};
|
||||
use log::info;
|
||||
|
||||
pub mod route;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use axum::Router;
|
||||
use brk_interface::Interface;
|
||||
use brk_rmcp::transport::{
|
||||
use rmcp::transport::{
|
||||
StreamableHttpServerConfig,
|
||||
streamable_http_server::{StreamableHttpService, session::local::LocalSessionManager},
|
||||
};
|
||||
@@ -22,15 +22,13 @@ where
|
||||
return self;
|
||||
}
|
||||
|
||||
let config = StreamableHttpServerConfig {
|
||||
// stateful_mode: false, // breaks Claude
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let service = StreamableHttpService::new(
|
||||
move || Ok(MCP::new(interface)),
|
||||
LocalSessionManager::default().into(),
|
||||
config,
|
||||
StreamableHttpServerConfig {
|
||||
// stateful_mode: false, // breaks Claude
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
|
||||
info!("Setting MCP...");
|
||||
|
||||
Reference in New Issue
Block a user