Skip to content

Instantly share code, notes, and snippets.

@quantotto
quantotto / run_remote_mcp.py
Created May 13, 2025 09:11
Separate FastAPI and FastAPI MCP
#
# Run it with: uvicorn run_remote_mcp:app --host 0.0.0.0 --port 5005
#
import httpx
import requests
import json
import os
from fastapi import FastAPI
@quantotto
quantotto / agent.py
Last active May 12, 2025 11:36
Adding tool filtering to Pydantic AI's MCPServerHTTP
import os
from pydantic_ai import Agent
from mcp_with_filters import MCPServerHTTPWithFilter, MCPToolFilter
MCP_SERVER_URL = os.getenv("MCP_SERVER_URL", "http://127.0.0.1:5000/mcp")
token = "some_token"
headers = {"Authorization": f"Bearer {token}"} if token else {}
server = MCPServerHTTPWithFilter(
@quantotto
quantotto / ttrs_quimb.ipynb
Last active January 17, 2025 19:19
Tensor Train Recursive Sketching (Python)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@quantotto
quantotto / quantum_search_and_rescue.ipynb
Last active December 24, 2024 20:35
Quantum Search and Rescue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@quantotto
quantotto / # Migrating to monorepo
Last active July 4, 2022 16:22
Migrating to monorepo
# Migrating to monorepo based on technique described here: https://medium.com/@filipenevola/how-to-migrate-to-mono-repository-without-losing-any-git-history-7a4d80aa7de2
================================================================
Steps:
1) Edit myrepos.txt to list all repositories you want to migrate
Line format:
<reponame (required>:[new_name_under_monorepo (optional, default: reponame)]:[source_branch_name (optional, deafult: master)]
Examples: