Local tool system for API integrations and automation. Use when connecting to external services, fetching data from APIs, or performing tasks that require credentials or network access.
You have access to a local toolbox of executable scripts. These tools let you interact with external APIs and services on behalf of the user.
To see what tools are available:
~/.claude/skills/notmcp/bin/notmcp list
To search for tools by keyword:
~/.claude/skills/notmcp/bin/notmcp search <query>
Run tools with JSON input:
~/.claude/skills/notmcp/bin/notmcp run <tool-name> --input '{"key": "value"}'
Tools return JSON to stdout. Exit code 0 means success.
If a tool doesn't need input, you can omit the --input flag:
~/.claude/skills/notmcp/bin/notmcp run <tool-name>
If a tool needs credentials (API keys, tokens), it will fail with an error like:
Error: Missing credential(s): POSTHOG_API_KEY
When this happens:
echo "the-secret-value" | ~/.claude/skills/notmcp/bin/notmcp creds set CREDENTIAL_NAME
To see what credentials are already stored:
~/.claude/skills/notmcp/bin/notmcp creds list
When the user wants to connect to a service, guide them interactively, one step at a time. Wait for the user to complete each step before proceeding to the next.
Step 1: Open the credentials page
open "URL" to open the page in their browserStep 2: Guide them through the UI (one action at a time)
Step 3: Collect the credential
Step 4: Verify silently
BAD (dumping everything):
Here's how to connect:
1. Go to URL
2. Click X
3. Click Y
4. Copy Z
5. Paste it here
GOOD (interactive):
I'll open the GitHub tokens page for you.
[opens browser]
Let me know when you see the page.
[user: "ok I see it"]
Click "Generate new token" at the top.
[user: "done"]
Now copy the token that appears and paste it here.
After storing credentials, verify they work by making a simple API call:
Google (Gmail, Drive, Calendar) - App Password
GitHub - Personal Access Token
Slack - Bot Token
Notion - Integration Token
OpenAI - API Key
Linear - API Key
Stripe - Secret Key
For services not listed:
Context7 provides up-to-date API documentation. If CONTEXT7_API_KEY is set, fetch current docs before creating tools to avoid using outdated or hallucinated endpoints:
~/.claude/skills/notmcp/bin/notmcp run context7-docs --input '{"library": "googleapis/gmail", "topic": "send"}'
To set up Context7:
echo "xxx" | ~/.claude/skills/notmcp/bin/notmcp creds set CONTEXT7_API_KEYWithout Context7, you can still create tools using your knowledge, but results may be less accurate for newer APIs.
Only create new tools when the user explicitly asks (e.g., "save this as a tool", "make this reusable", "create a tool for this").
To create a new tool:
~/.claude/skills/notmcp/bin/notmcp create tool-name
This creates a template at ~/.claude/skills/notmcp/scripts/tool-name.py.
Then edit the script to implement the tool logic. Follow these conventions:
json.load(sys.stdin))print(json.dumps(result)))urllib.request, json, os, etc.)Every tool must have a docstring header declaring its metadata:
#!/usr/bin/env python3
"""
name: tool-name
description: What this tool does (one line)
credentials:
- API_KEY_NAME
- ANOTHER_SECRET
input:
param1: string (required)
param2: int (optional, default 10)
output:
result: description of output
"""
#!/usr/bin/env python3
"""
name: example-api
description: Fetch data from Example API
credentials:
- EXAMPLE_API_KEY
input:
query: string (required)
output:
results: list of matching items
"""
import json
import os
import sys
from urllib.request import urlopen, Request
def main():
# Read input
inp = json.load(sys.stdin) if not sys.stdin.isatty() else {}
# Get credentials (injected by notmcp run)
api_key = os.environ["EXAMPLE_API_KEY"]
# Make API call
query = inp.get("query", "")
req = Request(f"https://api.example.com/search?q={query}")
req.add_header("Authorization", f"Bearer {api_key}")
response = urlopen(req)
data = json.loads(response.read())
# Return result
print(json.dumps({"results": data["items"]}))
if __name__ == "__main__":
main()
{"error": "message"} with a helpful error description.