Programmatic MCP Prototype
FreeNot checkedExperimental agent prototype demonstrating programmatic MCP tool composition, progressive tool discovery, state persistence, and skill building through TypeScri
About
Experimental agent prototype demonstrating programmatic MCP tool composition, progressive tool discovery, state persistence, and skill building through TypeScript code execution by Adam Jones
README
An MCP-based agent with support for:
- progressive tool discovery
- programmatic tool composition
- state persistence
- skill building
Architecture
- Core Agent Loop: Simple while loop that can be swapped with other implementations
- MCP Proxy Server: Aggregates multiple MCP servers into one unified interface
- Code Generator: Creates TypeScript bindings from MCP tool schemas
- Container Runner: Executes TypeScript code in isolated Docker containers
Key Features
1. Progressive Tool Discovery
The model can search for and discover tools dynamically instead of loading all tools upfront. Rather than exposing hundreds of tools at once, the agent provides search_tools and execute_tool meta-tools that allow the model to find relevant tools as needed, reducing context usage and improving response quality.
2. Programmatic Tool Composition
The agent can write TypeScript code that composes MCP tools together:
// Example: The model can write code like this
import * as bash from './generated/servers/bash';
import * as computer from './generated/servers/computer';
const files = await bash.ls({ path: './documents' });
for (const file of files) {
const content = await bash.readFile({ path: file });
console.log(`File ${file}: ${content.length} bytes`);
}
3. State Persistence
Store intermediate results and data in the workspace directory:
import * as fs from 'fs/promises';
// Save CSV for later use
const csvData = await processData();
await fs.writeFile('./generated/workspace/data.csv', csvData);
// Load it in a future execution
const data = await fs.readFile('./generated/workspace/data.csv', 'utf-8');
4. Skill Building
Create reusable meta-tools that combine multiple operations:
// Build a skill in ./generated/skills/
export async function saveSheetAsCsv(sheetId: string) {
import * as sheets from '../servers/sheets';
import * as bash from '../servers/bash';
const data = await sheets.getCells({ sheetId });
const csv = data.map(row => row.join(',')).join('\n');
const path = `../workspace/sheet-${sheetId}.csv`;
await bash.writeFile({ path, content: csv });
return path;
}
// Use the skill later
import { saveSheetAsCsv } from './generated/skills/save-sheet-as-csv';
const csvPath = await saveSheetAsCsv('abc123');
Setup
- Install dependencies:
npm install
Configure your MCP servers in
config/servers.tsSet your Anthropic API key:
export ANTHROPIC_API_KEY='your-key'
- Build Docker image for code execution:
docker build -t mcp-runner:latest src/servers/container-runner
Usage
Run the agent:
npm start
How It Works
- Startup: Connects to configured MCP servers (bash, computer, container)
- Code Generation: Creates TypeScript functions for each tool with proper types
- Agent Loop: Simple while loop that calls Claude with MCP tools
- Tool Execution: Routes tool calls to appropriate backend MCP servers
- Code Execution: Runs TypeScript in isolated Docker containers
Benefits of Programmatic Tool Use
- Composition: Chain multiple tools without waiting between calls
- State: Store variables and reuse results
- Loops/Conditionals: Handle complex logic in code
- Error Handling: Try/catch and retry logic
- Efficiency: Make many tool calls in one execution
- Skills Library: Build reusable patterns over time
Installing Programmatic MCP Prototype
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/domdomegg/programmatic-mcp-prototypeFAQ
Is Programmatic MCP Prototype MCP free?
Yes, Programmatic MCP Prototype MCP is free — one-click install via Unyly at no cost.
Does Programmatic MCP Prototype need an API key?
No, Programmatic MCP Prototype runs without API keys or environment variables.
Is Programmatic MCP Prototype hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Programmatic MCP Prototype in Claude Desktop, Claude Code or Cursor?
Open Programmatic MCP Prototype on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectAmap Maps Mcp Server
MCP server for using the AMap Maps API
by duxiaohuiSupabase
Database, auth and storage
by SupabaseEverything
Reference / test server with prompts, resources, and tools.
Git
Tools to read, search, and manipulate Git repositories.
Sequential Thinking
Dynamic and reflective problem-solving through thought sequences.
Time
Time and timezone conversion capabilities.
Compare Programmatic MCP Prototype with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
