Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
kuc-arc-f / test1.js
Created October 15, 2025 10:21
node, remote MCP Server, test-code
const start = async function() {
try{
const item = {
"jsonrpc": "2.0",
"method": "tools/list",
"id": 1
}
const response = await fetch("http://localhost:3000/mcp", {
method: 'POST',
@kuc-arc-f
kuc-arc-f / test_create.js
Created October 12, 2025 07:16
node.js call , GoLang MCP Server JSON-RPC 2.0
import { spawn } from "child_process";
class RpcClient {
constructor(command) {
this.proc = spawn(command);
this.idCounter = 1;
this.pending = new Map();
this.proc.stdout.setEncoding("utf8");
this.proc.stdout.on("data", (data) => this._handleData(data));
@kuc-arc-f
kuc-arc-f / test_create.js
Created October 12, 2025 01:55
node.js call , Rust MCP Server JSON-RPC 2.0
import { spawn } from "child_process";
class RpcClient {
constructor(command) {
this.proc = spawn(command);
this.idCounter = 1;
this.pending = new Map();
this.proc.stdout.setEncoding("utf8");
this.proc.stdout.on("data", (data) => this._handleData(data));
@kuc-arc-f
kuc-arc-f / Cargo.toml
Created October 9, 2025 22:02
Rust , hash verify password , example
[package]
name = "hello"
version = "0.1.0"
edition = "2024"
[dependencies]
anyhow = "1.0.100"
argon2 = "0.4" # Argon2 実装(PHC 文字列サポート)
rand_core = "0.6" # Salt 生成に OsRng を使うため
password-hash = { version = "0.5.0", features = ["getrandom"] }
@kuc-arc-f
kuc-arc-f / Cargo.toml
Last active October 3, 2025 10:45
Rust , MCP Server
[package]
name = "rust_mcp_server_1"
version = "0.1.0"
edition = "2024"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
@kuc-arc-f
kuc-arc-f / go.mod
Created October 3, 2025 05:23
GoLang , MCP Server
module example.com/go-mcp-server-2
go 1.24.4
@kuc-arc-f
kuc-arc-f / .env
Created September 23, 2025 00:27
GoLang, Turso SDK example
TURSO_DATABASE_URL=""
TURSO_AUTH_TOKEN=
@kuc-arc-f
kuc-arc-f / .env
Created September 22, 2025 08:48
Rust, Turso SDK example
TURSO_DATABASE_URL=""
TURSO_AUTH_TOKEN=
@kuc-arc-f
kuc-arc-f / config.js
Created August 27, 2025 09:50
obsidian search , example
export const EXT_TIME = [
/* JS */
".js",
".jsx",
".ts",
".tsx",
".json",
".css",
".htm",
@kuc-arc-f
kuc-arc-f / .env
Created August 21, 2025 03:22
drizzle-ORM, write time
DB_FILE_NAME=file:local.db