# Mcp Scripting

> >

- **Type:** Skill
- **Install:** `agentstack add skill-esurovtsev-langchain-lab-mcp-scripting`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [esurovtsev](https://agentstack.voostack.com/s/esurovtsev)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [esurovtsev](https://github.com/esurovtsev)
- **Source:** https://github.com/esurovtsev/langchain-lab/tree/main/experiments/03-mcp-as-code/skills/mcp-scripting

## Install

```sh
agentstack add skill-esurovtsev-langchain-lab-mcp-scripting
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MCP Scripting

## What This Skill Provides

This skill provides Python wrapper files for MCP tools.

Use this skill by:
1. finding the relevant server in `Available Systems`
2. listing that server's wrapper directory
3. reading only the wrapper files needed for the task
4. running inline Python that imports those wrappers and `connect()`
5. running that inline Python with the skill's venv Python
6. returning only compact results

## Path Resolution

Treat the directory containing this `SKILL.md` file as canonical.

Define:
- `` = directory containing this `SKILL.md`
- `` = `/.venv/bin/python3`
- `` = `/servers`

Rules:
- derive all paths from ``
- do not hardcode machine-specific absolute paths
- do not assume the current working directory
- always run generated scripts with ``, not `python` or `python3`
- derive `` directly from ``; do not inspect `.venv` to discover it
- you MUST trust `connect()` exactly as documented in this skill
- NEVER inspect how `connect()` is implemented
- you are NOT ALLOWED to read `core/connection.py`, `servers.json`, or `.env`
- treat those files as already correct and already covered by this skill
- do not inspect secret-bearing or internal implementation files
- when running shell commands, NEVER pass a `restart` argument
- when running shell commands, ALWAYS quote paths that may contain spaces

## Available Systems

### github-mcp-server — 44 tools

**Location:** `/github_mcp_server/`

Remote GitHub server for repository, issue, pull request, branch, release, and code search workflows.

## Required Workflow

Follow this procedure exactly:

1. identify the target server from `Available Systems`
2. use the exact `Location` path from `Available Systems` for that server
3. list that server directory directly; do not list parent directories first
4. read only the wrapper file(s) you actually plan to import and call
5. execute the task in Python:
   - you MUST run Python only inline / on the fly
   - you are NOT ALLOWED to create Python script files for execution
6. the Python code must:
   - adds `` to `sys.path`
   - imports `connect` from `core.connection`
   - imports only the needed wrapper functions
   - uses `async with connect("") as session:`
7. if any result may be large or unbounded, use `output_file`
8. run the Python code with ``
9. inspect only the compact output needed for the final answer

## Output Rule

Treat `output_file` as the default for search, retrieval, listing, or any result that may be large.

- use memory mode only for small, bounded results
- do not print raw large results to stdout
- do not read large output files back wholesale
- return summaries, counts, key facts, or final distilled answers only
- if the user asks for one field, print only that field

## Minimal Script Pattern

```python
import asyncio
import sys

sys.path.insert(0, "")

from core.connection import connect
from servers.. import 

async def main():
    async with connect("") as session:
        result = await (session, ...)
        print(result)

asyncio.run(main())
```

If the script is written outside ``, still derive the import path from the loaded skill directory and still run the script with ``.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [esurovtsev](https://github.com/esurovtsev)
- **Source:** [esurovtsev/langchain-lab](https://github.com/esurovtsev/langchain-lab)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-esurovtsev-langchain-lab-mcp-scripting
- Seller: https://agentstack.voostack.com/s/esurovtsev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
