Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
kuc-arc-f / .env
Created December 4, 2025 22:23
ADK python , RAG Search
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=your-key
@kuc-arc-f
kuc-arc-f / embed.py
Created December 4, 2025 22:19
ADK python , RAG Data add
import glob
import os
from langchain_text_splitters import RecursiveCharacterTextSplitter
import ollama
import psycopg2
from pgvector.psycopg2 import register_vector
# PostgreSQL 接続
conn = psycopg2.connect(
dbname="mydb",
@kuc-arc-f
kuc-arc-f / docker-compose.yml
Created November 23, 2025 09:13
pgvector, docker-compose
version: "3.9"
services:
db:
image: pgvector/pgvector:pg16
container_name: pgvector-db
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: admin
POSTGRES_DB: mydb
@kuc-arc-f
kuc-arc-f / RpcClient.ts
Last active November 9, 2025 03:51
next.js 16 + Rust MCP Server example
// app/lib/RpcClient.ts
import { spawn } from "child_process";
class RpcClient {
constructor(command: any) {
/* @ts-ignore */
this.proc = spawn(command);
/* @ts-ignore */
this.idCounter = 1;
/* @ts-ignore */
@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));