Guides (25)
Step-by-step guides for building with and for AI agents.
Machine-readable: /api/longform/guides.json.
- Run an agent on a local model with an OpenAI-compatible endpoint Guide
Start Ollama, vLLM, SGLang or LocalAI bound to 127.0.0.1, point the OpenAI Python SDK at the server's /v1 base URL, enable tool calling, and optionally route the same endpoint through a LiteLLM proxy config.
- Confine a coding agent's filesystem MCP access Guide
Separate the workspace a coding agent sees from the files its MCP server can touch. A practical review of allowed directories, legacy Roots, read-only tools, symlinks and hard links, with a disposable acceptance checklist.
- Give an agent durable memory with SurrealDB Agent Memory Guide
Connect an agent to SurrealDB Agent Memory over MCP or the Python/TypeScript SDKs: Context + Bearer key, remember/recall/forget, provenance and supersession, and what the free Sandbox actually needs.
- Let an agent send email safely through the Resend MCP server Guide
Give an agent email through Resend's MCP server without letting it mail anyone, anything, at any time: pin the sender, fence off local files, draft first, deny-by-default tool gating, and a human approval step that shows recipients and subject. Tested offline against resend-mcp 2.28.0.
- Make your site and API discoverable by agents Guide
Publish the files agents look for: an RFC 9727 API catalog, an AI Catalog, an MCP Server Card, an Agent Skills index and llms.txt. Minimal valid examples, the headers each spec asks for, each spec's real status, and how to check the result with our discovery probe.
- Publish an MCP server so agents can find it Guide
Build a small MCP server with FastMCP, test it with the MCP Inspector CLI, publish its metadata to the official MCP Registry with mcp-publisher, then get it into GitHub's registry, Glama, the Docker MCP Catalog and Index Agentica.
- Screen tool and web output for prompt injection before your agent reads it Guide
Put a check between untrusted tool results and the model: Llama Prompt Guard 2 for injection attempts, LlamaFirewall's scanners for hidden text and generated code, and Llama Guard for content safety. Includes a tested screening wrapper and the limits of each layer.
- Drive a headless Godot editor over MCP Guide
Run a Godot 4.7 editor with no display on a Linux box or CI runner and let a coding agent edit scenes and scripts through Beckett, Godot Editor MCP or Godot AI. Includes tested commands, a stdlib Python probe, and the security checks we ran.
- Evaluate an AI agent with open-source eval and observability tools Guide
A hands-on loop for agent quality: instrument with OpenTelemetry, collect traces, turn real traces into a dataset, write code, LLM-as-judge and human evaluators, run offline experiments, then monitor production and gate pull requests in CI.
- Give your coding agent up-to-date library docs over MCP (Context7, GitMCP, DeepWiki, Microsoft Learn) Guide
Stop your coding agent from guessing at APIs that changed after its training cutoff. Connect free remote docs MCP servers (Context7, GitMCP, DeepWiki, Microsoft Learn) to Claude Code, Codex or Cursor, learn which tool to call for what, and keep a self-hosted fallback for private docs.
- Scan agent-written code for vulnerabilities with the Semgrep MCP server Guide
Give a coding agent a deterministic security scanner. Install the Semgrep CLI, run its built-in MCP server (`semgrep mcp`), wire it into Claude Code, Cursor, VS Code, Codex or Kiro, and call semgrep_scan and custom-rule scans. Includes two gotchas we hit, and when SonarQube's MCP server fits better.
- Self-host a code-execution API for agents with Piston or Judge0 Guide
Run Piston or Judge0 on your own server to give an agent a stateless run_code tool for many languages: what each one isolates, the host requirements that decide between them, the limits to set, and a tested tool wrapper.
- Run agent-generated code safely in a sandbox Guide
A defense-in-depth recipe for executing LLM-written or user-supplied code: pick an isolation boundary, lock down egress, keep secrets out, cap time and resources, and treat the output as untrusted.
- Bridge stdio and remote MCP servers: mcp-remote, Supergateway, mcp-proxy and mcpo Guide
Put a local stdio MCP server on HTTP so remote agents can reach it, or plug a remote server into a client that only speaks stdio. Covers mcp-remote, Supergateway, mcp-proxy and mcpo: which direction each one bridges, exact commands, how to lock the endpoint down, and two dependency breakages we hit.
- Use the Index Agentica MCP server: the five real tools, their schemas and the mistakes to avoid Guide
A reference for the five tools that mcp.indexagentica.com actually exposes (search, get_entry, get_content, list_categories and request_listing), with input schemas, live example calls and responses, the matching REST endpoints, and the wrong tool names and arguments that clients send most often.
- Test a tool-using agent for prompt injection with AgentDojo Guide
Measure how often injected tool outputs hijack your agent. Run AgentDojo's built-in suites from the CLI, wire your own model or agent loop in as a pipeline, read utility, utility under attack and targeted attack success, then compare defenses.
- Add OAuth authorization to your own MCP server Guide
A server-side walkthrough of the MCP 2026-07-28 authorization spec: publish RFC 9728 protected resource metadata, answer 401 and 403 challenges, verify JWT audience per RFC 8707, enforce per-tool scopes, and never pass tokens through. Tested with the MCP TypeScript SDK v2.
- Test your MCP server with in-process tests and Inspector CI checks Guide
Automated tests for a TypeScript MCP server: call tools in-process through the SDK's handler.fetch, assert on structuredContent and isError, snapshot the tool list so schema changes fail review, test the bearer-token gate, spawn the stdio build, and add MCP Inspector CLI checks to CI.
- Convert documents to Markdown for agents with MarkItDown and Docling Guide
Turn PDFs, Office files and other documents into Markdown or chunks an agent can read, with Microsoft's MarkItDown for speed and Docling for layout and tables, then expose either one to an agent over MCP.
- Give an agent a Lightning wallet with Nostr Wallet Connect Guide
How to let an agent pay Lightning invoices and check its balance through Nostr Wallet Connect (NIP-47), using a budget-capped connection from Alby Hub or LNbits, the Alby JS SDK or the Alby MCP server.
- Agent auth and delegated access, step by step Guide
How an agent acts for a user without holding their passwords: CIMD client registration, the MCP 2026-07-28 OAuth flow with resource indicators and audience checks, no token passthrough, vaulted third-party tokens, CIBA approvals and Cross App Access (ID-JAG).
- Add MCP servers to Claude Code Guide
Connect Claude Code to remote and local MCP servers from the command line, choose the right scope, keep tokens out of shared config, and check that each server connected, using GitHub and Playwright as examples.
- Connect an agent to a remote MCP server Guide
How remote MCP works over Streamable HTTP in the 2026-07-28 spec, how OAuth sign-in is discovered, and copy-paste configs for Claude Code, Codex, Cursor, Gemini CLI, VS Code and Claude connectors.
- Give an agent long-term memory Guide
How to make an agent remember users, facts and lessons across sessions, choosing between file-based memory, a memory layer such as Mem0, a temporal knowledge graph such as Zep or Graphiti, a stateful agent platform such as Letta, or your own store.
- Pay for an API as an agent with x402 Guide
How an agent pays per request for an HTTP API or MCP tool with x402 v2, from reading the 402 response to signing a USDC payment with spend caps, on testnet first.