Skip to content

Commit b69050a

Browse files
authored
feat: add development mcp
This PR adds a MCP internally used for testing stuff on the chain;
1 parent b3696b1 commit b69050a

28 files changed

+14617
-63
lines changed

Cargo.lock

Lines changed: 145 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ members = [
1010
"test-utils",
1111
"xtask",
1212
"project-selector",
13+
"mcp",
1314
]
1415
resolver = "2"
1516

@@ -58,7 +59,10 @@ num-traits = { version = "0.2.19", default-features = false, features = [
5859
] }
5960
bitflags = { version = "2.9.1", default-features = false }
6061
rand = { version = "0.9.1", default-features = false }
62+
lazy_static = { version = "1.5.0" }
6163
libm = { version = "0.2.15", default-features = false }
64+
tracing-subscriber = "0.3.19"
65+
tracing = "0.1.41"
6266

6367
# Frontier / EVM
6468
fc-api = { git = "https://github.com/paritytech/frontier.git", rev = "105bc38ac417de999721d09c8427fdb80eb78553" }
@@ -87,6 +91,7 @@ keccak-hash = { git = "https://github.com/paritytech/parity-common", rev = "f0da
8791

8892
# CLI
8993
clap = { version = "4.5.22", features = ["derive"] }
94+
serde = "1.0.219"
9095
serde_json = { version = "1.0", default-features = false }
9196

9297
# RPC
@@ -95,7 +100,12 @@ jsonrpsee = { version = "0.24", features = ["full"] }
95100
# Async
96101
futures = "0.3"
97102
futures-timer = "3"
103+
tokio = "1.47.1"
98104

99105
anyhow = "1.0.98"
100106

101107
paste = "1.0.15"
108+
109+
# Mcp
110+
rmcp = "0.4.1"
111+
schemars = "1.0.4"

client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ std = ["codec/std", "codec/derive", "codec/max-encoded-len", "scale-info/std"]
1212

1313
mainnet = []
1414
testnet = []
15+
devnet = []
1516

1617
[dependencies]
1718
anyhow = "1.0.98"
@@ -44,4 +45,3 @@ paste = "1.0.15"
4445
[build-dependencies]
4546
tokio = { version = "1.35", features = ["macros", "time", "rt-multi-thread"] }
4647
torus-client-codegen = { path = "codegen" }
47-

client/build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ async fn main() -> Result<(), Box<dyn Error>> {
99
std::env::var("OUT_DIR").unwrap()
1010
));
1111

12-
generate_interfaces(&output_file).await?;
12+
let devnet_url = if std::env::var("CARGO_FEATURE_DEVNET").is_ok() {
13+
Some(std::env::var("DEVNET_URL").unwrap_or("ws://127.0.0.1:9944".to_string()))
14+
} else {
15+
None
16+
};
17+
18+
generate_interfaces(&output_file, devnet_url).await?;
1319

1420
Ok(())
1521
}

0 commit comments

Comments
 (0)