Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
kuc-arc-f / index.ts
Created October 18, 2025 00:33
test-code , workers + remoto MCP Server JSON-RPC 2.0
/**
* Cloudflare Workers - MCP Server with JSON-RPC 2.0
* Model Context Protocol Remote Server Implementation
*/
export default {
async fetch(request, env, ctx) {
// CORS headers
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
@kuc-arc-f
kuc-arc-f / test1.js
Created October 16, 2025 22:39
test-code , Rust remote MCP Server , example
const start = async function() {
try{
const item = {
"jsonrpc": "2.0",
"method": "tools/list",
"id": 2
}
const response = await fetch("http://localhost:3000/mcp", {
@kuc-arc-f
kuc-arc-f / README.md
Last active October 16, 2025 02:54
GoLang remoto MCP Server , example

mcp_5

Version: 0.9.1

date : 2025/10/16


GoLang remoto MCP Server , example

@kuc-arc-f
kuc-arc-f / Cargo.toml
Created October 16, 2025 01:12
Rust , remoto MCP Server , example
[package]
name = "rust_remoto_mcp_1"
version = "0.1.0"
edition = "2024"
[dependencies]
anyhow = "1.0.100"
axum = "0.7.5"
axum-extra = { version = "0.10.1", features = ["cookie"] }
chrono = { version = "0.4", features = ["serde"] }
@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